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
 SQL Server Development (2000)
 SQL Clarification

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-12-01 : 08:36:31
svk writes "Pl Correct my query...

DECLARE @ecode char(11)

select @ecode = 'END'

print @ecode

SELECT ecode,ename,line,rule1 from calin
where rule1 like @ecode

Issue is how to handle variable in Like Condition

Tks in advance
svk"

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-12-01 : 08:38:05
[code]SELECT ecode,ename,line,rule1 from calin
where rule1 like '%' + @ecode + '%'[/code]

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page
   

- Advertisement -