% WildCard

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OuTCasT
    Contributor
    • Jan 2008
    • 374

    % WildCard

    Hi guys.

    id like a gridview to display the results from the textbox search, but i want it to search the db for anything i type in and match it.

    sort of like

    [CODE=sql]select * from [tablename] where [columnName] LIKE '%%'[/CODE]
    but i want the value to be taken from the textbox.

    [CODE=sql]select * from [tablename] where [columnName] LIK '% + search.text + %'[/CODE]
  • OuTCasT
    Contributor
    • Jan 2008
    • 374

    #2
    hi guys nvm i got the solution

    [CODE=sql]Select * from [tableName] where [ColumnName] LIKE ('%' + @search + '%')[/CODE]

    Thanks anyways

    Comment

    • ck9663
      Recognized Expert Specialist
      • Jun 2007
      • 2878

      #3
      Build your query from your apps.

      -- CK

      Comment

      Working...