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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 passing parameter inside wildcard

Author  Topic 

jung1975
Aged Yak Warrior

503 Posts

Posted - 2005-04-03 : 18:11:12
is there any way I can pass the parameters inside widecard?

select * from A
where p_name_last like '%@lname' and p_name_first like '%@fname'
order by p_name_last



Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-04-03 : 18:46:55
[code]
select
*
from
A
where
p_name_last like '%' + @lname and
p_name_first like '%' + @fname
order by
p_name_last

[/code]

CODO ERGO SUM
Go to Top of Page
   

- Advertisement -