Please help on SQL
Date: 1998/03/25
Message-ID: <01bd582b$f2b79f00$83819f96_at_dunt0538>#1/1
Hi Gurus,
I am looking for the efficient way to construct SQL statement for following
requirement, and I seem to be running out of ideas.
following is the table and some sample data,
Basically, I want to retrieve column A and Column B from all those records
In other words, I want something like this,
Select pp.a, pp.b from foo pp where
Table foo : Column a Column b Column c Column d
111 222 0000 999
111 223 0000 4000
111 223 4001 5000
222 333 3333 4444
333 444 0000 3000
333 444 3001 5000
table foo where there is more than one entry for each column A and column B
a b
-- --
111 223
333 444
(Following is **NOT** a SQL statement, I just used to convey the idea)
(select count(*) from foo yy where yy.a = pp.a and yy.b = pp.b ) > 1;
Thanks in advance,
-- Shetal Sheth sheths_at_bobcat.ent.ohiou.eduReceived on Wed Mar 25 1998 - 00:00:00 CET