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)
 Help with sentence LIKE

Author  Topic 

junchan
Starting Member

2 Posts

Posted - 2004-08-12 : 11:31:41
Hi!

I'm new at these forums and new at sql programming, so I'm sorry if my questions sounds a bit noob .
Oh well, lets see.

I'm asking how can I do a LIKE with numbers.

Thanks for all!

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-08-12 : 11:36:52
select ...
from ...
where cast(intCol1 as varchar(50)) like '%123%'

or as you said it was integer, the server converts it itself so this is enough:

select ...
from ...
where intCol1 like '%123%'

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page

junchan
Starting Member

2 Posts

Posted - 2004-08-12 : 11:38:22
OMG! fast, thanks a lot!
Go to Top of Page
   

- Advertisement -