Home » SQL & PL/SQL » SQL & PL/SQL » find repetitive digit in a number
find repetitive digit in a number [message #3008] Thu, 29 August 2002 04:55 Go to next message
Gunjan Vaishnav
Messages: 1
Registered: August 2002
Junior Member
hi,

I have a table of one column (say account number) its a 10 digit number.. From this table i have to find out those numbers which are having any digits more than 3 times in sequence..
Say some sample data is like
1000012342,2323432323,9098787677,0987888907...
now when i process that data i should have those numbers which are having any digits more than 3 times in sequence any where...
so, 1000012342 and 0987888907 i should get...

Can anyone help me?
Thanks..

-Gunjan
Re: find repetitive digit in a number [message #3012 is a reply to message #3008] Thu, 29 August 2002 08:04 Go to previous message
Michael
Messages: 61
Registered: October 1999
Member
a simple but inefficient way to do this is to use
like to search for the occurances in the number.

Therefore: -

select * from table where
number like '%000%'
or number like '%111%'
or number like '%222%' etc.
Previous Topic: sql command disable
Next Topic: using sql plus to extract to csv from multiple tables?
Goto Forum:
  


Current Time: Thu Mar 28 05:41:36 CDT 2024