how do i search against another table's data?

How do i perform a script to check if a record in table A already exists in table B?

example:
table A contains a list of serial numbers.
table B also contains a list of serial numbers.

i need to run a search on each record in table A to see if it already exists in B.

i would like to do this through a script and a loop - checking each record in A and if it matches anything in B then flag it and go to the next record.

can anyone give me the correct language to use in a FMP script?
both tables are in the same database.
LVL 2
tabushAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lesouefCommented:
you don't need a loop to do that, waste of time.
link both tables using the serial number then check if the linked table::ID is true fro each record.
you can even have a calculated field, say has_B
has_B = if (tableB::serialnb= tableA:serialnb ; "yes" ; "no" )
example upon request...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tabushAuthor Commented:
Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FileMaker Pro

From novice to tech pro — start learning today.