SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Extract a number from a string with like
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 03/01/2013 :  04:40:56  Show Profile  Reply with Quote
if you dont want @mat table to be used, use query like


select *
from @product
where ',' + REPLACE(type_mat,' ','') + ',' LIKE '%,2,%'


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Lesombrero
Starting Member

Germany
43 Posts

Posted - 03/01/2013 :  04:43:59  Show Profile  Reply with Quote
Yes, of course! SORRY!!!
But why do we have to still go through the mat table?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 03/01/2013 :  04:44:38  Show Profile  Reply with Quote
quote:
Originally posted by Lesombrero

Yes, of course! SORRY!!!
But why do we have to still go through the mat table?


no need

see my latest suggestion

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Lesombrero
Starting Member

Germany
43 Posts

Posted - 03/01/2013 :  05:08:29  Show Profile  Reply with Quote
Great.
Didn't see the last suggestion before because it jumped first on page 2.
Thanks a lot.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 03/01/2013 :  05:28:17  Show Profile  Reply with Quote
you're welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000