469,920 Members | 2,414 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,920 developers. It's quick & easy.

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.
Jul 18 '07 #1
4 1321
debasisdas
8,127 Expert 4TB
as u have posted a question in the article section it is being moved to SQL Server Forum

MODERATOR
Jul 19 '07 #2
srinit
43
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
Jul 19 '07 #3
RoninZA
78
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
Jul 19 '07 #4
hariharanmca
1,977 1GB
Atul Kumar Mishra,

Expand|Select|Wrap|Line Numbers
  1. select distinct <Field1>, <Field2>,Sum(<Value Field3>) from <Table Name>
  2. 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.
Jul 19 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by ben | last post: by
5 posts views Thread by Martin Feuersteiner | last post: by
2 posts views Thread by mfyahya | last post: by
4 posts views Thread by Johnson, Shaunn | last post: by
reply views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.