Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group