Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Query to return possible descriptions in multiple languages

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-18 : 09:37:28
Mike writes "I'm using Windows NT4 SP6, MS SQL Server 7.0.

I have 3 tables, the first contains the ID for "something", another a Languages table (e.g. English, French, German) and the third a lookup tables for Descriptions of "something" in different languages:

SOMETHINGS
ID

LANGUAGES
ID
Desc (e.g. English, French,...)

LOOKUPTABLE
SomethingID
LanguageID
Desc (Description of Something in a specific language)


Every Something will have an entry in the LOOKUPTABLE for the default Language (LanguageID=1) of English, however, they may or may not have descriptions for other languages

What I want to do is a query/view to return all Somethings with their desc in every language, but if they don't have a desc set for a language use the English one as default.

I've been racking my brain and I can't get this to work. I would prefer a query to return for all languages, but if it's not possible a query for just a specified language would be OK

Thanks!
Michael

PS: If my database design is wrong it's not a problem to change it"
   

- Advertisement -