Is there a problem with RECORD LIKE notation
Posted in 1998
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Jobs, Consulting & Announcements
I've been programming in 4gl for four years. I just finished my first
consultant position and have started a new job in a new company.
This company is against using RECORD LIKE declarations. I can't
figure out why. Also they don't want to use .* notation.
i.e.
DEFINE w_record RECORD LIKE tbl.*
SELECT * INTO w_record.*
FROM tbl
They would rather see:
DEFINE w_elm1 CHAR(2),
w_elm2 INTEGER
SELECT elm1, elm2 INTO w_elm1, w_elm2
FROM tbl
I have no idea why. The record version is much better when a table is
changed--just recompile and go. According to Informix, it better to
select entire rows from tables. Plus it saves time and is less prone
to error.
Today I had wrote a fetch statement to select some rows out of a table
that had over 50 elements. This is insane! Upper management is
pushing for this project, and I'm stuck preparing fetch and insert
statements.
It's not in their standards. Am I missing something?
Brian McGinity