DECLARE @tD DATETIME;
SET @tD = GETDATE();
SELECT count(*) FROM CUSTOMER WHERE status = 'A' AND customerID = '106' AND EFFDT = @tD
Hello all,
See above code, for some strange reason this doesnt work... If I take out the @tD variable at the end of the select and hard code a date in like so '4/2/2005' and execute it alone it works. But if executed it just as the way it is above it doenst work? Puzzling to me - please let me know why if anyone knows...
Thanks,
Leo
SET @tD = GETDATE();
SELECT count(*) FROM CUSTOMER WHERE status = 'A' AND customerID = '106' AND EFFDT = @tD
Hello all,
See above code, for some strange reason this doesnt work... If I take out the @tD variable at the end of the select and hard code a date in like so '4/2/2005' and execute it alone it works. But if executed it just as the way it is above it doenst work? Puzzling to me - please let me know why if anyone knows...
Thanks,
Leo