Quantcast
Channel: Toad Data Point Forum - Recent Threads
Viewing all articles
Browse latest Browse all 2544

Delete Statement Removes Critical Subquery

$
0
0

I am noticing that when I create a delete query, none of the where clause subqueries are used in the SQL. Switching to a select query shows them fine.

Example: 

--Select Statement:

SELECT * 

FROM tableA

WHERE

tableA.year = '2018' AND

tableA.ID IN 

(SELECT ID FROM tableB 

WHERE value = 'x')

--When switching to delete statement:

DELETE FROM tableA

WHERE tableA.year = '2018'

In the visual query builder, the subquery is still visible making it very misleading what is being deleted. The select statement captures <100 records whereas the delete statement deletes >10,000

Am I doing something wrong or does Toad Data Point not support simple subqueries in delete statements? 


Viewing all articles
Browse latest Browse all 2544

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>