Something like
SELECT <list>
FROM TABLE OuterTable
WHERE Col1 = (SELECT MIN(col1) FROM TABLE InnerTable WHERE InnerTable.Col2 =
OuterTable.Col2)
--
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"gato" <anonymous (AT) discussions (DOT) microsoft.com> wrote
Quote:
My table looks like this:
1 A B 6 C 8
2 A B 6 C 8
3 A B 6 C 9
4 A B 7 C 9
5 A B 7 C 9
I want to get just the first record (1 A B 6 C 8) based on
the second colunm.
Thanks |