-
searching fullname
Hi Dearest Friends,
I have an EMP table with column FULLNAME with sample:
FULLNAME
----------
DAVID ALRIDGE
ALRIDGE DAVID
DAVID ALRIDGE WRIGHT
DAVID WRIGHT ALRIDGE
LEDAVIDE CALRIDGER
Input data for search : DAVID ALRIDGE
I want to make a query for search such that all rows in the table are valid hit except LEDAVIDE CALRIDGEAR.
Its like this:
SELECT FULLNAME FROM EMP WHERE FULLNAME LIKE 'DAVID % ALRIDGE %'
OR FULLNAME LIKE 'ALRIDGE % DAVID %';
But I can not satisfy all conditions :(
Pls help.
Thanks
Last edited by yxez; 11-01-2007 at 09:38 AM.
Behind The Success And Failure Of A Man Is A Woman
-
if your solution doesn't work yet you have to keep thinking.
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
I did Pavd ....actually its over a week now that I am puzzled by It.
Can u help please....
Behind The Success And Failure Of A Man Is A Woman
-
Here is a hint...
Code:
Select Fullname
From Emp
Where Fullname Like '%DAVID%'
And Fullname Like '%ALRIDGE%'
;
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
Hi
I wish PAVB was my teacher who sets my term papers with genorous dose of hints :-)
regards
Hrishy
-
Originally Posted by PAVB
Here is a hint...
Code:
Select Fullname
From Emp
Where Fullname Like '%DAVID%'
And Fullname Like '%ALRIDGE%'
;
But I must use the fullname index bacause it contains millions of rows dear
Behind The Success And Failure Of A Man Is A Woman
-
EMP table as in EMPloyee table with millions of rows?
Don't worry, I really don't want to know.
On the other hand, as I said that was a "hint" not a solution; I'm pretty sure ontime you will be able to elaborate on it.
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|