delete primary index

Tools

delete primary index

Hi trying to delete the primary index of a file that is created daily. However the index created is not using the right field and I would like to delete and recreate using a new field. we are using SAS that's why the problem of wrong index field

I’m receiving this error message when trying to delete the primary index

3525: The user cannot create or drop a PRIMARY index.
Output directed to Answer set window

DROP primary INDEX (WTN) ON vince_gabrielli.test;
3 REPLIES
Teradata Employee

Re: delete primary index

The Primary Index is part of the table structure and not a separate object. You'll have to do something like create a new table, copy (INSERT/SELECT) the data, drop the old, rename.
N/A

Re: delete primary index

You can change PI definition of table if the table is empty.
You may want to refer SQL Reference: DDL for exact symantics.

Vinay

Re: delete primary index

Thanks to all the replies, I have corrected the SQL script accordingly