You are here: Wildcards On Columns? « MsSQL Server « IT news, forums, messages
Wildcards On Columns?

Posted by cyber0ne on 11/29/05 17:47

My use of wildcards thus far has been limited to matching a given
string anywhere in a column as follows:

SELECT * FROM Table WHERE Column LIKE '%string%'

However, I'm wondering if there's a way to do this in reverse. That
is, is there a way to match the column anywhere in the string?
Pseudo-coding it as:

SELECT * FROM Table WHERE 'string' LIKE %Column%

What I'm trying to match is network addresses. Most of the stored
addresses in this table are exact (i.e. ip-1-2-3-4.location.isp.com)
but sometimes they encompass an entire group (i.e. location.isp.com).
When an exact address is given in the code I'm writing, it needs to
match any rows that contain its exact self or contain a shortened
version of which it is part.

Any ideas?


-cyber0ne
http://www.cyber0ne.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация