In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Delete Specific records from a SQL table with a clause

urfriendumesh
7 - Meteor

I'm trying to perform a match of a specific set of records (Input-1 : Text Input or Excel sheet) with a SQL table (Input-2). All the records matched need to be Deleted from the SQL table (Input-2).

 

I have designed a workflow and able to get the required matched records in a SELECT statement using Dynamic Input, but unable to DELETE these records from the table. Can you please assist in dynamically deleting the matched records. Attached the workflow for reference.

 

urfriendumesh_0-1674019231578.png

 

urfriendumesh_2-1674019495729.png

 

 

 

 

 

 

 

 

3 REPLIES 3
Felipe_Ribeir0
16 - Nebula

Hi @urfriendumesh 

 

Try using this select 1 before the delete query, inside of the dynamic input.

 

SELECT 1;
DELETE FROM

"RMS"."dbo"."LegalHoldFiles_BKP"

WHERE r_object_id='0b0000c9800f3378' AND unique_ref_no='758'

 

Here is how i have this same situation configured here, it works well:

 

Felipe_Ribeir0_1-1674038927811.png

 

 

urfriendumesh
7 - Meteor

Thanks @Felipe_Ribeir0 for the solution. I was able to execute the workflow with Dynamic SQL Delete.

Inactive User
Not applicable

I tried this using dynamic Input:

 

Select 1; 

delete from SANDBOX.ADMIN.MYID_TEST

where BRAND = 'brand_value'

 

I replace brand_value with an actual brand name

 

but I am getting an error: Error opening .... No Columns returned. 

Labels
Top Solution Authors