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. Web Development
  3. ASP.NET
  4. Is there any function in SQL which returns the number of matching words between parameter and data in database

Is there any function in SQL which returns the number of matching words between parameter and data in database

Scheduled Pinned Locked Moved ASP.NET
database
2 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.
  • Y Offline
    Y Offline
    yogita charhate
    wrote on last edited by
    #1

    hello, I want to sort the result of the search result according to the descending order of number of matching words in entered text and the particular record in a database. thank you.

    yog hui gfgh kgdgrt njjn hjgkn

    M 1 Reply Last reply
    0
    • Y yogita charhate

      hello, I want to sort the result of the search result according to the descending order of number of matching words in entered text and the particular record in a database. thank you.

      yog hui gfgh kgdgrt njjn hjgkn

      M Offline
      M Offline
      mghiassi
      wrote on last edited by
      #2

      Hi, If you can use stored procedure this way is a good sulotion CREATE PROCEDURE Search_ALLV -- Add the parameters for the stored procedure here (@SearchP nvarchar(50), AS BEGIN SET NOCOUNT ON; BEGIN TRY SELECT @SearchP = '%' + RTRIM(@SearchP) + '%' SELECT Title,Advisor,PhysicalProgress,RialProgress,Photo1,Photo2 FROM ALLV_View WHERE Advisor LIKE @SearchP ORDER BY Advisor END TRY BEGIN CATCH SELECT ERROR_PROCEDURE() AS ErrorProcedure; END CATCH END you can call this procedure by the words in entered text as an Argument GO

      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