Received: from stan.ringways.co.uk ([213.38.87.130]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6N9JIf43720 for ; Mon, 23 Jul 2001 05:19:18 -0400 (EDT) (envelope-from gary.stainburn@ringways.co.uk) Received: from gary.ringways.co.uk ([10.1.1.2]) by stan.ringways.co.uk with smtp (Exim 3.13 #1) id 15Obeq-00052k-00 for pgsql-sql@postgresql.org; Mon, 23 Jul 2001 10:05:44 +0100 Content-Type: text/plain; charset="iso-8859-1" From: Gary Stainburn Organization: Ringways Garages Ltd To: "pgsql-sql" Subject: where'd the spaces come from Date: Mon, 23 Jul 2001 10:18:08 +0100 X-Mailer: KMail [version 1.2] MIME-Version: 1.0 Message-Id: <01072310180800.26815@gary.ringways.co.uk> Content-Transfer-Encoding: 8bit X-Archive-Number: 200107/298 X-Sequence-Number: 4101 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