[Bond-users] SELECT AS
Colin Close
itchka at compuserve.com
Tue Nov 5 20:13:38 EST 2013
Hi All,
I'm having a problem with field aliasing and I'm not sure there isn't a bug.
Is there any reason why this should not work.
<hbox name="addinfo_xmas" border="6">
<dbobject name="addinfo_xmas">
<sql> SELECT id, (streetaddress||E'\n'||streetaddressone||E'\n'||suburbaddress||E'\n'||homephone)
AS addr
FROM employee
WHERE id = <field dbobjectsrc="get_client_dropdwn">id</field>
</sql>
</dbobject>
<cell>
<label>Address</label>
</cell>
<cell fill="false">
<textview minwidth="280" wrap="word" name="addinfo_xmas_txt">
<!--<dbobjectsrc>get_client_dropdwn</dbobjectsrc>-->
<field dbobjectsrc="addinfo_xmas">addr</field>
</textview>
The problem is that the aliased field addr is rejected with the following errors.
Error: ../bonddb/bonddbobj.c: 1178: bonddb_getvalue(): Unable to find ECT.addr in the object with query
SELECT to_char(current_timestamp, 'YYYY') AS xmas_year; --NOTIFY pidone32;
Error: ../bonddb/bonddbobj.c: 1182: bonddb_getvalue(): Aborting from programme now - Failed to find field addr
Best,
Colin
Colin Close
itchka at compuserve.com
**
More information about the Bond-users
mailing list