Hi,
I have a string that will vary in length but there will always be a consistent pattern.
Var String = “value a; value b; value c;”
This string could go on with additional value value e; value f; etc etc.
What I need to do is to take that variable “string” and create a new variable and alter the values in the string. Again it will always be consistent value I will be creating from it.
For example the above var string will need to look like newstring below, it is building a SQL query actually:
Var newstring = “ car like ‘%value a % OR car like ‘%value b % OR car like ‘%value c %’
And if there were more values I would need it to keep building the string dynamically.
What is the best method for me to do this and does anyone have some sample code I can work with?
Thanks for looking.
I have a string that will vary in length but there will always be a consistent pattern.
Var String = “value a; value b; value c;”
This string could go on with additional value value e; value f; etc etc.
What I need to do is to take that variable “string” and create a new variable and alter the values in the string. Again it will always be consistent value I will be creating from it.
For example the above var string will need to look like newstring below, it is building a SQL query actually:
Var newstring = “ car like ‘%value a % OR car like ‘%value b % OR car like ‘%value c %’
And if there were more values I would need it to keep building the string dynamically.
What is the best method for me to do this and does anyone have some sample code I can work with?
Thanks for looking.