Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help Sequencing Records to update new table using queries

Status
Not open for further replies.
Oct 18, 2001
16
US
I have a table that looks like this:

product code sub product code sub product title

1223 890809 Access: A Primer
1223 780812 Office: A Primer
1223 78891X Zagat Survey

122B 987721 Leaves of Grass
122B 19773X Seagate Software
122B 876321 Sun Times

1782 977612 God Bless You John Wayne
1782 675123 Roadkill

And I want to create a result/table that looks like this:

Product Code Sub Product Code1 Sub Product Code2 Sub Product Code3 Etc
1223 890809 980812 98891X
122B 987721 19773X 876321
1782 977612 675123

I don't have a sequence table in the first table. If I had a sequence field in the first table or a related table this would not be a problem. The first table is sorted alphabetically by the sub product title field , and this sort is the sequence order of the second table fields sub product1, sub product2, etc. I need approximately 80 sub product fields in the final table.

If I could do this in a couple of queries this would be great. Any suggestions would be greatly appreciated.
 
First you need to read a book or paper on database normalization. Here's a good place to start:


This will give you a good grasp on how to organize your data effectively and perhaps provide some insight on how to convert your existing data to a more versite format.

Uncle Jack
 
I understand normalization. The project calls for denormailzation of the data and I
can't change that requirement. Any suggestions?
 
No, I think not. If you feel you need 80 subproduct fields in a single table then I'm way out of my league.

Uncle Jack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top