Preparing a report on a SQL Server database
0
Q:
Preparing a report on a SQL Server database
I have a SQL Server database of customers that called our company, and now i want to prepare a report that indicates which ones are new to our database. How would I do this?
ASKED: Mar 3 2009  7:52 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
580 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
i think in your table lets call it CustomerCalls there is the below fields:
CustomerName
CustomerNumber
DateOfCall

and lets say new clients for your company are clients who started calling from Jan 2009
the query will be:

select * from CustomerCalls
where DateofCall>'01-01-2009 00:00:00.000'
and CustomerNumber not in
(select CustomerNumber from CustomerCalls where DateofCall<'01-01-2009 00:00:00.000')
Last Answered: Mar 4 2009  8:34 AM GMT by Sous   580 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0