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

Convert rows to colums and append to end

Status
Not open for further replies.

mrimagepueblo

Programmer
Dec 15, 2003
52
US
I hope this make sense to someone. I am using Access 2003. I have a table that has multiple url's for the same record id and would like to append the url's as additional fields to the end of the query.

table called resmedia - the format is as follows with mediasource being the unique url for each picture. There can be up to 10 urls per uniqueid.

uniqueid,mediatype,mediasource
example would be:
100,pic,100,pic,100,pic,100,pic,101,pic,101,pic,102,url,null
103,pic,
I created a query called 'resquery' based on some fields in another table. The query format has a bunch of fields pulled from the table and it creates what i want. The format of resquery is basically,
uniqueid,field2,field3,field4,etc.field25

What I would like is to take the uniqueid,pic,urlx.jpg scheme and add the data from resmedia to the end of the resquery producing something like this and call it resquerypics
uniqueid,field2,field3,field4,etc,field25,mediatype,mediasource

When using the wizard I obviously get it but each record is duplicated based on the number of urls per uniqueid.

Any thoughts would be appreciated. I have no idea how to write VBA code, so unless that could be spelled out, I'd probably look like a deer with the lights shining in my face.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top