sql - stored procedure column value determined by value of another column -
I have some data like this.
Date, amount, value 200 -10-12, 20, 15.43, 2009-10-13, -10, 6.98
I have a stored procedure Which will return these columns as well as create a new column which indicates whether the amount was positive or negative, so the last result of the process would be something like this.
date, amount, value, results 2009-10-12, 20, 15.43, positive 2009-10-13, -10, 6.98, negative
How can this be done? This is a SQL 2008 ENT DB.
select date, amount, value, case when zodiac & gt; 0 then 'positive' when the amount is & lt; 0 then #_table_or_negative to #table
Comments
Post a Comment