Hello!
Scenario:
Source table (Oracle 11) -> Query with WHERE -> Target
I have created global varchar(2000) variable $id_temp with ID values like 1,2,3,4,5,6… and so on till 2000 characters are filled.
In Query I select all fields from source and use WHERE with Source_table.ID IN ($id_temp).
Optimized SQL looks great, but job execute with oracle error because query changes to SELECT ID, field2, fieldn FROM Source_table WHERE ID IN ('1,2,3,4,5,6…’). Quotes at start and end of variable values are causing error. Using replace_substr will remove WHERE part of SQL.
How to get rid of thees single quotes?
I can’t use SQL because then variable will be read as varchar(1020).
TasTur (BOB member since 2017-10-04)