Delete and Create Relationship from Code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do you Delete and Create Relationship from Code?

I need to severe a relationship so that i can run a make table query. Doens't work if there is a relationship.

Bruce
 
I need to severe a relationship so that i can run a make table query.
Doens't work if there is a relationship.

This does not make sense: making a new table cannot have any effect on
existing tables and relationships. If you are deleting an old table prior
to repopulating it, you could simply empty it instead:

DELETE FROM MyTable WHERE TRUE;

(yes, the criterion is redundant, but reminds people that it is a
potentially devasting command!). The advantage of this is that it's quicker
and does not disrupt the database as you have found. It will also
automatically pick up any referential violations amongst the imported
records.

Hope that helps


Tim F
 
Back
Top