0

This probably has a simple solution, although it is made a little more difficult because of the way the database is constructed, it isn't mine. A column in the database has a text value that is of the form text1DDtext2DDtext3, where DD is a delimiter that they through in rather than having a separate table for 0 to n values that go in that column.

There is a search that is executed where what I have to start with is:

 "text1","text2", "text3", . . .

All I want to do is build on a query that checks to see if any of the "textn" strings are in the column field, although it would be nice to have a query that also checked to see if all of the search string text values are in the column value. The order in which they are stored in the column can vary, as can the search string. If there was a linked table that just had single values in a column it would not be very hard.

I've just various combinations of IN and LIKE, and that doesn't seem to work.

Thanks.

Pathik Vejani
  • 4,263
  • 8
  • 57
  • 98
SScotti
  • 2,158
  • 4
  • 23
  • 41

1 Answers1

1

try:

SELECT columnYouWant FROM dbo.table WHERE UPPER(column) LIKE ('%TEXT%');
Edward
  • 864
  • 1
  • 7
  • 29