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)
 % for numeric vlaues

Author  Topic 

nicromonicon
Starting Member

8 Posts

Posted - 2008-04-27 : 09:59:51
hey guys..is there anything like '%' but for numeric values?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-27 : 10:33:46
Didnt get what you're looking for. Can you elaborate?
Go to Top of Page

nicromonicon
Starting Member

8 Posts

Posted - 2008-04-27 : 10:40:17
sure..when you say select * from items where name like '%' you want all items right?
but i want something like this
select * from items where item_number like '%'
but it gives me error
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-27 : 10:49:03
have you tried casting item_number and using?


select * from items where cast(item_number as varchar(10)) like '%'
Go to Top of Page

nicromonicon
Starting Member

8 Posts

Posted - 2008-04-27 : 10:59:16
wow! thanks visakh16 for fast reply :)
actually that went very well!!

..but what if i want to pass it a fucntion arguments?
select * from dbo.search('Camera','Camera',cast (@item_number as varchar (10))like '%'))
gives me errors
Go to Top of Page

nicromonicon
Starting Member

8 Posts

Posted - 2008-04-27 : 11:07:24
never mind,got it :) i changed it within the function itself

thank you SO MUCH visakh ,life saver ;)
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-27 : 12:08:54
quote:
Originally posted by nicromonicon

never mind,got it :) i changed it within the function itself

thank you SO MUCH visakh ,life saver ;)


you're welcome
Go to Top of Page
   

- Advertisement -