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 |
NTC
Starting Member
21 Posts |
Posted - 2007-12-06 : 14:01:29
|
I know the wrap spacing doesn't always work but will try to represent the table that is being imported from an unknown system;key Field1 Field21 X 1052 abc 1233 abc 1114 btb aff5 sym 01016 X 1067 abc 1448 sym 2121from a database perspective X is a unique record and everything between them belongs to its preceeding X. Right now the only way to know that ABC 123 is part of the X105 record (while ABC144 is part of X106 record) is because the autonumber key generated during the import puts them in sequential order.The record quantity between Xs is variable.One doesn't want to rely upon the autonumber.So I need to run it thru a query to generate a better cross reference field and make a new tablekey Field1 Field2 Field31 X 105 X1052 abc 123 X1053 abc 111 X1054 btb aff X1055 sym 0101 X1056 X 106 X1067 abc 144 X1068 sym 2121 X106Would greatly appreciate assist on the correct sql to do the job....gracias. |
|
|
|
|