Rachael, If you need items like primary key and foreign keys you can easlity alter my code. Caution!!! you must remove the FOREIGN KEYS before the PRIMARY KEYS.
Syntax is: 'ALTER TABLE'&T2.SYS_TABLE_NAME&'DROP CONSTRAINT `'+T1.SYS_INDEX_NAME+'`' FROM ... WHERE t2.sys_table_type='TABLE' AND t1.sys_foreign_key>0 CREATE Another SELECT ... WHERE t2.sys_table_type='TABLE' AND ((t1.sys_primary_key++ t1.sys_unique_index)>0) For PRIMARY KEY and UNIQUE INDEX. Jim --- Rachael Malberg <[EMAIL PROTECTED]> wrote: > yeah, I've been trying a couple things like your suggestions > but since I'm > looking to drop primary, foreign, and indexed indexes I had to > create two > views, one with 'alter table drop constrain' order by > sys_primary_key and > another for my 'drop index' and wrote them out to a file. > Worked pretty but > when I ran my file I couldn't get threw it all till I got an > 'Access > violation error..' and it put a table lock on the last table > 'altered'. So > I'm off to plan B...thanks for the assistance. > > ----- Original Message ----- > From: "James Bentley" <[EMAIL PROTECTED]> > To: "RBASE-L Mailing List" <[email protected]> > Sent: Thursday, April 24, 2008 11:27 AM > Subject: [RBASE-L] - Re: Droping a databases Indexes > > > > Rachael, > > > > No quick command to drop all indexes. Try the following > command > > file to create another command file to DROP the indexes. > > > > SET HEADINGS OFF > > OUTPUT DRPIDX.RMD > > WRITE '-- Drop of all indexes' > > SELECT DISTINCT ('DROP INDEX > > `'+sys_index_name+'`--'+sys_table_name)=60 + > > FROM sys_indexes t1 INNER + > > JOIN sys_tables t2 ON t1.sys_table_id=t2.sys_table_id + > > WHERE t2.sys_table_type='TABLE' AND (0=(t1.sys_primary_key++ > > t1.sys_unique_index+t1.sys_foreign_key+t1.sys_dbf_idx)) > > OUTPUT SCREEN > > SET HEADINGS ON > > RETURN > > -- I suggest you first do "RBEDIT DRPIDX.RMD" to check out > that > > you > > -- have created commands to drop the proper indexes. > > -- you would then "RUN DRPIDX.RMD" to delete the indexes > > > > If you cut and paste my code be sure that each line is > properly > > continued as the email program my have split it at > inappropriate > > places. > > > > Jim Bentley > > --- Rachael Malberg <[EMAIL PROTECTED]> > wrote: > > > >> is there a quick way to drop all db indexes? > > > > > > Jim Bentley > > American Celiac Society > > [EMAIL PROTECTED] > > tel: 1-504-737-3293 > > > > > > > > > ____________________________________________________________________________________ > > Be a better friend, newshound, and > > know-it-all with Yahoo! Mobile. Try it now. > > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > > > > > Jim Bentley American Celiac Society [EMAIL PROTECTED] tel: 1-504-737-3293 ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

