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 |
|
TAS
Yak Posting Veteran
65 Posts |
Posted - 2004-04-08 : 16:56:45
|
| I have a table stored customers' enrollment number and all other customers information (name, address...). Usually, husband and wife have the same enrollment number, which means the one enrollment number can display twice in the table. Now, I need a program to display only primary customer's infomation, which means each enrollment number only display once, the 2nd person's information will not display. How to do this? |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-04-08 : 17:28:25
|
| Will SELECT DISTINCT work? If you have a primary indicator on the table, you could use that. That would be quicker than the distinct (a lot quicker).MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
TAS
Yak Posting Veteran
65 Posts |
Posted - 2004-04-09 : 08:37:02
|
| Select DISTINCT doesn't work because I need select not only one column. |
 |
|
|
|
|
|