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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL STORE PROCEDURE

Status
Not open for further replies.

luckyguy

Programmer
Nov 22, 2002
8
MY
I am going to create a delete procedure in my table based on the expiry date of the service agreement.But the point is i got no expiry date in my table,i only have DATE PURCHASE,MOnth Existance,and Year Duration...How can i make three of this verify with the system date?I need it urgent!thankx for ur helping..thankx...
 
Do either of these help

Delete from MyTable WHERE datediff(mm,datepurchase,getdate()) > (YearDuration * 12)

or
Delete from MyTable WHERE MOnthExistance > (YearDuration * 12)

cjw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top