Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi i have a SQL table as my souce data and i want to effect this change in data representation
date field are
TRCD - numeric date referrring to transaction code (1=invoice and 3 =returns)
AMT - amt (no negative value)
what i want to achieve is when trcd=3 amt will represent data in negative status so that when i sum(amt) it will give me net sale
ex.
trcd=1
amt= 1000
trcd=3
amt=(1000)
Hi,
Try this way.
Load
trcd,
if(trcd = 3, amt * -1,amt) as new_amt;
Sql Select trcd, amt
from xyz
Regards,
Kaushik Solanki
Hi,
Try this way.
Load
trcd,
if(trcd = 3, amt * -1,amt) as new_amt;
Sql Select trcd, amt
from xyz
Regards,
Kaushik Solanki