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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-06-11 : 10:16:34
|
| Kris writes "2 Tables, the first is default master phrasesID LangKey Phrase---------------1 - Login - Log in2 - SignUp - Sign Uo3 - UserName - User Name4 - Welcome - Welcome The second is TranslationsID LangKey Phrase Culture-------------------------------------------1 - Login - Inizio attività - it2 - SignUp - Firmi In su - it3 - Welcome - Bienvenue - deIm trying to show a list of all default translations, and if it exists the translated phrase ie. a request to view italian translations woul returnLogin - Inizio attività SignUp - Firmi In suUserName - NULLWelcome - NULLIve tried a hundred different ways and cant get it. Any help would be greatly appreciated.ThanksKristian" |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-06-11 : 10:27:57
|
| For future reference, it is preferable to provide actual DDL (CREATE TABLE statements) so that someone who decides to help you can easily cut and paste and will have all the information regarding constraints etc.I believe you can derive the desired rowset with a simple outer join on LangKey, however, I am thrown off as to why your expected output would display a NULL for the translation of ‘Welcome’?<O> |
 |
|
|
izaltsman
A custom title
1139 Posts |
Posted - 2002-06-11 : 10:37:53
|
Well, Page47 (aka the mad sniper ) is right.And here is what that outer join would look like: SELECT mp.langkey, t.phrase FROM defaultmasterphrases as mp left join (select langkey, phrase from translations where culture = 'it') as t ON (mp.langkey = t.langkey) Edited by - izaltsman on 06/11/2002 10:38:42 |
 |
|
|
|
|
|