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 |
|
ajaeger
Starting Member
4 Posts |
Posted - 2003-02-12 : 17:06:09
|
I have a table that I will need to reformat periodically. The data will come to me in the following format (field names are ID and KEYWORDS, I think the display will look a little funny. I used the hyphens to space out the 2 columns - they don't seem to format well. Hope it's not too confusing.)ID - KEYWORDS10 - KEYWORD1,KEYWORD211 - KEYWORD3,KEYWORD4,KEYWORD5,KEYWORD612 - KEYWORD7,KEYWORD8,KEYWORD9There will be one row per ID in the table and it can have any number of different KEYWORDS. KEYWORDS will always be delimited by a comma and will always be 8 characters long.I need the data in another table the following format. (Field names are SEQN, a new field not in the above table, ID from the above table and KEYWORD. Again, I used the hyphens to space out the 3 different columns.)SEQN - ID - KEYWORD1 - 10 - KEYWORD12 - 10 - KEYWORD23 - 11 - KEYWORD34 - 11 - KEYWORD45 - 11 - KEYWORD56 - 11 - KEYWORD67 - 12 - KEYWORD78 - 12 - KEYWORD89 - 12 - KEYWORD9Any suggestions? Thanks a bunch! Anna |
|
|
robvolk
Most Valuable Yak
15732 Posts |
|
|
ajaeger
Starting Member
4 Posts |
Posted - 2003-02-12 : 22:07:59
|
Thanks! That works great.Anna |
 |
|
|
|
|
|