1jaws
asked on
so simple sql query
On select statement
if o.OrderID is not null
'$' + convert(varchar, convert(money, inv.price * -1), 1) as amount
else
'$' + convert(varchar, convert(money, inv.price), 1) as amount
how can I write this logic on tsql query?.
if o.OrderID is not null
'$' + convert(varchar, convert(money, inv.price * -1), 1) as amount
else
'$' + convert(varchar, convert(money, inv.price), 1) as amount
how can I write this logic on tsql query?.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
i alrdeay shown example,how to do the logic in t-SQL, through that any one can understand how to process the logic in T-SQL.
i alrdeay shown example,how to do the logic in t-SQL, through that any one can understand how to process the logic in T-SQL.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry ukerandi, I didn't see your answer when I hit delete button. Thanks both for the answer.
ASKER
dont need it