LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 10-12-2001, 08:13 AM   #1
glj
Member
 
Registered: Jul 2001
Location: London
Distribution: RH 9
Posts: 151

Rep: Reputation: 30
SQL statement


Anybody know or can figure out a statement that would do an opposite of a distinct statement
i.e. return all the entries that are duplicate rows.

Cheers

glj
 
Old 10-12-2001, 10:29 AM   #2
daholygoat
LQ Newbie
 
Registered: Oct 2001
Distribution: Debian
Posts: 8

Rep: Reputation: 0
SELECT DISTINCTROW TempTable.Au_ID,
TempTable.Author, TempTable.[Year Born]
FROM TempTable
WHERE ((
(TempTable.Au_ID) IN
(SELECT [Au_ID] FROM [TempTable] As Tmp
GROUP BY [Au_ID] HAVING Count(*)>1)))
ORDER BY TempTable.Au_ID;

doesn't work on all RDBMS's tho, you might wanna do it through a script instead
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL statement to get the last row in a table oulevon Programming 11 04-03-2009 09:30 PM
help with simple sql statement sekelsenmat Programming 6 08-06-2005 01:01 PM
Migrating from MS-SQL server to My-SQL emailssent Linux - Networking 2 02-07-2005 03:20 PM
Which SQL is suitable for EMbedded SQL on C? hk_michael Programming 4 01-10-2005 06:07 PM
mysql sql statement help mrtwice Programming 4 12-02-2003 11:04 AM


All times are GMT -5. The time now is 06:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration