Re: where'd the spaces come from

Поиск
Список
Период
Сортировка
От Gary Stainburn
Тема Re: where'd the spaces come from
Дата
Msg-id 01072311105601.26815@gary.ringways.co.uk
обсуждение исходный текст
Ответ на where'd the spaces come from  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
Список pgsql-sql
Hi all,

forget it, I've solved it.  I converted the calls to:

to_char(t.tnumber,'FM000')

and it worked.
Gary

On Monday 23 July 2001 10:18 am, Gary Stainburn wrote:
> Hi all,
>
> Can someone please explain how to remove the spaces from the results of the
> query below.  The current output is also included.  What I want out of the
> query is something like 'NE/027-05'.
>
> psql -c "select t.tregion || '/' || to_char(t.tnumber,'000') || '-' ||
> to_char(m.mnumber,'00') as unitno from teams t, members m
> where m.mteam = t.tid;"
>    unitno
> -------------
>  SW/ 041- 03
>  SW/ 041- 05
>  NE/ 011- 06
>  NE/ 011- 01
>  NE/ 011- 03
>  NE/ 011- 02
>  NE/ 011- 10

-- 
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     


В списке pgsql-sql по дате отправления:

Предыдущее
От: Gary Stainburn
Дата:
Сообщение: where'd the spaces come from
Следующее
От: "Richard Huxton"
Дата:
Сообщение: Re: where'd the spaces come from