Hello, SQL 2008R2
Is there an easy way to convert 25.00- to -25.00?
I have a file I import that has the negative on the right side, I import as varchar the do an update
Is there a function or trick to do this a little easier. Note there are actually seven columns that get updated.
Thanks
djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!
Is there an easy way to convert 25.00- to -25.00?
I have a file I import that has the negative on the right side, I import as varchar the do an update
Code:
UPDATE #SummaryTemp
SET Purchases = CASE WHEN RIGHT(Purchases, 1) = '-' THEN '-' ELSE '' END
+ REPLACE(Purchases, '-', '')
Thanks
djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!