Re: print/return only the first X chars of a varchar column?

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Kevin Kempter <kevink(at)consistentstate(dot)com>
Subject: Re: print/return only the first X chars of a varchar column?
Date: 2009-08-31 14:53:08
Message-ID: 200908310753.09061.aklaver@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday 31 August 2009 7:49:12 am Kevin Kempter wrote:
> Hi all;
>
> I'm selecting from a table that has a varchar(1000) but I only want to
> display the firs 20 characters. Looked at the string functions in the docs
> but nothing jumped out...
>
> Suggestions?
>
>
> Thanks in advance

substring(string [from int] [for int])

--
Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc Munro 2009-08-31 15:31:55 Looking for "proper" escape string syntax from pg_get_constraintdef
Previous Message Kevin Kempter 2009-08-31 14:49:12 print/return only the first X chars of a varchar column?