Dear Experts,
I want to increase the value of inside of the query in text file?
Is it possible ?
For Example:
In the place of % I want to iterate up to 1 to 33
I want to execute same query
Dear Experts,
I want to increase the value of inside of the query in text file?
Is it possible ?
For Example:
In the place of % I want to iterate up to 1 to 33
I want to execute same query
put an integer variable and increment and iterate it.
@Abubakkar Yes it is possible.inside a loop You can use string formatting and use {0} in place of the value thar needs to be changed.
Eg: abc.txt has the following content
I am {0} years old.
Read the text file and store it in string variable
Use a while loop with condition i<=33
String.format(string variable, i)
Output will be as follows:.
I am 1 years old
I am 2 years old
.
.
.
I am 33 years old
You are welcome
The condition should just have i<=33 and in the body of the while loop add a write line activity with values as
String.format(your variable, i.tostring) and increment the value of i using assign activity i=i+1
Thanks @rahul.lakshmanan
It’s successfully changed in write line activity but now i want to save 33 text files this and use 33 execute query activity
is it possible ?
Yes just pass the String.format(string variable, i.tostring) as the sql for the execute query activity
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.