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 |
pvong
Yak Posting Veteran
58 Posts |
Posted - 2010-10-10 : 19:55:37
|
I'm a newbie.I have a case inside a case and I need to convert all the numeric values to varchar. I have no problem with this as long as I use actual numbers. I have a problem when I add a parameter to my formula and taking out one of the whole numbers I manuall put in. The parameter is @Px and it's used twice in the case statement.here is my Case:CASE WHEN OnePercentAssignment.BuyOption IS NULL THEN (CASE WHEN ((Total * (2.5 / @Px) / 100) - Quantity) > 0 THEN CONVERT (varchar(50) , ROUND(((Total * (2.5 / @Px) / 100) - Quantity) , 0)) ELSE '0' END) ELSE OnePercentAssignment.BuyOption ENDThis is the error msg I got: ------------------------------Using VS2008 / Learning in VB.Net 2.0 / Win2003 / SQL 2005 w SP2Be kind to the newbies because you were once there. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|