Dragan
Good ideas in TOAD (what a name!)
The script Naomi pointed me to is 95% there
It gives me the create commands for all existing indexes.
I looked at the code that generates the script and it would be a fairly simple thing to to add the
IF EXISTS
I want to drop an existing index if it exists (ala DELETE TAG)
I have scripted a few apps manually, but I'm always afraid of missing an index.
Here's a snippet from the script I coded manually
IF EXISTS (SELECT name FROM sys.indexes
WHERE name = N'IX_invtrans_parenttransid')
DROP INDEX IX_invtrans_parenttransid ON safesignature.dbo.invtrans
GO
CREATE INDEX IX_invtrans_parenttransid
ON safesignature.dbo.invtrans (parenttransid);
GO
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.