By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 804 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

Neet to Select same IDs from tbl

missshaikh
P: 43
My Table Product . i need to Select same IDs in this Table.
________________
| ProductID | Name
---------------------------
| 12 | LapTop
| 14 | HHD
| 12 | PC
| 72 | Mouse
| 72 | HHD
~~~~~~~~~~~~~~

the result that i need that is
12
72
-----
Mar 20 '07 #1
Share this Question
Share on Google+
3 Replies


Rabbit
Expert Mod 10K+
P: 12,347
There is a find duplicates query wizard.
Mar 20 '07 #2

missshaikh
P: 43
There is a find duplicates query wizard.
Thanks for your Answer.
:) I use This Query and my work is done.

SELECT Distinct (temp.productID) , simfreephones.*
FROM simfreephones INNER JOIN temp ON simfreephones.simfreemodelID = temp.productID
WHERE (((temp.productID) In (SELECT productID FROM [temp] As Tmp GROUP BY [productID] HAVING Count(*)>1 )));
Mar 21 '07 #3

Rabbit
Expert Mod 10K+
P: 12,347
Thanks for your Answer.
:) I use This Query and my work is done.

SELECT Distinct (temp.productID) , simfreephones.*
FROM simfreephones INNER JOIN temp ON simfreephones.simfreemodelID = temp.productID
WHERE (((temp.productID) In (SELECT productID FROM [temp] As Tmp GROUP BY [productID] HAVING Count(*)>1 )));
Not a problem, good luck.
Mar 21 '07 #4

Post your reply

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