Re: Looks are important
От | Louise Cofield |
---|---|
Тема | Re: Looks are important |
Дата | |
Msg-id | 003a01c3a973$743eed00$7801a8c0@Louise обсуждение исходный текст |
Ответ на | Looks are important ("George Weaver" <georgew1@mts.net>) |
Список | pgsql-sql |
Try the TRIM function or the LTRIM function:
SELECT RPAD(no,30,' ') || TRIM(tableb.kind) FROM tablea
WHERE tablea.kind = tableb.kind
Louise
-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of George Weaver
Sent: Wednesday, November 12, 2003 3:12 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] Looks are importantHi Everyone,I am trying to concatenate two fields through a query:SELECT RPAD(no,30,' ') || tableb.kind FROM tableaWHERE tablea.kind = tableb.kindThe result gives (for example):4595448 Green
5966 Yellow
106-60033 Green
15-94-387 Red
217-991173 BlueWhat I would like to have is better alignment:4595448 Green
5966 Yellow
106-60033 Green
15-94-387 Red
217-991173 BlueIs there some kind of encoding or other string options that will result in better alignment than what I've tried with Rpad?Thanks in advance,George
В списке pgsql-sql по дате отправления: