Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Need to show data

Author  Topic 

kdnichols
Posting Yak Master

232 Posts

Posted - 2006-11-07 : 11:09:52
Hello All,

I am using the folliwing sql statement:

execute whs_he_rpt_ds_summary '11/01/05', '11/30/05', '594'


It displays the headers but no information. The date range is obviously a date range and the 594 is a BranchNbr.

How do I see if there is truly any data for this date range.

TIA

Kurt

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-07 : 11:15:09
First of all, try to use ISO date format to be sure you are using the right dates.

execute whs_he_rpt_ds_summary '20051101', '20051130', '594'

You could write one last line in the SP as RETURN @@ROWCOUNT


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-11-07 : 11:16:19
Check the stored proc contents. If there are multiple statements, try to check each statement output step-by-step by replacing parameter variables with actual values. In short, debug your stored procedure line by line (if possible using profiler).

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

kdnichols
Posting Yak Master

232 Posts

Posted - 2006-11-07 : 11:40:49
Hello Peso and Harsh,

Thanks for your input I also tried the following. I really don't want to have to change the stored proc if necessary to test I am using Sql Studio Express 2005. I just tried this code:


SET rowcount 100;
execute whs_he_rpt_ds_summary '20051101', '20051130', '594'


And it still returns the headers. Thanks for your help. You guys have been great!

Kurt
Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-11-07 : 12:01:35
Post the code from the sp and we can tell you what to run to check the data - or just look in the sp yourself as harsh suggested and run the statements one by one. To see the code from the sp you can use
sp_helptext whs_he_rpt_ds_summary
Make sure you show the results in text mode to see all the code.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-11-09 : 10:20:37
If it returns only headers(?),then there is no data for the values you passed

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -