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 |
|
susan_151615
Yak Posting Veteran
99 Posts |
Posted - 2011-04-11 : 07:08:10
|
| I have atable TEst with fields as follows(rowid,processid,errorcode1,errorcode2,errorcode3)Sample values for Test table:RowId ProcessID ErrorCode1 ErrorCode2 ErrorCode31 2 cd1 cd2 cd3i need to insert values from this table into another tabletest2 which has fields as follows(rowid,processis,error)Now i want a query which will yield result as follows for the test 2 table when i insert value from test table:Result:RowId ProcessID Error1 2 cd12 2 cd23 2 cd3Here rowid ia auto incremented column.I tried using PIVOT/CTE operator but it didnt yield the result i wanted.Without using cross joins and union operators will it be possible to yield this resultCan anyone help me in this susan |
|
|
raghuveer125
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-04-11 : 07:23:26
|
| Ok your columns are fixed here in 1st table Test?Raghu' S |
 |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2011-04-11 : 07:33:05
|
| Looks like this is a duplicate posting of http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=159291 |
 |
|
|
susan_151615
Yak Posting Veteran
99 Posts |
Posted - 2011-04-11 : 07:38:36
|
| yes raghu columns are fixedsusan |
 |
|
|
|
|
|