title: Use SQL 'like' in Pandas with input()
body: <p>so I'm using the code below to SELECT columns FROM a certain table in SQL Server.</p>
  
  <pre><code>sus_base = pd.read_sql_query("SELECT screen_name, user_id, text FROM [dbo].[TABLE_ONE]", con)
  df1 = pd.read_sql_query("SELECT screen_name, user_id, text FROM [dbo].[TABLE_ONE] WHERE text like '%car%'", con)
  df2= pd.read_sql_query("SELECT screen_name, user_id, text FROM [dbo].[TABLE_ONE] WHERE text like '%plane%'", con)
  df3= pd.read_sql_query("SELECT screen_name, user_id, text FROM [dbo].[TABLE_ONE] WHERE text like '%quality%'", con)
  </code></pre>
  
  <p>But, I have to do this matching for a lot of strings. I tried the following in Python which did not work:</p>
  
  <pre><code>test = pd.read_sql_query(("SELECT screen_name, user_id, text FROM [dbo].[TABLE_ONE] WHERE text like '%s%'", input()), con)
  </code></pre>
  
  <p>It gives me the following error, after asking me for input:</p>
  
  <pre><code>DatabaseError: Execution failed on sql '("SELECT screen_name, user_id, text FROM [dbo].[TABLE_ONE] WHERE text like '%s%'", "'car'")': bytes or integer address expected instead of tuple instance. 
  </code></pre>
  
  <p>And yes, I also tried it without the '' quotes around car.</p>
  
  <p>df1 would then look like:</p>
  
  <pre><code>JAN | 20938 | Hi I am looking for a car somewhere
  BOB | 38470 | Guys, where is my plane?
  ELSA| 49850 | Never know what to do next..
  CARL| 08923 | The quality of this product is amazing!
  ETC.
  </code></pre>
  
  <p>You can imagine it would be a lot of work to create this. So it would be nice if the end-user can just type in the word he is looking for in the string of texts and it would return those texts like it would when I type them in the example above. Then I'll make sure it gets into a dataframe and/or Excel file.</p>