Re: Query related

From: "suresh gupta" <suresh(dot)g(at)zensar(dot)com>
To: "Ashish Karalkar" <ashishka(at)synechron(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Query related
Date: 2009-03-13 07:43:51
Message-ID: 005401c9a3af$73bc14c0$cd64290a@ind.zensar.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks Ashish, it is working.

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(dot)g(at)zensar(dot)com | website: www.zensar.com
----- Original Message -----
From: "Ashish Karalkar" <ashishka(at)synechron(dot)com>
To: "suresh gupta" <suresh(dot)g(at)zensar(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
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
>> I give a query for the records of the 2 columns, they are displaying in 2
>> 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
>> columns and display together in single columns like |, +, etc. in other
>> databases like Oracle.
>> For example FN = Suresh and LN=Gupta the output of the query should be
>> Suresh Gupta in single column. Is there any similar operator or method on
>> 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(dot)g(at)zensar(dot)com <mailto:suresh(dot)g(at)zensar(dot)com> | website:
>> www.zensar.com <http://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
>> 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.
>>
> This will help you.
>
> postgres=# create table name(fn text,ln text);
> CREATE TABLE
> postgres=# insert into name values ('abc','xyz');
> INSERT 0 1
> postgres=# select * from name;
> fn | ln
> -----+-----
> abc | xyz
> (1 row)
>
> postgres=# select fn||' '||ln as name from name;
> name
> ---------
> abc xyz
> (1 row)
>
>
>

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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Julius Tuskenis 2009-03-13 07:52:51 Re: Query related
Previous Message Ashish Karalkar 2009-03-13 07:36:35 Re: Query related