Query Exceution and Automation

#1

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

#2

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.

#3

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

#4

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.

#5

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

#6

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

#7

It’s a select query only…

#8

#9

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

#10

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

#11

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

#12

@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?

#13

#14

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

#15

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

#16

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

#17

@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

#18

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