Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: query to find string which has last 5 characters as numbers
You can use something like that:
select * from tab
where translate(col,'0123456789','0000000000') like '%00000';
-- Have a nice day Michel anurag <aminochaNOamSPAM_at_unibiz.com.invalid> a écrit dans le message : 02a788f0.0da2ce5d_at_usw-ex0104-033.remarq.com...Received on Thu May 11 2000 - 00:00:00 CDT
> Hi,
> How do i write a query which will search a varcharchar column
> for all the records which have their last 5 characters as
> numbers.
>
> For example
> 'abcdef 12345'
> 'abcd 12'
> 'abcdwiwiwii 1234'
>
> It should return me the 1st record only as the other 2 records
> do not have last 5 characters as numbers.
>
> Please help!
>
> Thanks
> Anurag
>
> also reply at
> aminocha_at_UNIBIZ.COM
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
> The fastest and easiest way to search and participate in Usenet - Free!
>
![]() |
![]() |