I have two tables with a 1 to many relationship.
For example
table1 (parent)
id(key)
col1
col2
table2 (child)
id (foreign key)
col1
Is there a select statement that I can use to combine data from both table with the same key into one record when table2 has many related records to table1.
Example
table1.id table1.col1 table1.col2 (1st record from table1)table2.col1 (2nd record from table1)table2.col1 (3rd record from table1)table2.col1
Instead of
row 1
table1.id table1.col1 table1.col2 (1st record from table1)
row 2
table1.id table1.col1 table1.col2 (2nd record from table1)table2.col1
row 3
table1.id table1.col1 table1.col2 (3rd record from table1)table2.col1
Please help,
James
For example
table1 (parent)
id(key)
col1
col2
table2 (child)
id (foreign key)
col1
Is there a select statement that I can use to combine data from both table with the same key into one record when table2 has many related records to table1.
Example
table1.id table1.col1 table1.col2 (1st record from table1)table2.col1 (2nd record from table1)table2.col1 (3rd record from table1)table2.col1
Instead of
row 1
table1.id table1.col1 table1.col2 (1st record from table1)
row 2
table1.id table1.col1 table1.col2 (2nd record from table1)table2.col1
row 3
table1.id table1.col1 table1.col2 (3rd record from table1)table2.col1
Please help,
James