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 |
|
eem_2055
Yak Posting Veteran
69 Posts |
Posted - 2008-01-28 : 23:55:11
|
| Hi Guys,,want I need your helpI have the ff records:CustomerID CustNo Name Type10 1 Madonna R10 2 Madonna RI used the ff queryselect distinct(ID), CustNo, name,typefrom Customerwhere Type = 'R'order by Namebut the result is wrong.I want this result:10 2 Madonna R |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-01-29 : 00:05:45
|
[code]select ID, max(CustNo), Name, Typefrom Customergroup by ID, Name, Type[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
eem_2055
Yak Posting Veteran
69 Posts |
Posted - 2008-01-29 : 02:10:34
|
| tnx a lot |
 |
|
|
|
|
|