473,406 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 2788

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rod Davis | last post by:
Once a week, we run a script to drop all the indexes on tables in our db, followed by another to add those indexes back (we insert every day, so we do this to prevent index fragmenttation). The...
3
by: Maryam | last post by:
Hi, I am having problems getting anything useful out of the index tuning wizard. I have created a table and inserted data into it. When i run the index tuning wizard i expect 2 indexes to be...
4
by: Kevin Haugen | last post by:
SQL SERVER 2000 System let's you alter the system tables and add indexes. However, it won't let you drop the index afterward. Anybody know how to drop an index on a system table? Thanks, ...
0
by: Patrick Hatcher | last post by:
We accidentally created a table called user in our public schema. We are now trying to remove the table using DROP TABLE user and even DROP TABLE public.user. However every time we try we get an...
10
by: BuddhaBuddy | last post by:
Platform is DB2/NT 7.2.9 The table was created like this: CREATE TABLE MYTEST ( MYTESTOID bigint not null primary key, FK_OTHEROID bigint not null references other, FK_ANOTHEROID bigint not...
10
by: hilz | last post by:
Hi all. I have a table that i create in MsAccess, using ado connection as follows: create table PAYITEM ( PAYITEM_ID COUNTER PRIMARY KEY, PAYITEM_NAME ...
3
by: Marcio Caetano | last post by:
Hello ! Consider the examples bellow: 1- I create a table named TBA with columns ( A int , B char(10) ) 2- I create an B-Tree index named IDXA using the column A 3- I create an GIST (or...
24
by: Henrik Steffen | last post by:
hello all, on my master-db-server i'm running postgres 7.4.1, and I have got two slave-servers running postgres 7.4.2 running the following query on the master-server (7.4.1) delivers: ...
2
by: rcamarda | last post by:
Hi, I found this SQL in the news group to drop indexs in a table. I need a script that will drop all indexes in all user tables of a given database: DECLARE @indexName NVARCHAR(128) DECLARE...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.