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 |
MedievalKnight
Starting Member
2 Posts |
Posted - 2007-11-25 : 17:49:36
|
Hi,I'm a bit stuck here.I have a table called STM_COMM and it contains following fields: id, member_id, email_addr, tel_nr, fax_nrA member can have multiple email addresses, telephone numbers and faxnumbers. so we could have something like this:id member_id email_addr tel_nr fax_nr-------------------------------------------------------1 5 info@test.com2 5 555687 5687743 66 test@go.nl 658978544 5 another@one.comWhat I would like to have is only ONE (1) row PER member with only the FIRST (not max!) entered known data. In the above case, I'd like to have this as result:member_id email_addr tel_nr fax_nr----------------------------------------------------5 info@test.com 555687 56877466 test@go.nl 65897854I've tried lots of things (max, inner select ...) but I can't seem to figure it out.Thank you for the help !ChristophePS: I'm working on a sql server 2005 |
|
MedievalKnight
Starting Member
2 Posts |
Posted - 2007-11-25 : 20:42:42
|
problem solved.my created_date field was the clue. |
|
|
|
|
|