Exact Name search using INSTR [message #40333] |
Sat, 28 September 2002 04:09 |
Bhagwan Singh
Messages: 23 Registered: December 2001
|
Junior Member |
|
|
Hi,
Thx orafaq for my prev reply.
I have now a major problem:
I get an input string of client full name as
"bhagwan singh mer"
i want to search for exact string in the above name say "bhagwan" or "singh" or "mer"
using INSTR Iam able to solve the problem BUT when i try to modify my input as
"bhagwanx singhx merx"
and still look for "bhagwan" or "singh" or "mer"
i should not get a match.
IN A WAY Iam looking for a procedure which does exact search in another string
sort of advance form of INSTR.
Can someone sent me his/her proc which i can use.it is very urgent.
bhagwan
|
|
|
Re: Exact Name search using INSTR [message #40334 is a reply to message #40333] |
Sat, 28 September 2002 05:01 |
chs
Messages: 31 Registered: December 2001
|
Member |
|
|
if b has values like
solomon suresh singh
sanjay kumar varma
rathor vijay singh
kumara vaidhya nathan
this query may help you
select
substr(b,1,instr(b,' ',1)) 1st ,
substr(b,instr(b,' ',1)+1,instr(b,' ',1,1)-1) 2nd ,
substr(b,instr(b,' ',1,2)) 3rd
from aaa
|
|
|