Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 6EB3E633EAB for ; Fri, 13 Mar 2009 04:43:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 87540-08 for ; Fri, 13 Mar 2009 04:43:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mailrelay.zensar.com (unknown [220.225.45.73]) by mail.postgresql.org (Postfix) with ESMTP id 792B0633C1B for ; Fri, 13 Mar 2009 04:43:31 -0300 (ADT) thread-index: Acmjr4IsO2Y39kH3Rv+sAFFSyhu5QQ== Received: from BRIDGEHEAD.ind.zensar.com ([10.42.2.95]) by mailrelay.zensar.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 13 Mar 2009 13:14:15 +0530 Received: from zenmailfe.ind.zensar.com ([10.42.2.88]) by BRIDGEHEAD.ind.zensar.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 13 Mar 2009 13:13:52 +0530 Received: from BATELCWDESK1094 ([10.41.100.205]) by zenmailfe.ind.zensar.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 13 Mar 2009 13:13:51 +0530 Content-Class: urn:content-classes:message Message-ID: <005401c9a3af$73bc14c0$cd64290a@ind.zensar.com> Importance: normal From: "suresh gupta" To: "Ashish Karalkar" Cc: References: <004001c9a3a9$9e715dc0$cd64290a@ind.zensar.com> <49BA0D03.3060005@synechron.com> Subject: Re: Query related Date: Fri, 13 Mar 2009 13:13:51 +0530 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133 X-OriginalArrivalTime: 13 Mar 2009 07:43:51.0511 (UTC) FILETIME=[73DB0E70:01C9A3AF] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.101 tagged_above=0 required=5 tests=AWL=0.001, RDNS_NONE=0.1 X-Spam-Level: X-Archive-Number: 200903/159 X-Sequence-Number: 31659 Thanks Ashish, it is working. Regards, G. V. Suresh Gupta -------------------------------------------------------------------------= ------- GTS - EMEIA, Zensar Technologies Zensar Knowledge Park, Plot#5, MIDC IT=20 Tower, Kharadi, Off Nagar Road, Pune - 411014 Landline : +91-20-66453471 = |=20 +91-9890898688 Email : suresh.g@zensar.com | website: www.zensar.com ----- Original Message -----=20 From: "Ashish Karalkar" To: "suresh gupta" Cc: Sent: Friday, March 13, 2009 1:06 PM Subject: Re: [ADMIN] Query related > suresh gupta wrote: >> Hi Team, >> I had a table with 2 fields like First name(FN) and last name(LN). = When=20 >> I give a query for the records of the 2 columns, they are displaying = in 2=20 >> different columns. My requirement is to combine both the columns in a = >> single one. As per my knowledge there are some operators which = combine 2=20 >> columns and display together in single columns like |, +, etc. in = other=20 >> databases like Oracle. >> For example FN =3D Suresh and LN=3DGupta the output of the query = should be=20 >> Suresh Gupta in single column. Is there any similar operator or = method on=20 >> postgresql to get my result. Please advice. >> Pgsql version is 8.1 and window version software. >> >> >> Regards, >> *G. V. Suresh Gupta* >> = ------------------------------------------------------------------------ >> *GTS - EMEIA, Zensar Technologies * >> Zensar Knowledge Park, Plot#5, MIDC IT Tower, >> Kharadi, Off Nagar Road, Pune - 411014 >> Landline : +91-20-66453471 | +91-9890898688 >> Email : suresh.g@zensar.com | website:=20 >> www.zensar.com >> >> DISCLAIMER: >> This email may contain confidential or privileged information for the = >> intended recipient(s) and the views expressed in the same are not=20 >> necessarily the views of Zensar Technologies Ltd. If you are not the=20 >> intended recipient or have received this e-mail by error, its use is=20 >> strictly prohibited, please delete the e-mail and notify the sender.=20 >> Zensar Technologies Ltd. does not accept any liability for virus = infected=20 >> mails. >> > This will help you. > > postgres=3D# create table name(fn text,ln text); > CREATE TABLE > postgres=3D# insert into name values ('abc','xyz'); > INSERT 0 1 > postgres=3D# select * from name; > fn | ln > -----+----- > abc | xyz > (1 row) > > postgres=3D# select fn||' '||ln as name from name; > name > --------- > abc xyz > (1 row) > > >=20 DISCLAIMER: This email may contain confidential or privileged information for the = intended recipient(s) and the views expressed in the same are not = necessarily the views of Zensar Technologies Ltd. If you are not the = intended recipient or have received this e-mail by error, its use is = strictly prohibited, please delete the e-mail and notify the sender. = Zensar Technologies Ltd. does not accept any liability for virus = infected mails.=20