Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7756489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:50:14+00:00 2026-06-01T12:50:14+00:00

Can I, in a neat way do: SELECT * FROM tablename WHERE * LIKE

  • 0

Can I, in a neat way do:

SELECT * 
FROM tablename 
WHERE * LIKE '%something%';

Without having to do:

SELECT * 
FROM tablename 
WHERE ColA LIKE '%something%' 
   OR ColB LIKE '%something%' ...;

Running SQL Server 2008, I get error:

“Cannot use a CONTAINS or FREETEXT predicate on table or indexed view
‘tablename’ because it is not full-text indexed.

I don’t have full text index 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:50:15+00:00Added an answer on June 1, 2026 at 12:50 pm

    To build on @Bob Probst’s idea, you might try dynamic SQL like this:

    -- Set these!
    declare @tableName nvarchar(128)= 'MyTableName'
    declare @searchString nvarchar(max)= '%something%'
    
    -- Build SQL query
    declare @sql nvarchar(max)
    select @sql = isnull(@sql + 'or ', 'select * from ' + @tableName + ' where ' )
        + '[' + column_name + '] like ''' + replace(@searchString, '''', '''''') + ''' '
    from information_schema.columns
    where table_name = @tableName
        -- Could use this where clause for only comparing string fields (or eliminating image and such)
        --and data_type in ('varchar', 'char','nvarchar', 'nchar')
    
    -- Run SQL query
    print (@sql) -- For debug
    exec (@sql)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can't think of a neat way of doing this in java: I'm streaming sets
I've parsed several strings into Enum flags but can't see a neat way of
I am trying to figure out a neat way to remove unused factors from
I have a query like : SELECT .. FROM ... WHERE ... AND ISNULL(ICA.actual_appearance_date,
I see from the Postgres 8.1 docs that EXPLAIN generated something like tabular data:
I have thought out an IMHO neat way of handling checked Exceptions, like so:
i have another question on getting my XML serialization neat, which i can't seem
Can this be done? It seems like this should be possible. In general, I
I seem to remember seeing some neat way of calling InvokeRequired and Invoke to
Can I disable the non-exhaustive pattern matches warning only for lambdas? I like the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.