ryanvb83
asked on
Easy SQL date question
I am writing a select statement and I would like to show a 1 if a date is in the past and 0 if it is today or in the future. I'll send up summing that field to come up with the number of records that have a date that is in the past. This is what I have so far.
SELECT DateField, NameField
FROM MasterTable
WHERE NameField = @Variable
GROUP BY NameField
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER