locked
How to calculate the number of some entries duplicate contain the word in the column in sql server ? RRS feed

  • Question

  • example : I'm search for some text in columns use (where [all] like  'samei' and 'sudi' and 'majk') only

    before         ID          all

                        1        samei sudi

                        2        sudi majk

                        3        jax fadi

                        4        sudi samei

                        5        fadi  arm

    ------------------------------------------------

    after         ID          all             count

                          1           samei             2

                       2         sudi               3

                       3         majk              1

    Sunday, December 27, 2020 10:24 PM

Answers

  • I'd try asking for help over here.

    sql-server-transact-sql - Microsoft Q&A

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    • Proposed as answer by Dave PatrickMVP Wednesday, December 30, 2020 10:07 PM
    • Marked as answer by Guido Franzke Monday, January 4, 2021 8:24 AM
    Sunday, December 27, 2020 10:36 PM

All replies

  • I'd try asking for help over here.

    sql-server-transact-sql - Microsoft Q&A

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    • Proposed as answer by Dave PatrickMVP Wednesday, December 30, 2020 10:07 PM
    • Marked as answer by Guido Franzke Monday, January 4, 2021 8:24 AM
    Sunday, December 27, 2020 10:36 PM
  • Hi

    SELECT COUNT()
    FROM befor
    WHERE(all BETWEEN 'samei' AND 'majk')

    Best Regards.

    Please click the Mark as answer button and vote as helpful if this reply solves your problem.

    Sunday, December 27, 2020 10:49 PM