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
Left Join Distinct Rows only?
Access query to include lowest value from another table
'System.Configuration.Conf<wbr />igurationE<wbr />xception' occurred in system.dll
Outlook cannot connect to Exchange 2007 during a DC reboot
SQL How do I concatenate strings from a column into a single row
After Update in Access
When exporting Access 2003 report to Excel 2003, I get a message "File Error, Some number formats may have been lost." and my Date field is corrupted to a seemingly random number.
Get username and role c#.net
Windows 2000 theme
using WebBrowser control in separate process