vendredi 26 juin 2015

Distinct field value as column?

I have a table that looks like this:

WidgetName | LanguageId | Text
--------------------------------
lbNext     | 1031       | weiter
lbNext     | 1033       | next
btConnect  | 1031       | verbinden
btConnect  | 1033       | connect

The number of different LanguageIds is varying as new translations (and new languages) can be added. What I want to get from this table is another table that we can give to our translator. It should have this structure:

WidgetName | 1031      | 1033    | [...other LanguageIds]
----------------------------------------------------------
lbNext     | weiter    | next    | [...other translations]
btConnect  | verbinden | connect | [...other translations]

Is there a way to get a table like this with an SQL query? I guess the problem might be the varying number of different languages...

Aucun commentaire:

Enregistrer un commentaire