distinct

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Atul Kumar Mishra
    New Member
    • Jul 2007
    • 1

    distinct

    Dear Sir,
    Please tell me, how to use more than one column with distinct in sql server which not display duplicate entry in a particular field.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    as u have posted a question in the article section it is being moved to SQL Server Forum

    MODERATOR

    Comment

    • srinit
      New Member
      • Jun 2007
      • 43

      #3
      Originally posted by Atul Kumar Mishra
      Dear Sir,
      Please tell me, how to use more than one column with distinct in sql server which not display duplicate entry in a particular field.
      Hi Atul,
      I am not clear with your requirement.any way use distinct keyword .it may help you

      Comment

      • RoninZA
        New Member
        • Jul 2007
        • 78

        #4
        Atul,

        The DISTINCT keyword removes all duplicate records, so in other words, every ROW in the resultset is unique, but you might still have duplicate information in columns.

        R

        Comment

        • hariharanmca
          Top Contributor
          • Dec 2006
          • 1977

          #5
          Atul Kumar Mishra,

          Code:
          select distinct <Field1>, <Field2>,Sum(<Value Field3>) from <Table Name>
          Wher <Condition> group by <Field2>
          the above query will show that if you select distinct row for morethan one column. You have to select similar to the above structure.

          it will select distinct for each column. So, there will be possible of one column without duplicate and other will select duplicate based on nonduplicated column.

          Comment

          Working...