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 |
|
Kevmaster
Starting Member
3 Posts |
Posted - 2005-05-13 : 16:13:49
|
Problem with some T-SQL code:update report_sens_par_instrumentsset @inst_typeVALUE = @RETURNSUMwhere shift = @shiftAmt and currency = @currencyVALUE @inst_typeVALUE is a varchar(30) variable that contains the name of a column in the table report_sens_par_instruments. @RETURNSUM is created above and contains a float valuethis is part of a while loop and each time @inst_typeVALUE changes. however it gives me this error message when i try to run it:Msg 257, Level 16, State 1:Server 'Devel', Procedure 'kevinMoveTables', Line 58:Implicit conversion from datatype 'FLOAT' to 'VARCHAR' is not allowed. Use theCONVERT function to run this query.i dont want to convert it because i am not putting a float into a varchar spot. simply, the name of the column is a varchar.thanks for the help!Kev |
|
|
Kevmaster
Starting Member
3 Posts |
Posted - 2005-05-13 : 16:15:14
|
| subscribing |
 |
|
|
Kevmaster
Starting Member
3 Posts |
Posted - 2005-05-16 : 09:21:52
|
| bumpany ideas? |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2005-05-16 : 09:32:56
|
| I would hazard a guess that you need to do this part in dynamic SQL. BOL (Books On Line) can tell you how.*need more coffee* |
 |
|
|
|
|
|