Re: Easy SQL Question

Поиск
Список
Период
Сортировка
От Shoaib Mir
Тема Re: Easy SQL Question
Дата
Msg-id bf54be870606120201ye70da55wd07e9e47ac71785d@mail.gmail.com
обсуждение исходный текст
Ответ на Easy SQL Question  ("Greg" <greg@officium.co.za>)
Список 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 по дате отправления:

Предыдущее
От: "Greg"
Дата:
Сообщение: Easy SQL Question
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Question about stored procedures