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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-12-18 : 09:05:57
|
| rahul writes "sir,i am facing one big problem hope u wil help it.in my sql table fields are like thiscust_id char(8)entrydate datetimeentrytime datetimenow i want to retrive like one cust_id (say ABB456) and all the date where he has entered.like this for all cust_id.mean how many time during the month customer has enteredand reports should be for all customers.will you tell me how to perform the query so that i will get the desired result.i want this results in an asp page.if you are kind enough to tell me how to place query result in asp pagenote: cust_id is repetitive where as entrydate is unique for every customer" |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2001-12-18 : 09:59:14
|
| to get everything for this monthwhere datepart(mm,getdate()) = datepart(mm,entrydate)and datepart(yy,getdate()) = datepart(yy,entrydate)I suspect you can do the customer ID bitThen either select count(*) for the number of entries or select * for the actual entries.==========================================Cursors are useful if you don't know sql.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|