Re: Can you do a QBE on formonly field
Posted in 1994
>From: lgrieser@crash.cts.com (Liam Grieser)
>Subject: Can you do a QBE on formonly field
>Date: Fri, 24 Jun 1994 18:16:33 GMT
>X-Informix-List-Id: <news.7350>
>
>Is it possible to perform a query by example on a formonly field?
Yes. You can do:
CONSTRUCT somestring ON
A.Column01, A.Column02, A.Column03, B.Column04, C.Column05
FROM s_query.*
All the fields in the s_query.* screen record can be formonly fields,
or they can be references to any table you like. I routinely use a set
of table aliases like A, B, C, and analyse the query string returned from
the construct, and build the SELECT so that it only refers to the tables
it has to refer to, because the user expressed a search condition on it.
Typically, the SELECT statement ends up looking like:
SELECT A.PkColumn
FROM SomeTable A, SomeOtherTable B
WHERE A.PkColumn = B.FkColumn
AND ...
where the ... is what CONSTRUCT returns.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>