Home » Developer & Programmer » Forms » Querying on non base table items
Querying on non base table items [message #365426] Mon, 11 May 1998 11:53 Go to next message
Mark Russell
Messages: 2
Registered: May 1998
Junior Member
Without using a view, how can I query on non base table items. Example, client id is held on the orders table, I wish to be able to query on the clients name in a form to bring back all of their orders. Not necessarily returning just one client i.e. "%SMITH%".
I think I have seen something whereby in the PRE-QUERY trigger you populate the ID field with query criteria after executing a cursor to select ID's where the name matches and then letting the form query continue. Does anyone have an example of this?

Any suggestions will be gratefully received.
Re: Querying on non base table items [message #365429 is a reply to message #365426] Tue, 12 May 1998 13:12 Go to previous message
Michael Broughton
Messages: 1
Registered: May 1998
Junior Member
One option in the pre-query trigger is to modify the default where clause of the block if a non-base table item is populated.

e.g.
if :orders.client_name is not null then
set_block_propert('orders', default_where,
'client_id in (select client_id from '||
clients where name like '
||:orders.client_name||')' );
:orders.client_name := null;
end if;
Next Topic: Benchmarking Performance w/ Developer 2000 Web Forms
Goto Forum:
  


Current Time: Wed Apr 24 16:56:13 CDT 2024