Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 51539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:45:58+00:00 2026-05-10T16:45:58+00:00

I am trying to create a table with the following: CREATE TABLE GTW_WORKFLOW_MON (

  • 0

I am trying to create a table with the following:

CREATE TABLE GTW_WORKFLOW_MON  (     WORKFLOW_NAME VARCHAR(255) NOT NULL,      WORKFLOW_LOADED NUMERIC(20) NOT NULL,      ACTIVITY_NAME VARCHAR(255) NOT NULL,     FLAGS INTEGER NOT NULL,     MONITOR_NAME VARCHAR(255) NOT NULL,     CLASSNAME VARCHAR(255) NOT NULL,     STR0 VARCHAR(255),     STR1 VARCHAR(255),     STR2 VARCHAR(255),      NUM0 VARCHAR(255),      NUM1 VARCHAR(255),      NUM2 VARCHAR(255),      DATE0 VARCHAR(255),     DATE1 VARCHAR(255),      DATE2 VARCHAR(255),      PRIMARY KEY (WORKFLOW_NAME, WORKFLOW_LOADED, ACTIVITY_NAME, MONITOR_NAME) ) 

It fails due to column length not being large enough.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T16:45:59+00:00Added an answer on May 10, 2026 at 4:45 pm

    It would help if the SQL statement was syntactically valid and if you provided the exact error message. When reformatted and syntax corrected, the statement looks like:

    CREATE TABLE gtw_workflow_mon (     workflow_name   VARCHAR(255) NOT NULL,     workflow_loaded NUMERIC(20) NOT NULL,     activity_name   VARCHAR(255) NOT NULL,     flags           INTEGER NOT NULL,     monitor_name    VARCHAR(255) NOT NULL,     classname       VARCHAR(255) NOT NULL,     str0            VARCHAR(255),     str1            VARCHAR(255),     str2            VARCHAR(255),     num0            VARCHAR(255),     num1            VARCHAR(255),     num2            VARCHAR(255),     date0           VARCHAR(255),     date1           VARCHAR(255),     date2           VARCHAR(255),     PRIMARY KEY(workflow_name, workflow_loaded, activity_name, monitor_name) ); 

    And, when that is run on a system with 2KB pages, the error message is:

    SQL -550: Total length of columns in constraint is too long. 

    The standard way of getting a brief explanation of an error message is finderr; it says:

    $ finderr -550 -550    Total length of columns in constraint is too long.  The total size of all the columns listed in a UNIQUE, PRIMARY KEY, or FOREIGN KEY clause is limited. The limit depends on the database server in use, but all servers support a total of 120 bytes. The limit is the same as the restriction on the total size of all columns in a composite index. For additional information, see the CREATE TABLE statement in the IBM Informix Guide to SQL: Syntax.  $ 

    The ‘a total of 120 bytes’ should be ‘a total of at least 120 bytes’; that lower-bound applies to Informix SE. In IDS (Informix Dynamic Server), the lower-bound is 255 bytes, but it is bigger in more recent systems, and also bigger when the page size is bigger.

    You have a variety of options.

    • You can consider why your names need to be 255 characters each – is that sensible (would, say, 64 be sufficient)?
    • If your server version is recent enough (10.00 or later, I believe), you could create the table in a dbspace with a larger page size.

    Since the key is a maximum of 3*255+(20/2+1) = 776 bytes, and the rule of thumb is you need to be able to store 5 maximum-length key values + ROWID/FRAGID overhead (8 bytes) per page, you would need a 4 KB page size. (Had you been running on AIX, you probably wouldn’t have noticed the issue.)

    Also, you should not be storing date values in VARCHAR(255); you should use DATE or perhaps DATETIME YEAR TO DAY (a weird way of spelling DATE – though the underlying format is different, using 5 bytes on disk instead of 4 for a plain DATE), or perhaps DATETIME YEAR TO SECOND (a funny way of spelling TIMESTAMP), or … The ‘num0, num1, num2’ fields are also dubious, too; if they are meant to store numbers, use NUMERIC or DECIMAL — DECIMAL(20) in most IDS databases means a 20-digit floating point decimal number.

    Edited to add:

    And, to answer the direct question, VARCHAR columns can only be up to 255 bytes long; LVARCHAR columns can be up to about 32 KB; CHAR columns can be up to 32 KB; TEXT columns can be up to 2 GB, and CLOB columns can be even larger. The total length of a row is limited to about 32 KB (but BYTE, TEXT, BLOB and CLOB columns count as a fixed size descriptor towards that 32 KB total – the actual data is stored outside the row). There are some version dependencies that I’m not bringing out – if you are using IDS 10.00 or later, this is accurate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 61k
  • Answers 61k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Just make them [Localizable(true)] properties and everything is taken care… May 11, 2026 at 9:40 am
  • added an answer Unless I am mistaken, IIS will not serve up the… May 11, 2026 at 9:40 am
  • added an answer Do this: #contact_4 * { vertical-align: middle; display: inline; }… May 11, 2026 at 9:40 am

Related Questions

I am trying to create a table with the following: CREATE TABLE GTW_WORKFLOW_MON (
Using Prototype 1.6's new Element(...) I am trying to create a <table> element with
I am trying to create a column in a table that's a foreign key,
I am trying to create a rather simple effect on a set of images.
I am trying to create a subclass of WebPart that will act as a
I am trying to create a service with C# that launches a process that
I am trying to create a horizontal menu with the elements represented by <span>
I am trying to create a sortable image matrix, 5x5 using scriptaculous javascript library
I am trying to create a multi dimensional array using this syntax: $x[1] =
I am trying to create a recordset in Access VBA that will show me

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.