Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-05-23 : 21:08:00
|
Arvind writes "Hi, OS : WinNT SQl Server Version : 7.0 Actually there are 26 fields in my Customer table but i'm concerned only about 3 fields in the table they are viz. 1) Fname 2) Mname 3)Lname
My Problem is : I have One text box in my front end search screen where user can enter either of the three names of a customers or customers full name which may contain his all 3 names.
I'm getting the result if the user enters only Fname,Mname or Lname by using where condition " select..... where Fname like "%John%" or Mname Like "%John%" or Lname like "%John%"..." but what if the user enters the whole of the name in the text box i.e he enters Lname Fname Mname but as these are in a seperate 3 fields in the database. Is there any way where i can concatinate all the three names in my select statement and compare it with the string which I get from the text box within the select statement. So that my fourth condition in my where condition should be .......like "% text box value%".
Thanks
Arvind" |
|
|
|
|
|