Reverse Intersect
Bob Sneidar
bobs at twft.com
Tue May 25 17:45:35 EDT 2010
Hi all.
I know the Intersect command removes keys in array-1 that don't exist in array-2. What I need however is a command that removes keys in array-1 that DO exist in array-2, so that array-1 contains all the keys I need to add. Why you ask? Why not just use the Union command? Because I need to find all the records in table-a that need to be added to table b. And since I am paging through table a a limited number of records at a time, (to prevent Rev memory overflow for large tables) I cannot simply use an SQL query join, and as I said in a prior post the tables are in disconnected databases.
So what I am doing is getting 100 records from table-a as a string, massaging it a bit to form a comma delimited list, then using the SQL IN operator to get what records there are in table-b that are already in table-a. At that point I need to eliminate the table-b keys from the table-a keys, and what I will have left are the keys that need to be inserted into table-b. Simple. See? ;-)
So is there any way to do this without a repeat loop? I can always do a repeat loop, but they weary me. <sigh> ;-)
Bob
More information about the use-livecode
mailing list