Hi all,
I'm relatively new to Sybase, and I was wondering how I perform an 'exception join' command. Normally I would use the following:
However when I try using EXCEPTION JOIN in Sybase, the complier returns an error, not recognising EXCEPTION. Instead I have to use SQL like this:
This statement, I've found runs a lot slower that the usual EXCEPTION JOIN commmand.
Any ideas on how I can perform an EXCEPTION JOIN in Sybase?
Thanks.
I'm relatively new to Sybase, and I was wondering how I perform an 'exception join' command. Normally I would use the following:
Code:
SELECT a.keyid
FROM tableA a
EXCEPTION JOIN
tableB b
ON a.keyid = b.keyid
However when I try using EXCEPTION JOIN in Sybase, the complier returns an error, not recognising EXCEPTION. Instead I have to use SQL like this:
Code:
SELECT a.keyid
FROM tableA
WHERE a.keyid NOT IN (SELECT b.keyid
FROM tableB b
WHERE a.keyid = b.keyid
)
This statement, I've found runs a lot slower that the usual EXCEPTION JOIN commmand.
Any ideas on how I can perform an EXCEPTION JOIN in Sybase?
Thanks.