(Q) Using variables as literals in Informix 4GL
Posted in 1993
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Please let me know if this is not the appropriate forum to ask such
questions...
I would like to use a defined char type variable, store a value (table.column)
in it and then use the variable in a literally. Does anyone out there have any
suggestions?
Ex.
DEFINE the_table CHAR(10)
DEFINE big_name CHAR(20)
...
LET the_table="labs"
LET big_name="labs.name" -- assume table called 'labs', column called 'name'
...
SELECT COUNT(*)
INTO number_found
FROM the_table
WHERE temp.name=big_name
I want it to be interpreted as
...
SELECT COUNT(*)
INTO number_found
FROM labs
WHERE temp.name=labs.name
Thanks,
John
==============================================================================
John Marshall || Bitnet: OIT_JOHN@JMUVAX
Customer Services || Internet: OIT_JOHN@VAX1.ACS.JMU.EDU
James Madison University || AppleLink: jmu.john
Harrisonburg, VA 22807 ||
(703)568-6625 ||
=============================================================================