Ashtari
(TestBot)
July 6, 2020, 9:34am
1
Hey,
i try to use my variable strInputEmail in my SQL query.
UiPath told me now that i have a syntax error and I dont know why…
My query is
“Select UserID From User WHERE Mail = @strInputEmail ”
Every column is correct and the variable name also…
What is the correct syntax to user variables in my queries?
Thanks for your help:-)
1 Like
Use “+” to use variable in a string say
"My name is "+Var_Name
For strInputEmail this var
“Select UserID From User WHERE Mail = "+strInputEmail
Srini84
(Srinivas Kadamati)
July 6, 2020, 11:12am
3
@Ashtari
You can pass the variable by using parameters
Hope this helps
Thanks
Hi @Ashtari
“select * from User”
“select UserID from User WHERE Mail = '”+strInputEmail+“'”
Hope this would solve your issue
Mark as solution and like it.
Happy Automation
Best Regards
Er Pratik Wavhal
SN2
(Shankar)
October 15, 2020, 10:19am
5
hi @Pratik_Wavhal
I would like to execute the below query
“select distinct a.* from dbo.Required_Skills a left join dbo.Employee_Skills_Details b on a.[Display Expression] = b.[Training Role]
where b.FirstName ='”+fName+“’ or b.LastName ='”+lName+“'”
But getting error. please help on this