By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,974 Members | 1,834 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,974 IT Pros & Developers. It's quick & easy.

Unable to create char columns > 254

P: n/a
Jim
All of a sudden I am unable to create tables or add columns to
existing tables if I specify CHARACTER greater than 254. If I try I
get the following error:

DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0604N The length, precision, or scale attribute for column,
distinct type,
structured type, attribute of structured type, function, or type
mapping
"character (255)" is not valid. SQLSTATE=42611

I have existing tables with large columns so I'm perplexed on why I
can't create new ones. Any help would be greatly appreciated.

Jim
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jim wrote:
All of a sudden I am unable to create tables or add columns to
existing tables if I specify CHARACTER greater than 254. If I try I
get the following error:

DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0604N The length, precision, or scale attribute for column,
distinct type,
structured type, attribute of structured type, function, or type
mapping
"character (255)" is not valid. SQLSTATE=42611

I have existing tables with large columns so I'm perplexed on why I
can't create new ones. Any help would be greatly appreciated.

Jim


http://publib.boulder.ibm.com/infoce...help/index.jsp

Search for SQL Limits. Study Table 9 - String limits:

Description Limit
Maximum length of CHAR (in bytes) 254
Maximum length of VARCHAR (in bytes) 32 672
Maximum length of LONG VARCHAR (in bytes) 32 700
Maximum length of CLOB (in bytes) 2 147 483 647
Maximum length of GRAPHIC (in characters) 127
Maximum length of VARGRAPHIC (in characters) 16 336
Maximum length of LONG VARGRAPHIC (in characters) 16 350
Maximum length of DBCLOB (in characters) 1 073 741 823
Maximum length of BLOB (in bytes) 2 147 483 647
Maximum length of character constant 32 672
Maximum length of graphic constant 16 336
Maximum length of concatenated character string 2 147 483 647
Maximum length of concatenated graphic string 1 073 741 823
Maximum length of concatenated binary string 2 147 483 647
Maximum number of hex constant digits 16 336
Maximum size of a catalog comment (in bytes) 254
Largest instance of a structured type column object at run time 1
(in gigabytes)

Jan M. Nelken
Nov 12 '05 #2

P: n/a
CHARs are limited to 254. You probably want to create a VARCHAR.

ji*****@hotmail.com (Jim) wrote in message news:<39*************************@posting.google.c om>...
All of a sudden I am unable to create tables or add columns to
existing tables if I specify CHARACTER greater than 254. If I try I
get the following error:

DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0604N The length, precision, or scale attribute for column,
distinct type,
structured type, attribute of structured type, function, or type
mapping
"character (255)" is not valid. SQLSTATE=42611

I have existing tables with large columns so I'm perplexed on why I
can't create new ones. Any help would be greatly appreciated.

Jim

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.