I have the below code which is failing at the 'CAST('10-10-2014' AS DATETIME)', please can someone assist?
SELECT Sum(poval)
FROM iesa_dwhs.dbo.vw_an_purch_bkb_010_sources vw_AN_Purch_BKB_010_Sources
WHERE Upper(plant) = Upper(('0LH0'))
AND dt BETWEEN Cast('10-10-2014' AS DATETIME) AND Getdate() - 7
AND Upper(matcat) = 'CODED'
Aucun commentaire:
Enregistrer un commentaire