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 |
seyha_moth
Yak Posting Veteran
74 Posts |
Posted - 2006-12-11 : 22:31:54
|
Dear Sir or MadamI have a problem related to sql query is that I use cross tab query and I want to Select r* from tbl r where r.studentID='77' Group by *Can I write it? or you have another methods?Thank you in advance.seyha moth |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-12 : 00:08:14
|
You can't use * in group by.If you want to group by all fields, what's the purpose of using Group By.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
seyha_moth
Yak Posting Veteran
74 Posts |
Posted - 2006-12-12 : 03:11:03
|
Thank you for your reply I found the solution by using cursor then I have finished to create it alreadyThank you for your helpI hope that you will help me if I have any problem related to SQL ServerGood Bye!!Good Luck and Succed your work!seyha moth |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-12 : 03:16:36
|
Another method that produces the EXACT SAME OUTPUT isselect distinct * from tbl where studentid = 77Peter LarssonHelsingborg, Sweden |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-12-12 : 05:34:19
|
You cant use * in Group by or Order by Group by * is exactly equivalent to DISTINCT * as suggestedMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|