Example 4 Efficient For Loop in Talend
String Col="abcd,efg";
String[] filters = col.split(",");
String CFILTER = "WHERE ( ";
for(String filter : filters ) {
CFILTER += " OR (\"STATUS\" LIKE '%"+filter+"%')";
}
The above split function will split the passed string into multiple rows.
for loop will be iterating till the last row.
we don't have to mention any start/end in the for loop.
String[] filters = col.split(",");
String CFILTER = "WHERE ( ";
for(String filter : filters ) {
CFILTER += " OR (\"STATUS\" LIKE '%"+filter+"%')";
}
The above split function will split the passed string into multiple rows.
for loop will be iterating till the last row.
we don't have to mention any start/end in the for loop.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home