- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
Гавнокод --
SELECT * FROM Table1
WHERE [Id] not in
(
SELECT min([Id]) FROM Table1
WHERE [Code] in
(
SELECT [Code] FROM Table1
GROUP BY [Code] HAVING count([Code]) > 1
)
GROUP BY [Code]
)
and [Id] in
(
SELECT [Id] FROM Table1
WHERE [Code] in (
SELECT [Code] FROM Table1
GROUP BY [Code]
HAVING count([Code]) > 1
)
)
Нормальний варіант --
SELECT * FROM Table1 AS a
WHERE [Id] not in
(
SELECT min([Id]) FROM a_ListParam
WHERE a_ListParam.[Code] = a.[Code]
)
WebKill_HochetVBan 12.07.2010 23:16 # 0
O_O 13.07.2010 08:54 # −4
nur 14.07.2010 08:57 # 0
WebKill_HochetVBan 15.07.2010 19:59 # 0
Lure Of Chaos 15.07.2010 16:05 # +1