Re: Spacing in output

From: Duane Lee - EGOVX <DLee(at)mail(dot)maricopa(dot)gov>
To: "'Jerome Lyles'" <susemail(at)hawaii(dot)rr(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Spacing in output
Date: 2004-09-14 23:31:10
Message-ID: 64EDC403A1417B4299488BAE87CA7CBF01CD0FA7@maricopa_xcng0
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Do this:

SELECT SUBSTR(prod_name,1,45) from Products;

Duane

-----Original Message-----
From: Jerome Lyles [mailto:susemail(at)hawaii(dot)rr(dot)com]
Sent: Tuesday, September 14, 2004 4:22 PM
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Spacing in output

On Tuesday 14 September 2004 11:15 am, you wrote:
> What is the field size of prod_name? You could use SUBSTR(prod_name,1,xx)
> where xx is the max number of characters you want to see.
>
> Duane
fieldsize: 255. I tried to use SUBSTR:

sql_tutorial=> SUBSTR(prod_name,1,45; SELECT prod_name FROM Products;
sql_tutorial(>
sql_tutorial(>
sql_tutorial(> SELECT prod_name FROM Products;
sql_tutorial(> SUBSTR(prod_name,1,45;

but I have the syntax wrong. What does '(>' instead of '=>' mean?
Thanks,
Jerome

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2004-09-14 23:35:07 Re: Spacing in output
Previous Message Jerome Lyles 2004-09-14 23:21:48 Re: Spacing in output