I have written the following query:
SELECT TBSPACE FROM SYSCAT.TABLES WHERE TYPE='T' AND (TABNAME LIKE '%_ABS_%' OR TABNAME LIKE '%_ACCT_%')
This gives me a certain amount of results. Now the problem is that I have multiple TABNAME
to select using the LIKE
operator (~200). Is there an efficient way to write the query for the 200 values without repeating the TABNAME LIKE
part (because there are 200 such values which would result in a really huge query) ?
(If it helps, I have stored all required TABNAME
values in a table TS
to retrieve from)