I have a table with some terminologies. These terminologies are in several languages. For Example:
SELECT *
FROM Terminology
results in
ID language text create_date
1 DE TextDE 2011-03-03 14:31:28.423
1 EN TextEN 2011-04-03 14:32:27.423
1 ES TextES 2011-05-03 14:33:26.423
1 FR TextFR 2011-06-03 14:34:25.423
1 NL TextNL 2011-07-03 14:35:24.423
1 PT TextPT 2011-08-03 14:36:23.423
2 DE ...
...
But i need the data in the following form:
ID DE EN ES FR NL PT
1 TextDE TextEN TextES TextFR TEXTNL TextPT
2 ...
ID
and language
are building the primary key. The number of languages is variable, so it's not possible to add just 6 additional columns.
Is it somehow possible to get this done with a plain SQL-Query or do i have to sort this in my program?
EDIT:
with a column in the table that is not selected, but has different values, i get several rows.
So like in the example with 6 different dates i get 6 different rows:
ID DE EN ES FR NL PT
1 TextDE NULL NULL NULL NULL NULL
1 NULL TextEN NULL NULL NULL NULL
1 NULL NULL TextES NULL NULL NULL
1 NULL NULL NULL TextFr NULL NULL NULL
...
Can i somehow turn this to one row?