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)
 Having problems with Like and a variable

Author  Topic 

DrewBurlingame
Starting Member

49 Posts

Posted - 2001-05-03 : 11:24:41
Hi,
I'm using ASP 2.0 with SQL Server 7.0.

I've got this part of a where statement
(rh.ReqNum LIKE @strReqNum or @strReqNum is null)
and I'm having problems with it.

ReqNum has values like 'QLR0005225'. In my web form, I want to be able to enter '%25' and retrieve every ReqNum that ends in 25, but it doesn't retrieve any records unless I use the whole 'QLR0005225' value. I don't know what I'm doing wrong.

Thanks,
Drew

   

- Advertisement -