J
Joe
Hello All,
I need help creating an efficient delete query.
I have two tables with a one to many relationship. My main table has a
key ID field and several descriptive text fields for each record/row. The
second table links to the first via the keyfield, and can have one or many
more records related to each Main table record/row. One of the fields in the
second table is a date field.
I want to delete all records in the Second table whose date is older or
"<" a specified date unless it is the only record for its related record in
the Main table.
I hope I stated that clearly enough.
Any help on how to create this query with SQL would be greatly appreciated.
I need help creating an efficient delete query.
I have two tables with a one to many relationship. My main table has a
key ID field and several descriptive text fields for each record/row. The
second table links to the first via the keyfield, and can have one or many
more records related to each Main table record/row. One of the fields in the
second table is a date field.
I want to delete all records in the Second table whose date is older or
"<" a specified date unless it is the only record for its related record in
the Main table.
I hope I stated that clearly enough.
Any help on how to create this query with SQL would be greatly appreciated.