This is a discussion on How to drop an index named as "XPKsp_prj_stk_ord_"? within the DB2 forums, part of the Database Server Software category; --> Hi, I have a table creation script that generated by ERWin. An index name is too long and has ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I have a table creation script that generated by ERWin. An index name is too long and has been truncated as "XPKsp_prj_stk_ord_". Now I want to drop and recreate it as another name. I got error when I drop it: SQL0204N "SPARADM.XPKsp_prj_stk_ord_" is an undefined name. SQLSTATE=42704 How can I drop it? Thanks. |
| |||
| "Challenge" <hanna_shaw@yahoo.com> wrote in message news:1152032487.734615.158130@m79g2000cwm.googlegr oups.com... > Hi, > > I have a table creation script that generated by ERWin. An index name > is too long and has been truncated as "XPKsp_prj_stk_ord_". Now I want > to drop and recreate it as another name. I got error when I drop it: > > SQL0204N "SPARADM.XPKsp_prj_stk_ord_" is an undefined name. > SQLSTATE=42704 > > How can I drop it? > I've never used ERWin but shouldn't the DB2 Control Center be able to drop the index? Just list all the indexes for the table, then use the GUI to delete that specific index. Or do you absolutely have to know how to drop it through ERWin? -- Rhino |
| |||
| Challenge wrote: > Hi, > > I have a table creation script that generated by ERWin. An index name > is too long and has been truncated as "XPKsp_prj_stk_ord_". Now I want > to drop and recreate it as another name. I got error when I drop it: > > SQL0204N "SPARADM.XPKsp_prj_stk_ord_" is an undefined name. > SQLSTATE=42704 > > How can I drop it? > > Thanks. > DB2 attempts to put everyting in uppercase at the command line. The drop command needs to be DROP INDEX SPARADM."XPKsp_prj_stk_ord_" - note the QUOTES... M |
| ||||
| m wrote: > Challenge wrote: >> Hi, >> >> I have a table creation script that generated by ERWin. An index name >> is too long and has been truncated as "XPKsp_prj_stk_ord_". Now I want >> to drop and recreate it as another name. I got error when I drop it: >> >> SQL0204N "SPARADM.XPKsp_prj_stk_ord_" is an undefined name. >> SQLSTATE=42704 >> >> How can I drop it? >> >> Thanks. >> > DB2 attempts to put everyting in uppercase at the command line. The drop > command needs to be DROP INDEX SPARADM."XPKsp_prj_stk_ord_" - note the > QUOTES... > > M Any if you are not sure about the name of the index do this: SELECT INDNAME FROM SYSCAT.INDEXES WHERE TABNAME = 'YOUR_TABLE_NAME' Best regards, Kovi -- -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- | Gregor Kovac | Gregor.Kovac@mikropis.si | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | In A World Without Fences Who Needs Gates? | | Experience Linux. | -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- |