davej Posted February 16, 2011 Share Posted February 16, 2011 The Timecard problem in another recent thread here has me confused. What if you had two tables containing a common identifying column and you would like to create a new table. You would like the new table to consist of the old tables sorted by the PK Identity (which defines their original order of occurrence) and then merged according to the common identifying column (which should match perfectly).TABLE01PK Col ID_Col Col Col1 x 22 z y2 x 22 z y3 y 6 w x4 z 35 m xTABLE02PK Col ID_Col Col Col451 A 22 G B452 M 22 F R453 D 6 S H455 K 35 R KThe table you would like to create would simply merge the two sorted tables.PK AltPK ID_Col Col Col Col Col Col Col 1 451 22 x z y A G B2 452 22 x z y M F R3 453 6 y w x D S H4 455 35 z m x K R K Link to comment Share on other sites More sharing options...
[dx] Posted February 16, 2011 Share Posted February 16, 2011 You can't have more columns with same name. You should use Col1, Col2 etc. Link to comment Share on other sites More sharing options...
davej Posted February 17, 2011 Author Share Posted February 17, 2011 You can't have more columns with same name. You should use Col1, Col2 etc.Consider them Col1 Col2 Col3 etc. Their names aren't relevant. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.