cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kjs1
Level: Powered On

Deleting linked records from 4 SQL tables

Can you help me figure out how to use the Remove function? I have 4 SQL tables that have linked ID relationships among them. When I remove a single record in a gallery, I am running into primary key constraint issues. Is there a way to write the Remove function so that it will look at each table and its associated key and then remove the item from the stated gallery?

2 REPLIES 2
Dawidvh
Level 10

Re: Deleting linked records from 4 SQL tables

Hi Kjs1.

 

Have you tried to use RemoveIf(datasource,ID=IDtoremove). Start with the child tables and remove all records that might be referencing the parent that you are planning to remove?.

 

Let me know if you don't come right.

Kjs1
Level: Powered On

Re: Deleting linked records from 4 SQL tables

Yes, I found a related solution.  Thanks