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
Hi David,
| 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;
You could try,
select substring(db, length(db) - 1, 2) from nlconfig;
The SQL you wrote would perhaps not work in any database
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