Link to home
Create AccountLog in
Avatar of allelopath
allelopath

asked on

@Year = 9999

I have part of a select statement that refines the return on the year, like so:
and year(tblEvent.EventDate) = @Year)

Open in new window

@Year is an int, and typically it will be 1995, or 2004, etc.
I would like the user to be able to enter 9999 and then the select return ALL years.
How would I change this line to do that?
SOLUTION
Avatar of felipevidaurri
felipevidaurri
Flag of Mexico image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account