we have tons of prospective customers in our database and whenever they call we have an audit table in the database where an entry is made. Now once the customer makes a purchase the audit table changes the customer type from prospective to current. I need to find the dates of all thes customers as to what date they were changed from prospective to current
here is a snapshot of the audit table
customerid customertype date
007 prospective 5/1/2004
007 prospective 6/7/2004
007 current 7/9/2004
007 current 2/1/2005
So as u see customer # 007 changes from prospective to current on 7/9/2004. Well how do i put in a query for all the customers ?
desired output
customerid Date
007 7/9/2004 ( Date he actually bought from us)
009 .......
0010 .......
I hope I have made it clear enough .. So any ideas on the query ?
[highlight]
M.Bajwa
[/highlight]
here is a snapshot of the audit table
customerid customertype date
007 prospective 5/1/2004
007 prospective 6/7/2004
007 current 7/9/2004
007 current 2/1/2005
So as u see customer # 007 changes from prospective to current on 7/9/2004. Well how do i put in a query for all the customers ?
desired output
customerid Date
007 7/9/2004 ( Date he actually bought from us)
009 .......
0010 .......
I hope I have made it clear enough .. So any ideas on the query ?
[highlight]
M.Bajwa
[/highlight]