Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Year date > than Year crt date, with condition 1

Status
Not open for further replies.

codrutza

Technical User
Joined
Mar 31, 2002
Messages
357
Location
IE
Pls help.
SQL Server 2005
How to write in a select in a SP something like that:
.....
WHERE
T.CCode='AA'
AND
(
If T.VDate is null or blank
begin year(T.ADate)>year(GETDATE ( ))
end
else if T.VDate is not null or blank
begin year(T.VDate)>year(GETDATE ( ))
end
)
 
Excellent!
Thanks, imex!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top