Re: Forms query on a non base table item
Date: Wed, 21 Apr 1999 18:18:36 GMT
Message-ID: <371E1680.8AF740BA_at_nospam.flash.net>
I have read several responses to your post and it appears that either I
or everyone else missed the point. I believe the question was, how do
you allow QUERY on a non-base table item. I have to make some
assumptions
here to make it work:
1. I assume you are in some way allowing them into something like
enter-query mode.
2. I assume you are using the base functionality of key-execute-query or
similar
To accomplish this
1. check for not null condition in your non-base table item: customer
name
2. If it is not null, dynamically set the where clause for the base
table block based on
a subquery from the customer table:
WHERE customer_code IN (
SELECT customer_code
FROM customer
WHERE UPPER(customer_code) LIKE
'%'||UPPER(LTRIM(RTRIM(:b_order.customer_name)))||'%')
3. execute the query.
Loyal Barber
BLT Soft Incorporated
Bob Hirons wrote:
> How do I code a form to allow query on a non base table item?
>
> e.g.
> base table ORDER has-
> ORD_NO
> ORD_DESC
> CUSTOMER_CODE
>
> table CUSTOMER has-
> CUSTOMER_CODE
> CUSTOMER_NAME
>
> form has items
> ORD_NO base table item
> ORD_DESC base table item
> CUSTOMER_CODE base table item
> CUSTOMER_NAME non base table item
>
> Wish to allow query on CUSTOMER_NAME.
-- The difference between Windows 95 and 98? 3!Received on Wed Apr 21 1999 - 20:18:36 CEST