Unload problem.
Posted in 1994
Topics: Data Types & Schema Design, Migration, Import/Export & Data Conversion
Hello everybody, I am forwarding this question for my co-worker. -------- cut here ----------------- I am wondering if any of you can help me. At our facility we are using the Informix-OnLine family of products, with the Informix-SQL front end. We are using Informix-OnLine 5.0, and Informix-SQL 4.10.UD2. Recently we have encountered a number of problems regarding the use of variable-lenght character fields (VARCHARs). Most of these problems involve NULLs. The first problem we encountered was with ACE reports: If you print a varchar whose value is null, the entire line is truncated at that point. That is, if you execute: print col 1, field1 clipped, col 40, field2 clipped, col 70, field3 clipped, col 90, total using "#,##&" ... and field2 is a varchar whose value is NULL, then only field1 prints. The rest of the output is "eaten" by ace. To work around this, we have disallowed NULL values in VARCHARs; when we need the VARCHAR to be empty, we set it equal to a single space. Which led to another problem: when using the SQL command "UNLOAD," these VARCHARs will _not_ be unloaded as a single space; they will be unloaded as a NULL. The same behavior is not true of standard characters; those work as expected. It is specifically VARCHARs that cause the problem. Similarly, if we use the table editor to try and change a VARCHAR field to a CHAR field, and the field does not allow NULLs, and the VARCHAR field contains a single space in even one of its records, the rebuild will fail. I am looking for possible workarounds/fixes for these problems. Informix Technical Support has acknowledged the existence of these bugs and told me that they will be fixed "in a version greater than 5," which means that a fix isn't even guaranteed for 6. If anyone has written a portable unload program, or has any other workarounds for these problems, please contact me or post them here. Thank You, - T.J. Girsch ( t.girsch@genie.com ) Commercial Communications, Inc. (414) 798-1999 ---------------- end here ---------------------- -- Bashar Abouseido | .'. Wisconsin - USA _/|__)))_) '