>>>With "SELECT * FROM customer WHERE customer.lastname = ?vp_lastname", it's easy enough to pass "" as the parameter and get all customers, but what about a date(customer.lastdate) or integer(customer.custid)?
>>
>>You could have either a compound WHERE, or you could have a different view for each type of query. CustomersByLastName, ByDate, ByCustID, etc.
>
>Okay, I hate to sound dense, but can you give me an example of the compound WHERE clause? It sounds like the answer I want, but can't quite see.
It's my choice of words, I expect. By "compound" I just mean more than one condition in the WHERE clause. Something like:
SELECT * FROM tastrade!products;
WHERE ( VAL(Products.supplier_id) = ( ?ln_SupplierID );
OR VAL(Products.product_id) = ( ?ln_ProductID ) );
OR Products.product_name LIKE ( "%"+?lcProduct_name+"%" )
>SELECT * FROM customers WHERE
> custid gives all records OR custid gives one record
I still would use two different views for this case. lv_customers (all, or all active, for example), and lv_customer (parameterized view).