Re: CONSTRUCT bytes
Posted in 1992
Regarding that 256 byte number: I did INDEED see it in an Informix manual!! I think this will clear up a few things. Quoting Walt Hultgren of Emory U: > I've never been aware of a 256 byte limit on CONSTRUCTs, but maybe I've > just been blythely ignorant. The stated max char size in our .03 and 4.1 > manuals is our old friend, 32767. I've never tried a CONSTRUCT using a > char variable that big, but they *do* work for us with char(500) under And from Todd Glidden of CSC Corp. at the Sacramento Army Depot, CA: > If you do a "DISPLAY char-variable", you will see that the CONSTRUCT statement > does more than dump your characters into the char-variable. > [ - stuff deleted - ] > I usually go for the maximum, which is 256 bytes (good luck finding this in > the Informix manuals!). Look in the 4GL Ref Manual (my version is 4.0) at these two error messages: 1) On page 17, error #235 which says that a character column must be 32,511 bytes or less. <--- Note it says 32,511, NOT 32,767. 2) On page 24, error #280 which says that a quoted string cannot exceed 256 bytes. """""" As I said in my previous message, such things as byte sizes should really be included with the syntax descriptions in Chapter 7 (even though it's fairly easy to search for the goodies in the Error Messages chapter). So now what does this mean when using CONSTRUCT? The obvious: the "char_variable" where you are going to dump your where clause can't be more than 32,511 bytes long and you can't have the select statement sitting in a quoted string longer than 256 bytes. If you happen to hit the 32,511 limit, your plain out of luck. If you have a long select statement you should be able to break it up like this: let big_qry = "First part of select statement ", "Second part of sel sta...", "last part of sel sta" --- John B. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= John Baker, USAISC-Lex, Lexington - Blue Grass Army Depot, Lexington, KY jbaker@lexington-emh2.army.mil Phone: (606) 293-3644, 293-3743 DSN: 745- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= P.S. While I was searching for that 256 number, I also remember seeing the number 120. I found it to be the number of bytes that all the columns in a CREATE INDEX statement must not exceed. There's lots of other numbers. Maybe somebody should summarize them all?