I have to do a join to a table that may have expenses incurred for a
commission report.
How do I cast that null to a 0.00 so I can subtract the expense from the
SalesPrice in a single pass query?
TIA
__StephenHi,
Use ISNULL function:-
ISNULL(fieldname,0.00)
Thanks
Hari
SQL Server MVP
"Stephen Russell" <srussell@.lotmate.com> wrote in message
news:eieXRMyWFHA.2288@.TK2MSFTNGP14.phx.gbl...
>I have to do a join to a table that may have expenses incurred for a
> commission report.
> How do I cast that null to a 0.00 so I can subtract the expense from the
> SalesPrice in a single pass query?
> TIA
> __Stephen
>|||Use Coalesce like so:
Coalesce(ColumName, 0.00)
Thomas
"Stephen Russell" <srussell@.lotmate.com> wrote in message
news:eieXRMyWFHA.2288@.TK2MSFTNGP14.phx.gbl...
>I have to do a join to a table that may have expenses incurred for a
> commission report.
> How do I cast that null to a 0.00 so I can subtract the expense from the
> SalesPrice in a single pass query?
> TIA
> __Stephen
>
Showing posts with label subtract. Show all posts
Showing posts with label subtract. Show all posts
Subscribe to:
Posts (Atom)