List:General Discussion« Previous MessageNext Message »
From:Jon Drukman Date:July 15 2002 11:17pm
Subject:Re: how to retrieve the 2 last char of a string stored in db
View as plain text  
At 01:01 PM 7/15/2002, David yahoo wrote:
>how to retrieve the 2 last char of a string stored in db ? :
>
>SELECT LENGTH(db) as len , SUBSTRING(db from len-2 ) from nlconfig;
>
>NOT WORK .....!
>
>In php by example, there is a substr with a negative pos that give char at
>end ! no in mysql !

select right(db,2) from nlconfig;

-jsd-


Thread
Help with Insert.. Select From... Querykarl 14 Jul
  • Re: Help with Insert.. Select From... QueryDiana Soares15 Jul
    • RE: Help with Insert.. Select From... QueryKarl Stubsjoen15 Jul
      • how to retrieve the 2 last char of a string stored in dbDavid yahoo15 Jul
        • RE: how to retrieve the 2 last char of a string stored in dbShashank Tripathi15 Jul
        • Re: how to retrieve the 2 last char of a string stored in dbJon Drukman16 Jul