Query Exceution and Automation

need help on query execution, how to execute it…I started with execute db query,but where to give db and server details

Hi,

First step is to add an application of type DatabaseApps. Depending upon your server details fill in the details
Post that add that application in process flowchart. Double click to open the application block. Drag drop Execute DB query inside that.

Done, now getting error - Could not find stored procedure ‘query’, after running it

Hi,

How have you defined your query. you can only use a select query either by writing the query in text box provided and select default check box or by defining the query in a string variable and selecting the variable.

I did defining the query in string variable and then slected query

What is the command that you wrote. It supports select query only

It’s a select query only…

Hi,

Since you have defined query as a string argument do not check check box default. That is checked when you are writing explicit query in the text box

yes, getting executed now, but throwing error saying “Invalid object name”

got that sorted out, as next step, need this report to be sent as mail.

@amit_anand15, getting error as Output argument not selected, but though I have defined argument, unable to choose from dropdown, does this output mean, the results gets stored in the path?

Hi,

Output of query activity is an argument of type DataTable. It is not a string. Creatae an output argument of type DataTable and map the same

How to get output in a particular folder…can we pass it in this

@amit_anand15, how to pass the output into excel, as of now it only says, output and run successful,

@amit_anand15

…I am trying to get outpt in that path, it throws error saying access denid to this path, but I have access to this path

Hi,

Try giving path other than C drive or alternately give read write access using icacls command to everyone in the desired folder.
Command is
icacls /t /grant Everyone:(OI)(CI)F
Run it via cmd prompt