For fellow code monkeys: SQL select statement to find repeated data in a column

Monster SQL - Monster SQL in black and red with teeth
Singapore
April 20, 2007 1:13am CST
Was wondering how many fellow code monkeys are in myLot.. There is an Oracle SQL statement to identity repeated data in a column, pretty handy when you are trying to clean a table Select fld_NoRepeat a From tld_Repeat Where (Select Count(b.fld_NoRepeat) From tbl_Repeat b Where b.fld_NoRepeat= a.fld_NoRepeat) 1 Alter, fire and tell me what you think:p
1 person likes this
2 responses
• United States
20 Apr 07
This works for Oracle huh? Wouldn't it works for other SQL database too? I am a monkey, but no code monkey. ^_^ I haven't written SQL for months, I forgot most of it. But it look like it works, if u are finding where in that table with repeated data. I don't know.
1 person likes this
• Singapore
21 Apr 07
I've tested it in mySQL as well, seems to work fine. I guess it would work in MS as well (shivers at the thought of ms)
• China
20 Apr 07
relation two table?
1 person likes this
• Singapore
20 Apr 07
Actually its just one table pointing to itself :p