GridDB Cloud does not support the DELETE ... USING
syntax that is available in PostgreSQL and some other databases.
For single-table deletes, you need to use a simpler DELETE
with a WHERE
condition. For example, instead of:
DELETE FROM SensorInventory a
USING SensorInventory b
WHERE a.sensor_id = b.sensor_id
AND b.status = 'INACTIVE';
You can run a subquery in the WHERE
clause, such as:
DELETE FROM SensorInventory
WHERE sensor_id IN (
SELECT sensor_id
FROM SensorInventory
WHERE status = 'INACTIVE'
);
This will remove all rows where the sensor_id
matches an entry marked as INACTIVE
.
So the issue is not with the data, but with the SQL dialect — GridDB Cloud has its own supported SQL syntax, which does not include multi-table deletes.