|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Multiple same rows only one column changes
Hi:
I want to retrieve some data from an MSSQL database from multiple tables. All these table are connected with foreign keys. The problem is that the program was structured in such a way that whenever additional information for a record were put in the database it formed a new row. For instance: Contact1 Address1 Phone1 Email1 Contact1 Address1 Phone1 Email2 Contact1 Address1 Phone2 Email1 Contact1 Address1 Phone2 Email2 and so on.... Do you have any idea on how I can put all these information under one row, like: Contact1 Address1 Phone1 Phone2 Email2 Thanks a lot in advance. |
|
#2
|
||||
|
||||
|
you really don't want to do that, do you? multiple phone columns and multiple email columns in the same row? how many of each were you planning on having?
it's a really bad idea |
|
#3
|
|||
|
|||
|
Quote:
You are right. It is a bad practice. However, I want the data in that way retrieved (in Excel would be wonderful). I will arrange them anyway afterwards. Thanks for your note. |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Multiple same rows only one column changes |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|