VBDotNetProgrammer
Programmer
Hi all,
this is the scenario. I am using a select case statement to check the value of a field value in a particular row then depending on the value i change the value of another field in the same table on the same row. Simple enough you might think but it doesnt seem to like it.
This is the code im using does it seem right to you lot?
SELECT CASE
WHEN TotalAmount > 0 THEN BuySell = "BUY"
WHEN TotalAmount = 0 THEN BuySell = ""
ELSE TotalAmount = TotalAmount * -1
FROM #Temp2
Any ideas or advice would be greatly appreciated.
Thanks
this is the scenario. I am using a select case statement to check the value of a field value in a particular row then depending on the value i change the value of another field in the same table on the same row. Simple enough you might think but it doesnt seem to like it.
This is the code im using does it seem right to you lot?
SELECT CASE
WHEN TotalAmount > 0 THEN BuySell = "BUY"
WHEN TotalAmount = 0 THEN BuySell = ""
ELSE TotalAmount = TotalAmount * -1
FROM #Temp2
Any ideas or advice would be greatly appreciated.
Thanks