in reply to Re: Regular Expression Problem
in thread Regular Expression Problem

OK, I have this working for the most part. However, I have one question how do I get USING INDEX TABLESPACE INDEXES added after the closing )?

s/(PRIMARY KEY)/CONSTRAINT PK_$table $1/;
can anyone help.

Thanks,

Bobby

Replies are listed 'Best First'.
Re: Re: Re: Regular Expression Problem
by rdfield (Priest) on Dec 02, 2002 at 18:22 UTC
    s/(PRIMARY KEY\([^)]\))/CONSTRAINT PK_$table $1 USING INDEX TABLESPACE + INDEXES/;
    as long as you have the primary key columns defined within brackets after "PRIMARY KEY".

    rdfield