Link to home
Start Free TrialLog in
Avatar of 1jaws
1jawsFlag for United States of America

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?.
SOLUTION
Avatar of ukerandi
ukerandi
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 1jaws

ASKER

I've requested that this question be deleted for the following reason:

dont need it
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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 1jaws

ASKER

Sorry ukerandi, I didn't see your answer when I hit delete button. Thanks both for the answer.