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. Need Query for Searching Name from database.

Need Query for Searching Name from database.

Scheduled Pinned Locked Moved Database
databasealgorithmshelp
4 Posts 2 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.
  • M Offline
    M Offline
    mithun narayanan
    wrote on last edited by
    #1

    i need a query for checkin a name whether it exists or not in database,, am storing firstname nd lastname in seperate columns. bt if i enter a first name only in textbox i need to display all names(firstname+lastname) ,starting from the entered first name PLZ HELP... Waiting 4 reply...

    T 1 Reply Last reply
    0
    • M mithun narayanan

      i need a query for checkin a name whether it exists or not in database,, am storing firstname nd lastname in seperate columns. bt if i enter a first name only in textbox i need to display all names(firstname+lastname) ,starting from the entered first name PLZ HELP... Waiting 4 reply...

      T Offline
      T Offline
      Thats Aragon
      wrote on last edited by
      #2

      Hi Mithun, Please try this. Hope it will help you. if exists(select ID from Tablename where nameFirst like '%Your TextBox Value%') select nameFirst + SPACE(1) + nameLast As Name from Tablename where nameFirst like '%Your TextBox Value%'

      Keep Smiling :)

      M 1 Reply Last reply
      0
      • T Thats Aragon

        Hi Mithun, Please try this. Hope it will help you. if exists(select ID from Tablename where nameFirst like '%Your TextBox Value%') select nameFirst + SPACE(1) + nameLast As Name from Tablename where nameFirst like '%Your TextBox Value%'

        Keep Smiling :)

        M Offline
        M Offline
        mithun narayanan
        wrote on last edited by
        #3

        Thank u Boss its Workin nw... :-D bt am passing the name as a parameter where cand_fname like @cand_fname its nt wrking bt if give as cand_fname like 'mith' this works so how change that

        M 1 Reply Last reply
        0
        • M mithun narayanan

          Thank u Boss its Workin nw... :-D bt am passing the name as a parameter where cand_fname like @cand_fname its nt wrking bt if give as cand_fname like 'mith' this works so how change that

          M Offline
          M Offline
          mithun narayanan
          wrote on last edited by
          #4

          k i got that ive changed to where cand_fname like '%'+@cand_fname+'%' thnk u..... :-D

          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