Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
I want to read country names from a simple xslx file (just one column with the names of the countries) and use this content as a condition in a sql statement which I use in a tMSSQLInput.
the sql statement would look like this:
select * from Table1 where
countryNames in ( "content of the xlsx file")
I have tried a few things, such as tBuffer, but i don't know how to save the content of the file and use it in the the where-clause of the tMSSQLInput component.
Can you kindly help me here?
Thank you!
greets from Germany
Hello,
If we understand your requirement very well, you could use context variable in the SQL query.....
"SELECT *
FROM TABLE
WHERE countryNames = " +context.YourContext(content of the xlsx file)
The Job looks like:
tFileInputExcel--main(row1)--tFlowToIterate--iteate--tJava--oncomponnetOK-->tMSSQLInput--main-->other components
on tJava:
context.countryNames=row1.countryNames;
Feel free to let us know if it is OK with you.
Best regards
Sabrina