Using Insert Into query

Hi,

I’m having some trouble in using the Insert Query on the Execute Non - Query activity. For testing purposes, I’ve set a default value on the variables that I’m using on the Insert Query. It successfully adds a data on our database but when I try to change the default value to a new data, the insert query still inserts the previous data that I have entered. I have a screenshot below of the query and the database entries created by the project.

Any input is greatly appreciated

image

are we assing those variables like strProcTime and strTransactions are getting assigned with this excel row values
–we need to pass them a value by reading that excel first with read range and get the output with a variable of type datatable named dt
–now use a for each row loop and pass dt as input
–inside the loop use a assign activity like this
strProcTime = row(“yourcolumnname”).tostring
another assign activity like this
strTransactions = row(“rowcolumnname”).ToString

like wise
–then use your EXECUTE NON QUERY activity with those variables in the INSERT STATEMENT
–that would insert those values for sure for each iteration of the rows inside the for each row loop

hope this would help you
Cheers @Pizarro1

Apologies, I wasn’t clear on the screenshots I’ve added. The screenshot below is the database file that we have.

image

The data that is being added by my workflow is still
2nd column = “5”
Transactions = “1”

Eventhough my variables default value is now
strProcTime = “10”
strTransacions = “1”

I’m not sure why the Insert Query is still using the first value that I’ve used instead of the new value that I’m now using.

yah of course, if this is getting updated along the sequence, only this value will be updated to its corresponding variable, though we have set that variable with a default value.
and thus that variable with updated value will be passed to the INSERT statement

cheers @Pizarro1

Thank you @Palaniyappan

1 Like

Cheers @Pizarro1