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

Multiple rows into one

Status
Not open for further replies.

CompCodeBoy

Programmer
Aug 18, 2005
33
US
How would you write a query to combine multiple records into one? for example, my table would have two fields like part number and location. I have multiple records for the same part number. I want to have the same part number with all locations it can be found at in one row(record). I want to have the loacations separated into different fields NOT combined into one. Thanks in advance
 
That cannot be done unless you specify a fixed set of location columns.

I recommend that you use SQL to retrieve the data from storage in the relational database, zero or many rows. This is easy an allows any number of locations.

Then arrange the rows into one row in the application which presents the data using a loop.

This is a very common requirement and this question has been addressed several times in this and other SQL forums. Try searching on the subject Multiple rows into one.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top