By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,813 Members | 1,236 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,813 IT Pros & Developers. It's quick & easy.

How to drop an index named as "XPKsp_prj_stk_ord_"?

P: n/a
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.

Jul 4 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"Challenge" <ha********@yahoo.comwrote in message
news:11**********************@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
Jul 4 '06 #2

P: n/a
m
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
Jul 5 '06 #3

P: n/a
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 | Gr**********@mikropis.si |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Jul 5 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.