Microsoft
Software
Hardware
Network
Question : sql question
I have this section in my sql script:
ISNULL(lot_loc.unit_cost, item.avg_u_cost) as [Unit Cost]
it works very well but in some cases lot_loc also = 0.0 in which case I'd also like it to pull the value from item.avg_u_cost.
How can I do this?
Answer : sql question
use this instead of the above
case when lot_loc.unit_cost is null or lot_loc.unit_cost =0 then item.avg_u_cost ELSE lot_loc.unit_cost END as as [Unit Cost]
Random Solutions
Best Registry Cleaning Program?
Custom Order By
Internet Explorer is broken!!!
OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction
OL2k3: Unable to open your default e-mail folders. The information store could not be opened.
how to create tables in SQL Server 2008
How to calculate 25th percentile on an Access report
Full Trust granting for Assembly in x64
What is a good server naming convention?
Filter By Form works perfect in MDB but does nothing in MDE