Re: Limit on the length of an SQL stmt?
Posted in 1995
Mark Steele <74431.3327@CompuServe.COM> wrote: >Is there a limit on the length on an sql statment? I wrote a 4gl >program using prepare/execute. It works fine until I get to a >certain point. The prepared statement looks like this: > > lock table database@machine:table in exclusive mode > ^^^^^^^^ ^^^^^ > These are the variables in the prepare stmt > >It works fine for all the tables, except one. On this one, I get >a 201 syntax error. The only difference is that the table name >is the longest of all of them. It is 17 characters long. All my >variables are declared at char(20). > >Now to test the statment, I went into isql, and typed in the >exact statement: > >begin work; >lock table yyyyyyyyy@xxxxxxxx:zzzzzzzzzzzzzzzzz >in exclusive mode; > ^ > >When I try to run this, again I receive a 201 syntax error. It >works on all the other tables in the same database. When I hit >modify, the cursor stops on the d in mode. Thanks for any help! > > Mark, With older versions of Informix, the maximum length of a table name was 14 characters. I think what you are seeing here is this same limitation but only when you use the database@sitename:tablename notation. Suggestion, try renaming your table ( using RENAME TABLE ... ) and if this is not an option, create a view on the whole table with a view name length of 14 or less characters. Good luck. (o o) +--------------oOOO--(_)------------------------+ | Rick Clark Internet: rick@imagepro.com | | Imaging Business Consultants, Inc. | | Specializing in INFORMIX and PLEXUS products | | Phone: 408 369-9220 | | Fax: 408 369-9223 | +---------------------------oOOO----------------+ |__|__| || || ooO Ooo