From: | Duane Lee - EGOVX <DLee(at)mail(dot)maricopa(dot)gov> |
---|---|
To: | "'Prabu Subroto'" <prabu_subroto(at)yahoo(dot)com>, Postgres General Milis <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: selecting more that 2 tables based on 1 subquery fi |
Date: | 2004-07-26 17:34:46 |
Message-ID: | 64EDC403A1417B4299488BAE87CA7CBF01CD0EE6@maricopa_xcng0 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Try this:
select c.custid, cd.description,
c.company, c.title, c.salutation, c.firstname,
c.lastname, c.address, c.postcode, c.city, c.areacode,
c.phone, c.mobilephone, c.fax, c.email from customer
as c, customerdescription as cd where exists (
(select '1' from sven1 ss
where c.custid = ss.custid);
Duane
-----Original Message-----
From: Prabu Subroto [mailto:prabu_subroto(at)yahoo(dot)com]
Sent: Monday, July 26, 2004 4:34 AM
To: Postgres General Milis
Subject: [GENERAL] selecting more that 2 tables based on 1 subquery find
an error
Dear my friends...
I want to "select" query 2 tables. one is "customer"
and one is "customer.description" but the customer
records that I want to "select" are only what in
subquery result.
Here what I've done:
"
postgres(at)patrix:~> select c.custid, cd.description,
c.company, c.title, c.salutation, c.firstname,
c.lastname, c.address, c.postcode, c.city, c.areacode,
c.phone, c.mobilephone, c.fax, c.email from customer
as c, customerdescription as cd where c.custid in
(select custid from sven1);
bash: syntax error near unexpected token
`cd.description,'
postgres(at)patrix:~>
"
Anybody could give me any solution?
Thank you very much in advance.
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly
From | Date | Subject | |
---|---|---|---|
Next Message | David Parker | 2004-07-26 17:42:35 | 7.5 beta? |
Previous Message | Harald Fuchs | 2004-07-26 17:25:46 | Re: Sql injection attacks |