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!

Help on Access query.

Status
Not open for further replies.

vbSun

Programmer
Dec 9, 2002
504
US
Hi all,

I dont have any luck with this query. It will be great if you guys can help.

Let me give you the scenario.

Master Table : tblMaster
Child : tblChild

Obviously, I have multiple records in the child table for one Master Table record, connected with MasterTableID. I would like a record set with multiple fields in the table concatenated and for all child rows in to a single row.

Lets see an ex.

Master Table.
MasterTableID
MasterTableName
MasterTableDescr

Records.
1 Name1 Data Description1
2 Name2 Data Description2

Child Table.
ChildTableID
MasterTableID
ChildTableField1
ChildTableField2

Records.
1 1 Field1Row1 Field2Row1
2 1 Field1Row2 Field2Row2
3 1 Field1Row3 Field2Row3
4 2 Field1Row4 Field2Row4
5 2 Field1Row5 Field2Row5
6 2 Field1Row6 Field2Row6

The out put of the SQL Query should be,
Structure.
MasterTableID
Expression

Result.
1 Field1Row1Field2Row1Field1Row2Field2Row2Field1Row3Field2Row3
2 Field1Row4Field2Row4Field1Row5Field1Row5Field1Row6Field2Row6

Thanks in advance for all help.
 
Do a search in this forum for concatenate faq

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks,

I got it working.



------------------------------------------
The faulty interface lies between the chair and the keyboard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top