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
 Transact-SQL (2000)
 How to compare a colon separated text?

Author  Topic 

batanyah
Starting Member

5 Posts

Posted - 2009-11-03 : 03:03:28
How do i search a colon separate text on a column?

Here is a example:

this is what i am going to search: "asp_net_forums"

on a column on my database

[types_of_forums]
sql_server_forums:asp_net_forums:c_sharp_forums

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-11-03 : 04:18:04
http://www.sommarskog.se/arrays-in-sql-2005.html

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2009-11-03 : 15:04:41
First, you shouldn't. But, if you must, there are several ways to do it. You can do some array/string parsing (which I think is in the link Madhivanan posted above) or you can you full text indexing or you can use a LIKE clause or <insert method here> Here is a quick LIKE clause example:
[CODE]
SELECT *
FROM MyTable
WHERE types_of_forums LIKE '%asp_net_forums%'[/CODE]
Go to Top of Page
   

- Advertisement -