|
|
|
Forum Member
      
Group: Forum Members
Last Login: 2 days ago @ 1:34:40 PM
Posts: 35,
Visits: 9
|
|
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;
Vincent Gabrielli
|
|
|
|
|
Supreme Being
      
Group: PAC and SFT Members
Last Login: Yesterday @ 4:20:22 PM
Posts: 327,
Visits: 504
|
|
|
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.
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 10/7/2008 6:20:30 PM
Posts: 136,
Visits: 11
|
|
You can change PI definition of table if the table is empty. You may want to refer SQL Reference: DDL for exact symantics.
Vinay
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 2 days ago @ 1:34:40 PM
Posts: 35,
Visits: 9
|
|
Thanks to all the replies, I have corrected the SQL script accordingly
Vincent Gabrielli
|
|
|
|