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

UPDATE QUERY - SEVERAL RECORDS TO ONE

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How can I update Table1, which has a primary key called PART and ten additional, identical text fields for storing codes, using a second table, "Table2" which has an indexed field called PART and one text field containing a single code?
example "Table2" contains multiple records:
1. 123456 ABC,
2. 123456 DEF,
3. 123456 GHI, etc.
I'd like to update "Table1" record 123456 as follows:
123456 ABC DEF GHI ...
 
How do you know which field to put which record in? Are you taking the next empty slot each time?

If there is no risk of slots used from previous updates then it looks to me as though you are first going to have to number them

123456 ABC, 1
123456 DEF, 2
123456 GHI, 3
567456 LMN, 1
567456 BBH, 2

Then you can do n updates selecting the 1s and putting them in the first field, then the 2s into the second field etc.

mike.stephens@bnpparibas.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top