Hi,
I'm trying to write the following
DELETE
FROM TABLEA
WHERE TABLEA.ID IN (SELECT DISTINCT(ID)||'%' FROM INVALID_IDS)
The idea is that table INVALID_IDS could have an entry of '12' and so all entries starting 12xxx would be deleted. INVALID_IDS could also contain ABC so all entries starting ABCxxx would go. Unfortunatel the way I've written it, the WHERE clause does a direct comparison against the % rather than treat it as a wildcard. Any suggestions would be massively appreciated.
Thanks.
I'm trying to write the following
DELETE
FROM TABLEA
WHERE TABLEA.ID IN (SELECT DISTINCT(ID)||'%' FROM INVALID_IDS)
The idea is that table INVALID_IDS could have an entry of '12' and so all entries starting 12xxx would be deleted. INVALID_IDS could also contain ABC so all entries starting ABCxxx would go. Unfortunatel the way I've written it, the WHERE clause does a direct comparison against the % rather than treat it as a wildcard. Any suggestions would be massively appreciated.
Thanks.