Filtering the rows with missing refference elements
Options
tomas randomas
Member ✭
Hello, some of the elements that are used as a refference have been deleted from the database, and now I would like to find and remove the rows that have the 'refference no longer exists'
Couldn't find a way to do that correctly 😅
Tagged:
Best Answer
-
I would make a function that queries the table in question, and for each result, check to see if the referred value exists in the other table through using a get record. If it comes back null, delete the record in the first table!
There are some techniques that can improve the performance of this process, but if the N isn't huge and/or the scrubbing is done infrequently, I wouldn't worry about it too much. Either way, focus on making it work in a way that makes sense to you first.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback