SQLTeam.com | Weblogs | Forums

Column Seperate

Dear Friends Kindly Help Me how to Separate Amount Column to 02 column as if its + value column name as credit if value - column name as debit

Please anyone Kindly Help

not able to understand you

can you show an example

Thanks For the Reply
i want to divide (+) values another column and (-) values to another column

output as
image

null

Dear Friend Kindly Send me the Full Query Statement how to separate way

amount + isnull(credit,0) as debit

How to Separate Amount Column values to Credit and Debit Column
i need to know that

,CASE WHEN Amount >= 0 THEN Amount END AS Credit
,CASE WHEN Amount < 0 THEN ABS(Amount) END AS Debit
1 Like

Thanks Brother!!!!!!!