From: | "Oleg Lebedev" <oleg(dot)lebedev(at)waterford(dot)org> |
---|---|
To: | <Anton(dot)Nikiforov(at)loteco(dot)ru>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Select statment question |
Date: | 2004-02-17 20:42:21 |
Message-ID: | 993DBE5B4D02194382EC8DF8554A52731D7A89@postoffice.waterford.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Is this what you need?
Select dt1.text as name, dt2.text as description
From dictionary_optiongroup do, dictionary_text dt1, dictionary_text dt2
Where dt1.label=do.name
And dt2.label=do.description
Cheers.
Oleg
-----Original Message-----
From: Anton Nikiforov [mailto:Anton(dot)Nikiforov(at)loteco(dot)ru]
Sent: Tuesday, February 17, 2004 12:59 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] Select statment question
Dear All,
could you please help me with writing select statment for the following:
I have two tables dictionary_text
label| Text
-----+------------------------
23 | General
24 | Internet
25 | General option group
26 | Internet option group
And
dictionary_optiongroup
id | name | description
----+------+-------------
0 | 23 | 25
1 | 24 | 26
How should i write SELECT statement to get the following:
name | description
---------+----------------------
General | General option group
Internet | Internet option group
I understand that maybe this question is not for this list, but my
brains stuck with this select. Could you please help.
Best regards,
Anton
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
*************************************
This e-mail may contain privileged or confidential material intended for the named recipient only.
If you are not the named recipient, delete this message and all attachments.
Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited.
We reserve the right to monitor e-mail sent through our network.
*************************************
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-02-17 21:44:28 | Re: String manipulation |
Previous Message | Jan Poslusny | 2004-02-17 20:40:28 | Re: Select statment question |