Re: sql help
Date: Mon, 22 Jul 2002 13:07:03 GMT
Message-ID: <XrT_8.102131$Wi.26113119_at_twister.nyc.rr.com>
How's this:
CREATE TABLE de_words
(
word1 CHARACTER VARYING(50) NOT NULL,
word2 CHARACTER VARYING(50) NOT NULL
)
CREATE TABLE de_en_dict
(
de_word CHARACTER VARYING(50) NOT NULL,
en_word CHARACTER VARYING(50) NOT NULL
)
SELECT de.word1 AS german1,
de.word2 AS german2, dict1.en_word AS english1, dict2.en_word AS english2 FROM de_words AS de LEFT OUTER JOIN de_en_dict AS dict1 ON de.word1 = dict1.de_word LEFT OUTER JOIN de_en_dict AS dict2 ON de.word2 = dict2.de_word
jag
"Ralf Mrowka" <ralf.mrowka_at_charite.de> wrote in message
news:3D3BC92F.770D473C_at_charite.de...
>
> Given:
> A)a table with pairs of german words
> b)a "dictionary" table with german english word pairs
>
> Problem:
> show a translation table with all pairs of table given in A) and their
> translations [ include those which do not have an dictonary entry: NIL]
>
> german1 german2 english1 english2
> german3 german4 english3 NIL
>
> Is there a simple SQL statement for this?
>
> Thanks
>
> Ralf Mrowka
Received on Mon Jul 22 2002 - 15:07:03 CEST