Forum

Please or Register to create posts and topics.

Adding marriage event to parents

PreviousPage 2 of 2

Looks good to me. I assume you have looked at the temporary table and that it looks ok. I assume you have tested it in a test database (probably a full copy of your real database).

Looks good but I've a couple of suggestions:

  1. There's a risk that using MIN(Date) will pick the later of two children's events but it would be a rare case because the modifiers for an identical yyyymmdd do not sort consistent with the intended order. "After" is "DA" and "Before" is "DB". SortDate resolves that. So the MINs would pick the "DA" Date and the "DB" SortDate.
  2. There's no benefit from enclosing a single statement in a TRANSACTION. It is already an automatic transaction.
  3. You might want to fill the EditDate - it's a simple statement you can find here.

@thejerrybryan Yep, the temp table looks good. And I'm planning on testing on a copy of my real database.

@ve3meo Good to know on the date sorting. For me, christening records so far have been explicit so I don't need to worry about DA's, DB's, etc. And thanks for the TRANSACTION factoid. Did you mean to include a link to using EditDate? I can probably figure it out, and it's another good idea.

Thanks all!

It's covered in the data dictionary spreadsheet and in this post:

Date Last Edited

Thanks!

PreviousPage 2 of 2