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 |
|
opi
Starting Member
29 Posts |
Posted - 2008-03-19 : 09:12:41
|
I've decalred this stored procedure with a simple where and like statement. The problem is I don't see any result.Here is my codecreate procedure sp_Select_ProfileNames @NameSearch varchar(50)as select ProfileFirstName +' '+ ProfileLastName as ProfileName from Profiles where ProfileLastName like '%@NameSearch%'; When i change this line:where ProfileLastName like '%@NameSearch%';to where ProfileLastName like '%Bil%';I see names starting with Bil, but when i enter Bil as param, I don't get anything.What's wrong here ? |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-03-19 : 09:14:51
|
| [code]where ProfileLastName like '%' + @NameSearch + '%'[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
opi
Starting Member
29 Posts |
Posted - 2008-03-19 : 09:16:03
|
| Fantastic, thanx |
 |
|
|
|
|
|