Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with query in Reporting Services but not in SQL analyzer

Status
Not open for further replies.

krb214

MIS
Feb 9, 2009
4
0
0
US
Hello,

I have a query which works on SQL analyzer, but not in MS Reporting Services. In SQL analyzer, it pull the data, but in MS reporting services it only returns the column headers without any data. The fields, from the table I am pulling from, are all "char" except for tot_value which is a float.
If I take out the where clause, then the query pulls everything, so I am believe that the problem is with the where clause. Since the query works in SQL then I know that there is data for what I am pulling. Any suggestions?
Query is below. I have included a pic of the table in SQL Analyzer.
Thank you!
Kevin

---------------
select enroll_date, total_code, sum(tot_value) tot_value
from reports.dbo.total_sums (nolock)
where proj_num in ('71017063') and
script <> 'S' and enroll_date between '20090101' and '20090309'
group by total_code, enroll_date
----------------
 
Your picture isn't showing, but my best guess is that it has something to with your date criteria. I've had to use different ways of formatting date claues between sql server and visual studio reporting.

Try removing your date criteria. If it works, format the where clause in a different way.
 
I tried to remove everything except the proj_num and it still pulls nothing. The only way the query pulls data is by totally removing the where clause. ???

Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top