Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / June 2007

Tip: Looking for answers? Try searching our database.

specified attributes not existing with existing column error on Altering table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rahul B - 28 Jun 2007 12:06 GMT
Hi.

I have created a table

CREATE TABLE testschema.player (
 country               VARCHAR(80)  NOT NULL,
 posn                  VARCHAR(2)  not null
)
/

and tried to alter it using
Alter table testschema.player alter column  country set data type
Varchar(3)

but it's giving error saying
Error: ALTER TABLE "TESTSCHEMA.PLAYER" specified attributes for column
"COUNTRY" that are not compatible with the existing column.

Can anybody help and tell the reason?
Lennart - 28 Jun 2007 12:26 GMT
> Hi.
>
[quoted text clipped - 15 lines]
>
> Can anybody help and tell the reason?

[lelle@53dbd181 lelle]$ db2 "? SQL0190N"
SQL0190N ALTER TABLE "<table-name>" specified attributes for
          column "<column-name>" that are not compatible with the
          existing column.
Explanation:

[...]
    -   the length of the column is greater than the length specified
        in the clause
sandy - 29 Jun 2007 11:13 GMT
> Hi.
>
[quoted text clipped - 15 lines]
>
> Can anybody help and tell the reason?

U cannot decrease the size of the column.(VARCHAR(80) to
VARCHAR(3) )..Try Using SYSPROC.ALTOBJ procedure..

Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.