Question

How to run postgresql store proc's while passing arguments in AA

  • 21 February 2023
  • 1 reply
  • 70 views

Badge +4

I need help in running store proc’s where I’m passing arguments in the the store proc within the task bot.The parameters have been defined in the store proc when I created it in the DB.The arguments are coming from DB


1 reply

Userlevel 5
Badge +10

@Lesley   here is example for empty parameters but you can use for regular parameters as well

 

  • In SQL to execute stored procedure with empty parameter as per Microsoft documentation the way is to use value as two single quotes, for example in below stored procedure GetNames we need to pass @MiddleName parameter with no value


exec GetNames @FirstName = 'Rohit' , @MiddleName='', @LastName='Sharma'
Example1.png

  • For executing same stored procedure from Automation Anywhere using command "Database: Run stored procedure command" the way to get the correct result is to use a white space in Parameter value.

Example2.png

Reply