I'm not sure if I understood it,
but I think you want to load a table with some fields, concatenate them to create a string that can be send to the database as a query.
You could create a variable with a string and execute it with the $().
For example, I will create a variable with the code to generate a inlline table.
Then I execute it and the table is created:
let table = 'TABLE: LOAD * INLINE [
$(table); //the execution is here
You can create something similar to your queries.
Hope this helps,
Thankyou so much for your reply.
For the very first reload I will read .xls file and contruct the SQL SELECT statement, But for the next run I do not want to read the .xls file again. For this purpose as you have suggested, I will store the SQL statement in some variable and write it to the script. I will give it a try and get back to you. Thanks once again.