Re: Easy SQL Question - Mailing list pgsql-novice

From Shoaib Mir
Subject Re: Easy SQL Question
Date
Msg-id bf54be870606120201ye70da55wd07e9e47ac71785d@mail.gmail.com
Whole thread Raw
In response to Easy SQL Question  ("Greg" <greg@officium.co.za>)
List pgsql-novice
You can do it like this:

select firstname || ' ' || lastname as fullname from emp;

/Shoaib

On 6/12/06, Greg < greg@officium.co.za> wrote:
I Was looking at the PgSQL documentation last night but could not find how
to join two fields as one,

i.e

select (firstname + lastname) as fullname from users

I also tried (Cast(firstname as varchar) + Cast(lastname as varchar))

But that doesn't work..
How do I do this?

Thanks



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

pgsql-novice by date:

Previous
From: "Greg"
Date:
Subject: Easy SQL Question
Next
From: "A. Kretschmer"
Date:
Subject: Re: Question about stored procedures