I have to match two tables, table1 and table2, for one row of table1 I have two or more rows in table 2 and I want to display them in one row.
Now I have the following:
Select
a.[ID], b.[Description]
From
table1 a, table2 b
Where
a.[ID] = b.[ID];
Output:
[ID] | [Description]
-----+--------------
1 | Fee
1 | Domestic Fee
2 | Fee
2 | International Fee
I want to get the following result
[ID] | [Description1] | [Description2]
-----+----------------+---------------
1 | Fee | Domestic Fee
2 | Fee | International Fee
Thank you in advance :)
JOINsyntax in the ANSI-92 SQL Standard (25 years ago) and its use is discouraged