Skip to main content
gautams4173
Known Participant
December 2, 2022
Question

Query Database Error

Hi

I'm trying to use the QUERY DATABASE SMART SERVICE to delete few records from my database tables 

My query is as follows : DELETE FROM <TABLE_NAME> WHERE ID = <VALUE>

Now I want the value to be dynamic. I dont know how to pass on dynamic value.

I tried using the process variables, I created node inputs and tried accessing via ac!. But none works

Anyone can please help me in getting dynamic values for the query above ?

6 replies

Inspiring
December 2, 2022

I think you're on the right track. It can be dynamic using the ac!

But you can also use delete from data store entity smart service
docs.appian.com/.../Delete_from_Data_Store_Entities_Smart_Service.html

gautams4173
Known Participant
December 2, 2022

Hey,

I actually did try this

The only thing different is :

a. naming of the variable, ( ~1. )

b. And I was getting an error saying "Statement Parameter 1 Not Set" 

the error : 

The sql : 
Inspiring
December 2, 2022

You need to manually create first the variable in the SQL statement.

ac!varName and it will automatically create the input in the data tab.

docs.appian.com/.../Query_Database_Smart_Service.html