469,600 Members | 2,393 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

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 8784
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dylan Nicholson | last post: by
2 posts views Thread by me | last post: by
2 posts views Thread by RamaKrishna Narla | last post: by
7 posts views Thread by Serge Rielau | last post: by
3 posts views Thread by sparks | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.