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.
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.