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.
Author |
Topic |
ddamico
Yak Posting Veteran
76 Posts |
Posted - 2011-07-05 : 09:42:24
|
Good day...I have a stored procedure that returns n number of rows with 3 or 4 columns (one of which is a smallmoney). When I loop on the result set and map the columns to variable in the foreach enumerator I am getting a failure trying to map the "smallmoney" into my associated variable...My variable is defined as double. I have even tried string. I know from reading some posts that currency is DT_CY but the variable data types don't appear to have a relevant type. I am hoping someone will know the following.1. What datatype to assign to this variable 2. Do I need to do some type of explicit conversion to get the smallmoney into the variable. Thanks. |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-07-05 : 09:53:08
|
Why not change the type returned from the sp?==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-07-05 : 13:59:07
|
try casting it to float from sp and then assigning to variable.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|