Thanks Jason
But not true of the standard DW, the code below works perfectly well on the old page and brings up no errors.
I tried creating paramVoucherID1 paramVoucherID2 and so on for the parameter that is required in a number of places, however it still produces the same error
Cheers
Norman
Old Working Code
SELECT view_coupons.Discount, view_coupons.VoucherCode
FROM view_coupons
WHERE ((view_coupons.catItemId=paramItemID AND (view_coupons.VoucherCode=paramVoucherID) ) OR ((view_coupons.catItemId= paramGrpID)) AND ((view_coupons.catalogueID=16) AND (view_coupons.VoucherCode=paramVoucherID)) OR ((view_coupons.catItemId= paramBrandID)) AND ((view_coupons.catalogueID=16) AND (view_coupons.VoucherCode=paramVoucherID))OR((view_coupons.VoucherCode=paramVoucherID) AND view_coupons.VoucherTypeID=4))