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 |
|
shajimanjeri
Posting Yak Master
179 Posts |
Posted - 2010-01-25 : 06:32:44
|
| Hi,I have two field in a table named DELIVERYDATE as datetime data type and item as varchar data type.Which contains 1000 of records. I need to order all these records week base. Means in the first week of this month how many items delivered like this etcShaji |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-25 : 06:35:32
|
| [code]select dateadd(wk,datediff(wk,0,getdate()),0),sum(items)from tablegroup by dateadd(wk,datediff(wk,0,getdate()),0)[/code] |
 |
|
|
shajimanjeri
Posting Yak Master
179 Posts |
Posted - 2010-01-25 : 07:10:07
|
| Thanks. Its fine |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-25 : 07:26:03
|
| welcome |
 |
|
|
|
|
|