czxczxc

Sql code posted
created at 21 Jan 15:13, updated at 01 Feb 03:25

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
DECLARE @tmp TABLE(
  nID int
)

INSERT INTO @tmp
SELECT DISTINCT a.nID FROM tAirportList a, tCSMList b WHERE a.cCode = b.cCode

INSERT INTO @tmp
SELECT DISTINCT a.nID FROM tAirportList a, tCSMList b WHERE b.cSpokes LIKE '%'+a.cCode+'%'

SELECT * FROM tAirportList WHERE nID NOT IN (SELECT DISTINCT nID FROM @tmp)
322 Bytes in 2 ms with coderay