Data generator - initialization script?

andyh

Member²
I'm trying to generate data, the PK of which is based on a 'sequence' statement. I have put a delete statement in the initialization script that should delete the previous generation run. I thought that this script would be run before each generation run, but this does not seem to be the case (I'm getting duplicates on the PK).

When does the initialization script get run? How can I clear old data prior to each run?
 
Originally posted by Marco Kalter:
I thought that this script would be run before each generation run
That is indeed true. What is the script text that you tried?
DELETE FROM quote_reasoning WHERE enqu_id BETWEEN 1000000 AND 20080000;
DELETE FROM quote_items WHERE qute_id IN (SELECT ID FROM quotes WHERE enqu_id BETWEEN 1000000 AND 20080000);
DELETE FROM quotes WHERE enqu_id BETWEEN 1000000 AND 20080000;
DELETE FROM enquiries WHERE ID BETWEEN 1000000 AND 20080000;
 
Back
Top