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)
 Wild Card - SQL

Author  Topic 

ramdas
Posting Yak Master

181 Posts

Posted - 2002-07-17 : 11:55:48
Hi Folks,
For searching patterns in Strings we can use the LIKE combined with '%', likewise can I perform wilcard searches on Numeric values.
For ex:
SELECT * FROM Orders
WHERE price LIKE ....
Any help is appreciated.

Thank you
Bye

Ramdas Narayanan
SQL Server DBA

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-07-17 : 12:00:39
Hmmm...that's the first time I've heard anyone ask about matching patterns in numerics!

You can try this, although I can't vouch for how effective it will be:

SELECT * FROM Orders
WHERE Cast(price AS varchar) Like '%123%'


Exactly what kind of 'pattern matching' are you looking to do?

Go to Top of Page

ramdas
Posting Yak Master

181 Posts

Posted - 2002-07-17 : 13:15:53
Hi,
Thanks for the reply. Actually I worked on changing the design which now helps me to use range of values, i was not too comfortable doing pattern matching with numeric fields.

Bye
Ramdas

Ramdas Narayanan
SQL Server DBA
Go to Top of Page
   

- Advertisement -