All Forums Tools
04 May 2006
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 fieldIā€™m receiving this error message when trying to delete the primary index3525: The user cannot create or drop a PRIMARY index. Output directed to Answer set windowDROP primary INDEX (WTN) ON vince_gabrielli.test;

Fred 1096 posts Joined 08/04
04 May 2006

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.

BBR2 96 posts Joined 12/04
05 May 2006

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

05 May 2006

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

You must sign in to leave a comment.