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

Filter

Status
Not open for further replies.

gsavitha

MIS
Jan 28, 2011
14
0
0
GB
Dear All,

I have customer table with datecreated and emailid field.

I need to select all customer records exactly created 365 days before(last year same day) by comapring their email id with last 45 days sales records to find the customer those who not renewed their policy within last 45 days.

for ex
(last year records 8-8-2010)

123 @gmail.com
test@yahoo.com
xyxy@msn.com


(last 45 days records)
tt@yy.com
zzz@gmail.com
test@yahoo.com
f1@f1.com
city@city.com

result
(not renewed in last 45 days)
123 @gmail.com
xyxy@msn.com

How to filter this.Any help is highly appreciated.

Regards,
SG
 
Any help?
I'll wager that you'll benefit from looking up the DATEADD function and NOT EXISTS.

soi là, soi carré
 
He'd also benefit from looking at, and maybe even responding to his post, with the same title, from last week.

thread183-1656922

Lodlaiden

I haz all the letters: SME, BA, QA, PM, DEV, DBA, UAT, SE, HD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top