Hello,
I’m using execute non query activity passing the query as
“UPDATE ExampleTable SET comment=@comment WHERE UniqueNumber=@UniqueNumber”
The above query works, but If I replace the WHERE clause with a different value, that is,
“UPDATE ExampleTable SET comment=@comment WHERE ID=@ID”
It’s not working.
I tried with a hardcoded value as -
"UPDATE ExampleTable SET comment=@comment WHERE ID=“123”
and it’s correctly working. It doesn’t work If I pass the value as parameter.
I have verified the parameter name and value multiple times, it’s correct. Is there something which I’m missing?
SenzoD
(Senzo Dlomo)
June 11, 2024, 10:17am
2
What is the error message you are getting?
There’s no error message. The DB is not updating.
AJ_Ask
June 11, 2024, 5:49pm
4
Hi @manojj.yadav
You can use the variables also to update the database like below
"Update [TableName] set [Comment]='Processed Successfully',[Comment2]=('"+CommentVarible+"') Where [ID]=('"+IDNumber+"')"
In this example i have created variables CommentVarible & IDNumber & passed them in the update query.
Hope this helps
1 Like
Anil_G
(Anil Gorthi)
June 11, 2024, 5:54pm
5
@manojj.yadav
What is the datatype of the ID column…accordingly you need to either use single quote around or no…even if you use a variabel you still might need to use quotes if it is string
Cheers