-
SQL Anywhere
Can a query which includes a NOT EXISTS subquery be rewritten with a join?
Many thanks.
-
With a left outer join it should work. I do not know the exact syntac in SQl Anywhere, but in T-SQL it would look like this (assuming that TableA contains the records to display, and TableB the records you want to exclude.
SELECT A.*
FROM TableA As A
LEFT OUTER JOIN TableB As B ON A.keyfild = B.keyfield
WHERE b.keyfield IS NULL
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|