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. sql question

sql question

Scheduled Pinned Locked Moved ASP.NET
databasequestionhelp
5 Posts 4 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.
  • E Offline
    E Offline
    eyeseetee
    wrote on last edited by
    #1

    Hi I am trying to select distinct fields from a table. The problem is some of them are still duplicating even with the distinct function there. Why would this be? Does the distinct function not work with every query?

    M M 2 Replies Last reply
    0
    • E eyeseetee

      Hi I am trying to select distinct fields from a table. The problem is some of them are still duplicating even with the distinct function there. Why would this be? Does the distinct function not work with every query?

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #2

      First this is not a SQL Forum.

      .netman wrote:

      The problem is some of them are still duplicating even with the distinct function there. Why would this be?

      Second you didn't provide your query.

      .netman wrote:

      Does the distinct function not work with every query?

      It does. Definitely, there is some problem with your query or the way you are expecting the result.

      Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

      E 1 Reply Last reply
      0
      • M Manas Bhardwaj

        First this is not a SQL Forum.

        .netman wrote:

        The problem is some of them are still duplicating even with the distinct function there. Why would this be?

        Second you didn't provide your query.

        .netman wrote:

        Does the distinct function not work with every query?

        It does. Definitely, there is some problem with your query or the way you are expecting the result.

        Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

        E Offline
        E Offline
        eyeseetee
        wrote on last edited by
        #3

        I needed to use group by clause which then helped eradicate the problem.

        A 1 Reply Last reply
        0
        • E eyeseetee

          I needed to use group by clause which then helped eradicate the problem.

          A Offline
          A Offline
          AprNgp
          wrote on last edited by
          #4

          u r right, this happens ... u may try to use WHERE clause (if possible)...

          Apurv

          1 Reply Last reply
          0
          • E eyeseetee

            Hi I am trying to select distinct fields from a table. The problem is some of them are still duplicating even with the distinct function there. Why would this be? Does the distinct function not work with every query?

            M Offline
            M Offline
            metallica_rock10
            wrote on last edited by
            #5

            Please provide the query.

            ASP.NET

            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