July 2, 2015 at 7:41 am
Hi,
I have a report where i am calling storedprocedure to get the data.In test Environment the same report and same data is working perfectly.
When we run in PROD environment when i click on preview report.Its showing error like data set failed.
Failed to convert varchar to datatype int.
We ran the stored procedure in sql server environment,it working fine.Why its showing error in the report.
Any Ideas!!!
July 2, 2015 at 7:50 am
mcfarlandparkway (7/2/2015)
Hi,I have a report where i am calling storedprocedure to get the data.In test Environment the same report and same data is working perfectly.
When we run in PROD environment when i click on preview report.Its showing error like data set failed.
Failed to convert varchar to datatype int.
We ran the stored procedure in sql server environment,it working fine.Why its showing error in the report.
Any Ideas!!!
There is pretty much no chance anybody can help here. There just aren't any details in your post that would allow anyone to have anything other than a wild guess.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
July 2, 2015 at 7:57 am
... but if I had to guess, I'd say you have numeric data stored in a varchar column. In test, all values in that column can be converted to numeric values, whereas in production, you have one or more values that can't.
John
July 2, 2015 at 8:23 am
John Mitchell-245523 (7/2/2015)
... but if I had to guess, I'd say you have numeric data stored in a varchar column. In test, all values in that column can be converted to numeric values, whereas in production, you have one or more values that can't.John
I have to agree with John 10000%. This is a clear reminder of why it is so important to use proper datatypes. Storing numbers in a varchar column is asking for trouble. I cannot for the life of me understand why so many people still do this with numbers and dates. If I had a nickel for every time this has happened I could retire.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply