Hello!
I am having problems retrieving list of fields when using stored
procedure as Dataset Source. I noticed that Reporting Services can retrieve
field list if stored procedure is trivial (simple select etc.). In my case,
I am insrting into temporary table and after some manipulations return
resultset. SQL Trace show that RS tries to execute SET FMTONLY ON <sp_name>
SET FMTONLY OFF when reading list of the fiels. This returns empty result
for my stored procedure.
I can not move any further without field list being populated properly. I
can try to replace stored procedure with the view etc. but I would really
like to know if someone experienced similar problems.
Any help is greately appreciated,
IgorIgor,
I have experienced that same behavior. The stored procedure will run but
I will not get a field list. I received the error that told me to hit
REFRESH to get the fields list ... I returned to the data tab, ran the
procedure and hit the refresh button ... then when I returned to layout tab
... the fields list was there. Otherwise I have read in books that you have
to type in your own fields list which to me was not a very acceptable answer
as my fields list was quite extensive. Hope that helps you!
MJ
"imarchenko" wrote:
> Hello!
> I am having problems retrieving list of fields when using stored
> procedure as Dataset Source. I noticed that Reporting Services can retrieve
> field list if stored procedure is trivial (simple select etc.). In my case,
> I am insrting into temporary table and after some manipulations return
> resultset. SQL Trace show that RS tries to execute SET FMTONLY ON <sp_name>
> SET FMTONLY OFF when reading list of the fiels. This returns empty result
> for my stored procedure.
> I can not move any further without field list being populated properly. I
> can try to replace stored procedure with the view etc. but I would really
> like to know if someone experienced similar problems.
> Any help is greately appreciated,
> Igor
>
>
Showing posts with label empty. Show all posts
Showing posts with label empty. Show all posts
Thursday, March 29, 2012
Wednesday, March 7, 2012
Fasted way to check if a recordset is empty using SQL
Hi Anders,
i would use
select count(PKField) from ViewName
perhaps the using of the top attribute was quicker
like this (untested)
select top 1 pkField from ViewName
Good luck.
Niels
>--Original Message--
>Hello!
>I need to check if a View is empty or not. Which is the
fasted way of doing
>this using a SQL statement?
>// Anders
>.
>
Hello Niels!
On Tue, 2 Nov 2004 01:13:33 -0800, nieurig wrote:
> select count(PKField) from ViewName
>
This works fine!
Thank you!
// Anders
i would use
select count(PKField) from ViewName
perhaps the using of the top attribute was quicker
like this (untested)
select top 1 pkField from ViewName
Good luck.
Niels
>--Original Message--
>Hello!
>I need to check if a View is empty or not. Which is the
fasted way of doing
>this using a SQL statement?
>// Anders
>.
>
Hello Niels!
On Tue, 2 Nov 2004 01:13:33 -0800, nieurig wrote:
> select count(PKField) from ViewName
>
This works fine!
Thank you!
// Anders
Subscribe to:
Posts (Atom)