473,500 Members | 1,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ALTER TABLE ALTER COLUMN

Hi!

I have a table with a column of BIGINT and I want to change the type to
SMALLINT.
Command ALTER TABLE TABLE1 ALTER COLUMN COL1 SET DATA TYPE SMALLINT
does not work since I cannot specify SMALLINT in set data type clause
(acording to
http://publib.boulder.ibm.com/infoce...c/r0000888.htm)
Then I thought I could drop the column: ALTER TABLE TABLE1 DROP COLUMN COL1
but running this I get:
21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0901N The SQL statement failed because of a non-severe system error.
Subsequent SQL statements can be processed. (Reason "column number out of
range".) SQLSTATE=58004

Is this as expected? :)) It doesn't sound like that to me.

Best regards,
Kovi

--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Nov 6 '06 #1
3 9190
Gregor Kovač wrote:
Hi!

I have a table with a column of BIGINT and I want to change the type to
SMALLINT.
Command ALTER TABLE TABLE1 ALTER COLUMN COL1 SET DATA TYPE SMALLINT
does not work since I cannot specify SMALLINT in set data type clause
(acording to
http://publib.boulder.ibm.com/infoce...c/r0000888.htm)
Then I thought I could drop the column: ALTER TABLE TABLE1 DROP COLUMN
COL1 but running this I get:
21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0901N The SQL statement failed because of a non-severe system error.
Subsequent SQL statements can be processed. (Reason "column number out of
range".) SQLSTATE=58004
SQL0901 -open a PMR with IBM support.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Nov 6 '06 #2
Knut Stolze wrote:
Gregor Kovač wrote:
>Hi!

I have a table with a column of BIGINT and I want to change the type to
SMALLINT.
Command ALTER TABLE TABLE1 ALTER COLUMN COL1 SET DATA TYPE SMALLINT
does not work since I cannot specify SMALLINT in set data type clause
(acording to
http://publib.boulder.ibm.com/infoce...c/r0000888.htm)
>Then I thought I could drop the column: ALTER TABLE TABLE1 DROP COLUMN
COL1 but running this I get:
21034E *The command was processed as an SQL statement because it was not
a valid Command Line Processor command. *During SQL processing it
returned: SQL0901N *The SQL statement failed because of a non-severe
system error. Subsequent SQL statements can be processed. *(Reason
"column number out of range".) *SQLSTATE=58004

SQL0901 -open a PMR with IBM support.

Knut Stolze
DB2 Information Integration Development
IBM Germany
Thanks.
Does it mean that I should open a PMR every time I get SQL0901?

Best regards,
Kovi
--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Nov 6 '06 #3
Gregor Kovač wrote:
>>Then I thought I could drop the column: ALTER TABLE TABLE1 DROP COLUMN
COL1 but running this I get:
21034E *The command was processed as an SQL statement because it was not
a valid Command Line Processor command. *During SQL processing it
returned: SQL0901N *The SQL statement failed because of a non-severe
system error. Subsequent SQL statements can be processed. *(Reason
"column number out of range".) *SQLSTATE=58004

SQL0901 -open a PMR with IBM support.

Does it mean that I should open a PMR every time I get SQL0901?
My personal opinion: yes, do that. (Of course not for the same error
situation again and again.)

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Nov 6 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
9804
by: Dylan Nicholson | last post by:
Seems that Oracle 9.2 (using MS ODBC driver) requires extra parentheses when adding multiple columns to a table: ALTER TABLE MyTable ADD (MyColumn1 VARCHAR(255), MyColumn2 VARCHAR(255)) vs ...
1
11495
by: Lannsjo | last post by:
I need to change my primary key column type from smallint to int. I have tried: ALTER TABLE livegroup MODIFY id INT UNSIGNED NOT NULL AUTO_INCREMENT; But get an error message certainly since my...
1
21241
by: Bruce | last post by:
Hi, I want to change the datatype of an existing column from char to varbinary. When I run the "Alter Table" statement, I get the following error message - Disallowed implicit conversion...
2
21339
by: me | last post by:
I would like to add an Identity to an existing column in a table using a stored procedure then add records to the table and then remove the identity after the records have been added or something...
5
5280
by: minjie | last post by:
Is it possible to run a simple script to alter a table column in Access database from an interger to a double? I have been writing C++ programs every time we need to upgrade (modify) the Access...
4
3898
by: Jeff Kish | last post by:
Hi. I have a database I need to supply something (I'm assuming a t-sql script.. maybe something else is better) to update customer tables with. The operations include mostly changing varchar...
2
31431
by: RamaKrishna Narla | last post by:
In MS SQL Server, I have the following tables with some data in it. create table table1 ( column1 varchar(32), column2 int not null, column10 varchar(255), ..... primary key (column1,...
7
6959
by: Serge Rielau | last post by:
Hi all, Following Ian's passionate postings on problems with ALTOBJ and the alter table wizard in the control center I'll try to explain how to use ALTOBJ with this thread. I'm not going to get...
1
3474
by: vasilip | last post by:
I'm testing out db2 for a project I'm starting that requires proper xml support and I can't seem to get both xml and spatial data to work well in the same table. Once having created a table...
3
5257
by: sparks | last post by:
several months ago I was trying to set the field size of text fields in a table and Lyle Fairfield was nice enought to post a way using alter column. it was surprising since it was ALTER COLUMN...
0
7018
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
7182
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
7232
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
7397
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4923
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...
0
4611
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
316
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.