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
Sharing an Access 2007 database
How to route private networks through Forefront TMG
SQL Insert Given Date Range
DNS on new domain
Cognos with .NET
is there file sharing limit on win 7 pro?
Copy Tables from Runtime Dataset to Empty Dataset (MDB)
SSIS: Using a parameter for connection string
Outlook Express could not be started because MSOE.DLL could not be loaded
Fatal Error C00021A