|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Need help in grouping the data
Hi all,
Hope u could help me I have a table as follows SupID | Week | ..| ........ ------------------------- 234 1/2/03 235 1/2/03 236 2/2/03 237 2/2/03 238 2/2/03 239 3/2/03 and I need to display theses data like 1/2/03(week) ------------- 234 235 2/2/03(week) ------------- 236 237 238 3/3/03(week) ------------- 239 If i go for Group by clause (SQL) then I can group them by week but cant display the individual rows. Is there any way to do this (better if in a single query) Thnx |
|
#2
|
|||
|
|||
|
This is a presentation issue so it better handled in your script language. Retrieve the data ordered by week and just display the week value when it changes.
|
|
#3
|
|||
|
|||
|
thanx for the reply, but
i got the solution from Aspfree.com SQL Develpoment forum
its SELECT Week, SupID FROM TableName GROUP BY Week, SupID ORDER BY SupID Anyway thanx for replying |
|
#4
|
|||
|
|||
|
mind posting the results of that query?? I dont' see how that will give you a result set different from what your original post had (the 1st result set in your 1st post).
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Need help in grouping the data |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|