I am building a routine to delete a "Lead" that is organized into many normalized tables.
tblLead
-tblPerson
-tblPhone
-tblEmail
-tblAddress
-tblVehicle
-tblPolAuto
-tblPolHome
-tblNote
-tblActionLog
-tblLinkDupes
Each child table uses LeadID as a Foreign Key to relate to tblLead. Using SQL deleting these records would be an easy feat... (and I may end up doing this every night after my scheduled task export backup, but that is far from optimal)
DELETE FROM tblPerson WHERE LeadID=x;
DELETE FROM tblPhone WHERE LeadID=x;
etc.
In Caspio I cannot think of a fast way to do this.
My anticipated approach is to cycle through an auto-submitted and confimation disabled data page for every table, but what is going to happen when the child table has more than one record where LeadID=x.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
LWSChad
Hello All!
I am building a routine to delete a "Lead" that is organized into many normalized tables.
tblLead
-tblPerson
-tblPhone
-tblEmail
-tblAddress
-tblVehicle
-tblPolAuto
-tblPolHome
-tblNote
-tblActionLog
-tblLinkDupes
Each child table uses LeadID as a Foreign Key to relate to tblLead. Using SQL deleting these records would be an easy feat... (and I may end up doing this every night after my scheduled task export backup, but that is far from optimal)
In Caspio I cannot think of a fast way to do this.
My anticipated approach is to cycle through an auto-submitted and confimation disabled data page for every table, but what is going to happen when the child table has more than one record where LeadID=x.
Has anybody dealt with this?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.