Microsoft
Software
Hardware
Network
Question : SQL code conversion for Microsoft Access 2007
Hello: I need help to convert the standard SQL code below for a MS Access 2007 database. Thank you!
SELECT
f.Volume_in_Eaches -
decode(f.Prod_Code, c.Cannibal_Prod1_Code, Cannibal_Prod1_Vol_Ea, 0) -
decode(f.Prod_Code, c.Cannibal_Prod2_Code, Cannibal_Prod2_Vol_Ea, 0) -
decode(f.Prod_Code, c.Cannibal_Prod3_Code, Cannibal_Prod3_Vol_Ea, 0) -
decode(f.Prod_Code, c.Cannibal_Prod4_Code, Cannibal_Prod4_Vol_Ea, 0) -
decode(f.Prod_Code, c.Cannibal_Prod5_Code, Cannibal_Prod5_Vol_Ea, 0) as NetVolume
FROM
tblForecast f
left outer join tblCannibal c
on
f.Prod_Year = c.Prod_Year and
f.Proc_Code = c.Prod_Code and
f.Reg_Code = c.Reg_Code;
Answer : SQL code conversion for Microsoft Access 2007
Decode is similar to IIF:
IIF(Expression to evaluate, Truepart, Falsepart)
You can also nest IIFs:
IIF("Something", DoThis, IIF("Somethingelse", Dothis, Elsedo this))
Random Solutions
Access 2003 Insert Query with data from form to multiple records
Clean CRLF from text file being imported into SQL2000
Windows 7 Activation on KMS host?
how can i redirect ISA to publish a subsite on sharepoint?
Truncation of memo fields exported to Excel
How Can I Search Exchange 2003 Message Store by subject
Can SQL Server databases be used within stand alone desktop applications?
Request for the permission of type 'Microsoft.SharePoint.Secu<wbr />rity.Share<wbr />PointPermi<wbr />ssion, Microsoft.SharePoint.Secur<wbr />ity, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e<wbr />9429c' fail
WSUS Connection Error
Set Border Style of Text Box on Report w/ VBA