Can anyone tell me what is wrong with this code? I am getting "Incorrect syntax near ')'" I don't understand this error at all.
Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools:
Code:
SELECT iminvloc_sql.item_no, iminvloc_sql.loc,
sum(case year(trx_dt) when 2014 then quantity else 0[red])[/red] as Useage,
max(trx_dt) as LastUsedDate
FROM iminvloc_sql LEFT OUTER JOIN
iminvtrx_sql on iminvloc_sql.item_no = iminvtrx_sql.item_no
and iminvloc_sql.loc = iminvtrx_sql.loc
WHERE source in ('O','P','S','I') and doc_type = 'I'
GROUP BY iminvloc_sql.item_no, iminvloc_sql.loc
Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools: