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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Date Query

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
Go to Top of Page

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

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -