Thread: Substring from end of string

Substring from end of string

From
"Tille, Andreas"
Date:
Hello,

I have to port a MS SQL implemented application.  There is a string
function called "Right(string,num)" which returns num characters
from the end of the string.

I did nout found something in functions-string.html which might
fit for this purpose.

Any hint?

Kind regards

        Andreas.

Re: Substring from end of string

From
"Joel Burton"
Date:
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Tille, Andreas
> Sent: Thursday, May 23, 2002 4:12 AM
> To: PostgreSQL General
> Subject: [GENERAL] Substring from end of string
>
>
> Hello,
>
> I have to port a MS SQL implemented application.  There is a string
> function called "Right(string,num)" which returns num characters
> from the end of the string.
>
> I did nout found something in functions-string.html which might
> fit for this purpose.
>
> Any hint?
>
> Kind regards

To find the last 3 characters of a:

substring ( a from length (a) - 2 );

- J.

Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton
Knowledge Management & Technology Consultant