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 |
Gili
Starting Member
42 Posts |
Posted - 2008-01-14 : 09:21:51
|
Hi ,I have table in this structure:ComplainNo | EmployeeName1 | EmployeeName21 | Arik | DavidI need to create table whice take the data from the above table and it will look like this ComplainNo | EmployeeName1 | Arik 1 | DavidAny idea??Thanks . |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-01-14 : 09:24:24
|
[code]select ComplainNo, EmployeeName = EmployeeName1 from yourtableunion allselect ComplainNo, EmployeeName = EmployeeName2 from yourtable[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
pootle_flump
1064 Posts |
Posted - 2008-01-14 : 09:25:32
|
SELECT ComplainNo, EmployeeName = EmployeeName1UNION ALLSELECT ComplainNo, EmployeeName2 |
 |
|
pootle_flump
1064 Posts |
Posted - 2008-01-14 : 09:26:07
|
Refresh before posting you fool |
 |
|
Gili
Starting Member
42 Posts |
Posted - 2008-01-14 : 09:50:56
|
Tanks it works.good day :-) |
 |
|
|
|
|