Re: Extract last 4 characters from string?

From: "D(dot) Dante Lorenso" <dante(at)lorenso(dot)com>
To: Rodrigo De León <rdeleonp(at)gmail(dot)com>
Cc: Postgres-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Extract last 4 characters from string?
Date: 2007-12-12 21:59:14
Message-ID: 476059B2.7010204@lorenso.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rodrigo De León wrote:
> On Dec 12, 2007 4:11 PM, D. Dante Lorenso <dante(at)lorenso(dot)com> wrote:
>> Is there an easy (preferred) method that I'm missing?
> select substring('ABCDEFGHIJKLMNOP' from '....$');

Thanks! Now, since I'd like to see a number in there, I'll do this:

SELECT SUBSTRING('ABCDEFGHIJKLMNOP' FROM '.{4}$');

That does look a lot better than what I was cooking up ... appreciate
the help!

-- Dante

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2007-12-12 22:58:46 Insert/Update/Delete views with INSTEAD OF
Previous Message Ivan Sergio Borgonovo 2007-12-12 21:58:52 Re: Extract last 4 characters from string?