Quantcast
Channel: SQL Server Reporting Services, Power View Forum
Viewing all articles
Browse latest Browse all 4035

Date parameter in query

$
0
0

I am new to SSRS, but haven't seen quite the same problem elsewhere. I'm on SQL Server 2012.

I'm retrieving data from a table (joined to several other tables) where date and time are in separate fields. If I query on a date range where there is no record for a day in the range, I get an error like "Conversion failed when converting the varchar value '00-' to data type int." That behavior does not occur in SSMS with the same query. If I run the query for a date range where every day has one or more records, no problem!

I also have available a view where date and time are combined in one field, and if I run the query on that table there is no problem.

I've tried using CAST or CONVERT to convert the date field to datetime in the query, but that has no effect.


Viewing all articles
Browse latest Browse all 4035

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>