I am facing one issue like below:
Table1-> column1 is having value like: 'abc','def','ghi'
i want to fetch all the records from Table2 having the same values in Column2 of this table.
Please do give your suggestions.
sel * from tab2 where col2 in ( select col1 from table1 where <condition>);
output: No Records found.
sel * from tab2 where col2 in ( 'abc','def','ghi');
output: 3 records found.
select col1 from table1 where <condition> ;
What's your TD release?
In TD14 you might utilize STRTOK_SPLIT_TO_TABLE like:
WITH cte (col1) as
select col1 from table1 where <condition>
sel * from tab2 where col2 in
FROM TABLE (STRTOK_SPLIT_TO_TABLE(1,
RETURNS (outkey INTEGER,
token VARCHAR(20) CHARACTER SET UNICODE)
) AS d