|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 7:04 AM
Points: 169,
Visits: 433
|
|
Hi,
is there a simpler way to search for a partcular string in different columns in a table. currently I have the following case statement. it's working fine but I was wondering if there is another way to do it?
case when tbl_Name.Col_1=1 or tbl_Name.Col_2 like '%MyString%' Or tbl_Name.Col_3 like '%MyString%' or tbl_Name.Col_4 like '%MyString%' or tbl_Name.Col_5 like '%MyString%' Then 1 else 0 End
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Yesterday @ 9:56 AM
Points: 4,418,
Visits: 7,156
|
|
Have you tried Full Text Indexing?
John
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 7:04 AM
Points: 169,
Visits: 433
|
|
| I have never used it before may you please post example
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, May 03, 2013 8:54 AM
Points: 113,
Visits: 890
|
|
|
|
|