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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update a table

Status
Not open for further replies.

OseiFosu

IS-IT--Management
Nov 29, 2005
2
US
I have one table of the form:

Delivery Product
101 A
101 B
101 C
102 A
102 E
103 C
104 A
104 E
104 C

I need to update a 2nd table with the data from the first table to look like this:

Delivery Product1 Product2 Product3
101 A B C
102 A E -
103 C - -
104 A E C

So that there is only one line of record for each delivery.

I have tried crosstab query; it doesn't give me exactly what I want - it lists all the products for column headings (about 760) in this case. So I will have more than 780 column headings. I need a way to update a new
table so that it looks like the 2nd table shown above: the column headings are already there, so the query grabs the the products for a delivery and puts them under a column heading (doesn't matter under which field as far as it is associated with the appropriate delivery).

Thanks for your help guys.
 
Never more than 3 Product per Delivery ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
There are up to 15 products per delivery. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top