Home » SQL & PL/SQL » SQL & PL/SQL » Duplicate value in a single column
Duplicate value in a single column [message #276341] Wed, 24 October 2007 22:46 Go to next message
kamragulshan
Messages: 63
Registered: May 2005
Location: Delhi
Member
I have to find out the duplicate values in a single column but the condition is something different.
Table Name is "Actions" and columns are "Sessionid","Dataset" and "idnumber"
The values in "Dataset" like 'A1','A2','B1','B2' and sessionid should be unique, idnumber (the column have duplicate values).
Now that value can be exist for "Dataset" 'A*','B*' but should not repeat in 'A1' and 'A2'.
Please help me to find out the duplicate rows.
Please let me know if further information required.

Thanks in Advance
Re: Duplicate value in a single column [message #276344 is a reply to message #276341] Wed, 24 October 2007 22:56 Go to previous messageGo to next message
BlackSwan
Messages: 25038
Registered: January 2009
Location: SoCal
Senior Member
>Now that value can be exist for "Dataset" 'A*','B*' but should not repeat in 'A1' and 'A2'.
>Please help me to find out the duplicate rows.
>Please let me know if further information required.

1) Problem statement is as clear as mud.
2) Desired results? see #1 above
3) Requirement of what is or is not a duplicate? See #2 & #1


Provide sample table data, desired results & unambiguous explanation why each row or is NOT included in desired output

http://www.orafaq.com/forum/t/88153/0/
Re: Duplicate value in a single column [message #276352 is a reply to message #276341] Wed, 24 October 2007 23:28 Go to previous messageGo to next message
kamragulshan
Messages: 63
Registered: May 2005
Location: Delhi
Member
please see below the sample output:

Sessionid Dataset Idnumber
171274 D64 27088391
123072 F13 27088391
152934 D57 27088391
153101 D66 27088391
170150 D64 27088391

Here D?? belong to Denmark
and F?? belong to France

In the above sample output the idnumber that are duplicating cannot be repeat for D64,D66 it can be occur only once for country and can be the same value in France but should not be repeat.

I have some inconsistency in my data and now i need to find out how many values in idnumber column are repeating for a particular countries dataset like the same value in D64,D57, D66 and again D64.

Please suggest the query to get the desired results.

Thanks
Re: Duplicate value in a single column [message #276370 is a reply to message #276352] Thu, 25 October 2007 00:52 Go to previous message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You didn't read the link Ana posted.

Regards
Michel
Previous Topic: Mutating Trigger..... Help Me
Next Topic: PL/SQL table Searching logic
Goto Forum:
  


Current Time: Mon Dec 05 15:06:22 CST 2016

Total time taken to generate the page: 0.11857 seconds