Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

How to "Find" from a Child to Parent Table?


This topic is 6245 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

(See the attached; you may have to change its extension from .zip to .exe for it to self-extract):)

I'd like to find records within a range of dates in the Parent table via a relationship from the Child table; once those dates are found, I'd like to have a script in the Parent table print the results.

The two problems are:

1) I don't want to generate records in the Child table, so how would it look "through" the keyfield to find related records in Parent if no key is created?

2) I tried using GTRR in a script step but, since there's not a key generated in the Child table, it doesn't know how to relate to its parent. (Databases imitating life yet again.)

Then again, I may have coded the script incorrectly which would be no surprise to me whatsoever.

As always, TIAFYH!

Cheers,

Rich

Test.zip

Posted

Your relationship makes no sense (and will not work as a result). A child needs to have its parent's ID stored in its own field (this is known as the 'foreign key'). It cannot be calculated based on the parent, because without it there is no parent. It's like telling a child (a real child) "if someone asks for your last name, tell them it's same as your father's".

This topic is 6245 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.