Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
velvettiger
Posting Yak Master
115 Posts |
Posted - 2007-09-03 : 08:52:27
|
| Hi all :),I am trying to do a query so that i can identify an inactive customer. Now if the customer shopped in Jan 2005 and did not shop in 2006 he/she would be deemed as inactive.I have no idea where to start does any one have any ideas??? |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-09-03 : 09:07:02
|
Probably something like...WHERE [MostRecentShoppingDate] < '20060101'assuming you have a column called [MostRecentShoppingDate] Kristen |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-09-03 : 09:28:14
|
<<assuming you have a column called [MostRecentShoppingDate] >>and it has proper DATETIME datatype MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|