Re: Extract last 4 characters from string? - Mailing list pgsql-general

From D. Dante Lorenso
Subject Re: Extract last 4 characters from string?
Date
Msg-id 476059B2.7010204@lorenso.com
Whole thread Raw
In response to Re: Extract last 4 characters from string?  ("Rodrigo De León" <rdeleonp@gmail.com>)
List pgsql-general
Rodrigo De León wrote:
> On Dec 12, 2007 4:11 PM, D. Dante Lorenso <dante@lorenso.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: data type change on a view
Next
From: Ben
Date:
Subject: Insert/Update/Delete views with INSTEAD OF