473,386 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Filter duplicate value

how can I get the dm_partie unique on my SELECT query

SELECT DISTINCT Dm_partie,No_Membr,No_Advers FROM Parties_Simple AS PS
ORDER BY Dm_partie

Dm_partie No_Membr No_Advers
2010-10-03 14:27:40.000 07020 09030
2010-10-03 14:27:40.000 09030 07020
2010-10-03 14:27:42.000 09030 04038
2010-10-03 14:27:42.000 04038 09030

I would like to have

Dm_partie No_Membr No_Advers
2010-10-03 14:27:40.000 07020 09030
2010-10-03 14:27:42.000 09030 04038
Jan 8 '12 #1
4 1817
ck9663
2,878 Expert 2GB
Which No_Advers would you pick between the two?


~~ CK
Jan 8 '12 #2
@ck9663
the first one that is not equal to No_Membr

Thanks for your help
Jan 8 '12 #3
Rabbit
12,516 Expert Mod 8TB
I see no field(s) that define a record as the "first" one. And without such field(s), it'll be a little random which one you get.
Jan 9 '12 #4
ck9663
2,878 Expert 2GB
If there are only two sets of records and your trying to get the one where No_Membr <> No_Advers why not just use that condition.

Expand|Select|Wrap|Line Numbers
  1.  
  2. WHERE No_Membr <> No_Advers
  3.  
  4.  

Happy Coding!!!


~~ CK
Jan 9 '12 #5

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

Similar topics

0
by: Stanley | last post by:
How do I remove duplicate DataRow from a DataTable? I tried the DataTable.Select but the parameter not accept the "Distinct" keyword. Please advice. Thanks
5
by: lyne_asp | last post by:
Hello everbody, Please help me to remove the duplicate value. I have this code Do until objRSEmail.eof tgroup = objRSEmail("tEmailName")&"@city.com;"&tgroup ...
4
by: lucky13 | last post by:
Dear All, can u help in how to check the duplicate value in the listview control before adding new in the list. Regards Lucky13
1
by: vishwa Ram | last post by:
Hi ScriptFamily, I need to remove a duplicate value in array. Any specific method available in perl. pls suggest Regards Raam
3
by: spl | last post by:
What is the fastest way to find a duplicate value in an array of 10 elements. I have to find just any one first occurrence of the duplication. Lets say I have ary={10, 20, 40, 90, 30, 60, 35, 40,...
2
by: voroojak | last post by:
Hi I have a problem with duplicate values. in my table i have some customer that have more than 1 id. i can fine them with find duplicate values. but the problem is that i want to find those...
7
by: Joelle | last post by:
Hi all,i will strongly appreciate if someone could help me,to figure out how i can handel my problem. I have this report :" RequirementQuery_Report" and i have a command button that opens this...
3
by: poolboi | last post by:
hey guys, i'm stuck with finding a sql statement for filtering out duplicate entry i got like thousands of entry but i would like to put a filter on so i can see all the duplicate entries ...
28
by: MNNovice | last post by:
My Table “Cast” has these fields: cID (PK), cFName, cMName and cLName The form I am using to update this table is called fCast. I would like to prevent entering same name twice. To prevent...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.