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

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

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2009-08-31 14:53:08 Re: print/return only the first X chars of a varchar column?
Previous Message Adrian Klaver 2009-08-31 14:34:15 Re: Query and the number of row result