Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Dropping an Index
Mon, Sep 24 2007 6:50 PMPermanent Link

Allan Brocklehurst
hello;

Stats D4.25B2

 I am in the middle of writing s Script that will create and alter a
ton of tables
this part is giving me allot of grief.
I would like to have the "if Exists" Clause. This will be run remotely.

DROPPING AN INDEX !!!!
i tried

DROP INDEX IF EXISTS "MTCode" ON "Facilities" ("MTCode");

and

DROP INDEX  "ELRLogTable"."User"

and

DROP INDEX "ELRLogTable.dat"."User"


either way I'm not getting this at all

any suggestions

tia

Allan B



Attachments: brock.vcf
Mon, Sep 24 2007 11:11 PMPermanent Link

"Donat Hebert \(Worldsoft\)"
Allan, you're close but here's the reference:
DROP INDEX [IF EXISTS] table_reference.index_name | PRIMARY

You can also consider alter table with a redefine is you're changing the
primary ... ie
ALTER table table_reference

Redefine Primary Key(IndexFieldnames) Compress FULL NOBACKUP;

hth.  Donat.


"Allan Brocklehurst" <brock@ns.sympatico.ca> wrote in message
news:22FDE073-C9AF-455B-A229-91DCD1841821@news.elevatesoft.com...
> hello;
>
> Stats D4.25B2
>
>  I am in the middle of writing s Script that will create and alter a
> ton of tables
> this part is giving me allot of grief.
> I would like to have the "if Exists" Clause. This will be run remotely.
>
> DROPPING AN INDEX !!!!
> i tried
>
> DROP INDEX IF EXISTS "MTCode" ON "Facilities" ("MTCode");
>
> and
>
> DROP INDEX  "ELRLogTable"."User"
>
> and
>
> DROP INDEX "ELRLogTable.dat"."User"
>
>
> either way I'm not getting this at all
>
> any suggestions
>
> tia
>
> Allan B
>

Tue, Sep 25 2007 8:26 AMPermanent Link

Allan Brocklehurst
Donat;
that's the ticket

thanks. I also dropped the quotes

Allan

"Donat Hebert \(Worldsoft\)" <donat.hebert@worldsoft.ca> wrote:

Allan, you're close but here's the reference:
DROP INDEX [IF EXISTS] table_reference.index_name | PRIMARY

You can also consider alter table with a redefine is you're changing the
primary ... ie
ALTER table table_reference

Redefine Primary Key(IndexFieldnames) Compress FULL NOBACKUP;

hth.  Donat.


"Allan Brocklehurst" <brock@ns.sympatico.ca> wrote in message
news:22FDE073-C9AF-455B-A229-91DCD1841821@news.elevatesoft.com...
> hello;
>
> Stats D4.25B2
>
>  I am in the middle of writing s Script that will create and alter a
> ton of tables
> this part is giving me allot of grief.
> I would like to have the "if Exists" Clause. This will be run remotely.
>
> DROPPING AN INDEX !!!!
> i tried
>
> DROP INDEX IF EXISTS "MTCode" ON "Facilities" ("MTCode");
>
> and
>
> DROP INDEX  "ELRLogTable"."User"
>
> and
>
> DROP INDEX "ELRLogTable.dat"."User"
>
>
> either way I'm not getting this at all
>
> any suggestions
>
> tia
>
> Allan B
>

Image