community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Solution: SQL Update / Delete using dynamic Input

Meteoroid

Been fighting with SQL update / delete and here is a working solution.

 

1. Add input value you want to refer to in your update/delete statement

 

1.png

 

2. Add dynamic input; define connection to sql server as usual (make sure you're using odbc connection.) in a Table or Query write "Select 1; Delete from table_name where id = existing_value" (In fact you need to pass any valid True statement separated by semicolon from main Update / Delete statement)

 

2.png

 

3. In the dynamic input properties choose Modify SQL Query; add SQL: Update WHERE Clause like in usual insert:

 

3.png

 

4. Profit!

 

4.png

 

Meteoroid

This looks great.  Do you know if there is an equivalent way to use the In-DB tools?  Some of my databases have hundreds of millions of rows, so I need to keep everything running on the database server.

 

Best regards,

 

Michael

 

 

Meteor

this approach is not working for Exasol database. Is this approach specific to a database or it will work for all, can you please let me know.

Hello, 

I have query build for SQL Developer and I would like to modify the date range based on your above example, however when I try to use the "Dynamic input" ( Other Database + 32 bit data base connections + ODBC) it doesn't appear any  option.

 

The query only works  if I use the "Input Data".

 

regards

 

 

Labels