Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. search table + sql

search table + sql

Scheduled Pinned Locked Moved Database
database
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    costavo
    wrote on last edited by
    #1

    hi all, i have a value entered by user into a text box, i want to search the table for the detail of the entered text. plz provide me with the syntax to do such thing Regards

    J R 2 Replies Last reply
    0
    • C costavo

      hi all, i have a value entered by user into a text box, i want to search the table for the detail of the entered text. plz provide me with the syntax to do such thing Regards

      J Offline
      J Offline
      John ph
      wrote on last edited by
      #2

      you need to use LIKE operator to search for a given string. SELECT Column1,Column2 from Table1 where SearchColumn LIKE '%' + @SearchString + '%' hope this helps...


      Regards
      John


      1 Reply Last reply
      0
      • C costavo

        hi all, i have a value entered by user into a text box, i want to search the table for the detail of the entered text. plz provide me with the syntax to do such thing Regards

        R Offline
        R Offline
        Rami Said Abd Alhalim
        wrote on last edited by
        #3

        this solution if you use string Select * from tableName where ColumnName = '"+textbox.text+"' this solution if you use integer Select * from tableName where ColumnName = '+textbox.text+' Rami Abdalhalim

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups