where'd the spaces come from

From: Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk>
To: "pgsql-sql" <pgsql-sql(at)postgresql(dot)org>
Subject: where'd the spaces come from
Date: 2001-07-23 09:18:08
Message-ID: 01072310180800.26815@gary.ringways.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gary Stainburn 2001-07-23 10:10:56 Re: where'd the spaces come from
Previous Message D'Arcy J.M. Cain 2001-07-22 12:12:19 Re: Get the tables names?