469,602 Members | 1,818 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

How to drop an index named as "XPKsp_prj_stk_ord_"?

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
3 2611

"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
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
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.

Similar topics

1 post views Thread by Rod Davis | last post: by
3 posts views Thread by Maryam | last post: by
4 posts views Thread by Kevin Haugen | last post: by
reply views Thread by Patrick Hatcher | last post: by
10 posts views Thread by hilz | last post: by
3 posts views Thread by Marcio Caetano | last post: by
24 posts views Thread by Henrik Steffen | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.