Discussion:
t-sql question
(too old to reply)
unknown
2009-11-23 12:46:43 UTC
Permalink
hello

how to write in t-sql a statement like:

where a like %@variable%

in other words, everything that contains @variable
(@variable is varchar)

thx
mpeppler@peppler.org [Team Sybase]
2009-11-23 14:46:35 UTC
Permalink
hello
select @variable = '%' + @variable + '%'

select ... where a like @variable

Michael
Carl Kayser
2009-11-23 14:48:25 UTC
Permalink
hello
thx
where a like '%' || @variable || '%'

Loading...