X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id A80719DD6ED for ; Sat, 25 Mar 2006 02:36:38 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 64332-01-2 for ; Sat, 25 Mar 2006 02:36:38 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.228]) by postgresql.org (Postfix) with ESMTP id 74FCA9DD6C2 for ; Sat, 25 Mar 2006 02:36:36 -0400 (AST) Received: by wproxy.gmail.com with SMTP id i13so1076072wra for ; Fri, 24 Mar 2006 22:36:34 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=mEuyNp8OLdRsh+8OMNLkddxG6yBDCkOIkK6B/UiS2YTlXhxjZ2qWtmFoE4f038thr/RBTUS6NnZlEXFYfHSE5QDtGMPG6xvlk1rRTlMHEZ1t9tmh/i0nLfnDNnDzuz1b+lL97xnnpGt1/XJcTTXU44UsFQXR+rbkaSA2teBIwuU= Received: by 10.65.232.17 with SMTP id j17mr1325996qbr; Fri, 24 Mar 2006 22:36:34 -0800 (PST) Received: by 10.65.103.4 with HTTP; Fri, 24 Mar 2006 22:36:34 -0800 (PST) Message-ID: Date: Sat, 25 Mar 2006 12:06:34 +0530 From: "AKHILESH GUPTA" To: pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: regarding join MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8166_7139885.1143268594632" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.005 required=5 tests=[AWL=-0.328, HTML_MESSAGE=0.001, RCVD_IN_BL_SPAMCOP_NET=1.332] X-Spam-Score: 1.005 X-Spam-Level: * X-Archive-Number: 200603/1212 X-Sequence-Number: 93077 ------=_Part_8166_7139885.1143268594632 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline hi all, below I have created two tables in pgsql with field name as 'name' and 'id' as their datatype 'varchar(15)' and 'integer'. One of the table is:-> chemical=3D> select * from test1; name | id -------+---- akhil | 1 b | 2 c | 3 d | 4 e | 5 f | 6 (6 rows) Another table is:-> chemical=3D> select * from test3; name | id ------+---- ab | 1 cd | 2 ef | 3 gh | 4 (4 rows) i want the output as:-> name | id -------+---- akhil | 1 -----from test1 table ab | 1------from test2 table b | 2-----from test1 table cd | 2------from test2 table c | 3-----from test1 table ef | 3------from test2 table d | 4-----from test1 table gh | 4------from test2 table e | 5-----from test1 table f | 6-----from test1 table i have tried all the joins but it makes different fields for different tables. is there any way out for this kind of output?????????????????? (plz reply asap)urgent. THANKS IN ADVANCE -- Thanks & Regards, Akhilesh S/W Trainee (EDP), NUCHEM Pvt. Ltd., Faridabad(Haryana) GSM:-(+919891606064) "FAILURES CAN BE FORGIVEN BUT AIMING LOW IS A CRIME" ------=_Part_8166_7139885.1143268594632 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline hi all,
below I have created two tables in pgsql with field name as 'name' and 'id'= as their datatype 'varchar(15)' and 'integer'.

One of the table is:->
chemical=3D> select * from test1;
 name  | id
-------+----
 akhil |  1
 b     |  2
 c     |  3
 d     |  4
 e     |  5
 f     |  6
(6 rows)

Another table is:->chemical=3D> select * from test3;
 name | id
------+----
 ab   |  1
 cd   |  2
 ef   |  3
 gh   |  4
(4 rows)

i want the output as:->
name  | id
-------+----
 akhil |  1 -----from test1 table
 ab   |  1------from test2 table
 b     |  2-----from test1 table
 cd   |  2------from test2 table
 c     |  3-----from test1 table
 ef   |  3------from test2 table
 d     |  4-----from test1 table
 gh   |  4------from test2 table
 e     |  5-----from test1 table
 f     |  6-----from test1 table

i have tried all the joins but it makes different fields for different tabl= es.
is there any way out for this kind of output??????????????????
(plz reply asap)urgent.

THANKS IN ADVANCE

--
Thanks & Regards,
Akhilesh
S/W Trainee (EDP),
NUCHEM Pvt. Ltd.,
Faridabad(Haryana)
GSM:-(+919891606064)

"FAILURES CAN BE FOR= GIVEN BUT AIMING LOW IS A CRIME" ------=_Part_8166_7139885.1143268594632--