I am trying to figure out where my primary keys of a table with translation per language resides as a foreign key.
This is what i already have ...
SELECT *
FROM ( SELECT TM.seqtrans, T.trans, CASE T.seqlang WHEN 1 THEN 'NL'
WHEN 2 THEN 'FR'
WHEN 3 THEN 'EN'
WHEN 4 THEN 'DE'
WHEN 12 THEN 'SK'
END lang
FROM acc.translation_map TM
INNER JOIN acc.translation T on TM.seqtrans = T.seqtrans
WHERE TM.seqcust = @seqcust ) AS p
PIVOT ( MAX(trans) FOR lang IN ([NL],[FR],[EN],[DE], [SK])
) AS pvt
Now i need to somehow use a system table to check the seqtrans and show all the tablenames.
Is this possible?