Amitha
(Amitha)
March 7, 2017, 7:31am
1
Hello all,
I’m trying to attach a variable into a mysql query . I tried concatenating the variable with the query like below.
"select type_of_lender from lendors where email_address = ’ “+ email + " ’ ;” where email is a variable declared in uipath.
There is no error in the syntax but no value from the database is being retrieved.
How can this variable be integrated with the query?
Regards,
Amitha
hey @Amitha
try to use “email.tostring” and for debugging purpose use writeline activity and check what query you are getting.
Regards…!!
aksh
Amitha:
into
Hi @Amitha ,
Is the query working when you directly put the values? Are you getting the desired results too?
If it’s Yes, then go through the below article to for concatenating it :
Is it possible to use a variable in a webctrl statement? If so, how do I declare it and use it in the Selector Editor?
I have the following statement that works fine:
I want to turn it into
so I can assign whatever VARIABLE (Chapter 1, Chapter 2, etc) I need, and have the VARIABLE populate the webcrtl statement with the selected chapter.
[image]
Thanks!
Fritz
Regards,
V
Amitha
(Amitha)
March 7, 2017, 9:17am
4
Hi @aksh1yadav ,
Thanks for responding. I tried using .tostring operator. It isnt working.
Regards,
Amitha
Amitha
(Amitha)
March 7, 2017, 9:30am
5
Hi @Vikas.Jain ,
I’m getting the results as required when I’m directly querying with the column names.
Thanks for responding.
"select type_of_lender from lendors where email_address = ’ “+ email + " ’ ;”
Here,I have used the same syntax as mentioned in the post you have shared which goes
"
Is there any alternate ?
aksh1yadav
(AKSHAY YADAV)
March 7, 2017, 12:10pm
6
Hello @Amitha
Please try this and let me know
“select type_of_lender from lendors where email_address = '”+ email + “’ ;”
Regards…!!
Aksh
1 Like