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
set recurrence for multiple outlook appointments
Building VC++ COM server to work with VB
Directory Tree using Excel/VBA - Retrieve Author/Owner Details as well as file attributes..
MS Access Call to SQL Stored Proc with Return Value
Find computers in my network
ADO vs linked dsn
Loop select statement and update rows with the results?
Application.RunCommand acCmdSubformFormView Causes Runtime error 2501
Limit the number of attendee's to a class
In SQL query how to use If statement that if column value blank then assign value Empty else Not Empty