Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Filter records in HTMLDB 2.0
I don't want to requery the database all the times, as that's expensive.
On the client side I want the user to be able to 'play' with the result set,
filtering out only records they are interested in. (Sort of like using the
AutoFilter function in Excel).
Maybe I'm not approaching this right, but I'm used to doing things like this
in PowerBuilder.
-- Terry Dykstra Canadian Forest Oil Ltd. "Mark C. Stock" <mcstockX_at_Xenquery .com> wrote in message news:ktadndtbTZSOJBbeRVn-hQ_at_comcast.com...Received on Tue Nov 29 2005 - 09:34:59 CST
>
> "Terry Dykstra" <tddykstra_at_forestoil.ca> wrote in message
> news:M8Hif.179035$Io.97637_at_clgrps13...
> >I have a query that can return a few hundred rows (< 500). Is there
any
> > way I can then apply a filter on top of that result set to display only
a
> > specific number of records ( < 20), based on some filter criteria the
user
> > provides. I rather not be requerying the database all the all time if
at
> > all possible.
> >
> > --
> > Terry Dykstra
> > Canadian Forest Oil Ltd.
> >
> >
> >
>
> lots of ways
> are you sayin that there's ~500 rows in your table? or does they query
> already have a WHERE clause and you want the use to supply additional
> criteria?
>
> in any case, all you do is define an item on the page and reference that
> field in the where clause of the query... the 'application' created by the
> wizard does this, in its own way, as does the sample application
>
> here's the query syntax: from the sample application (page 2 customers):
>
> select customer_id, cust_last_name || ', ' || cust_first_name
customer_name,
> CUST_STREET_ADDRESS1 || decode(CUST_STREET_ADDRESS2, null, null, ', ' ||
> CUST_STREET_ADDRESS2) customer_address, cust_city, cust_state,
> cust_postal_code
> from demo_customers
> where upper(cust_last_name) like '%' || upper(:P2_SEARCH) || '%'
> or upper(cust_first_name) like '%' || upper(:P2_SEARCH) || '%'
>
> I would not recommend using the upper function on the database columns
like
> they do (unless you have a relatively small table or create a function
based
> index on the database columns), but this does illustrate referencing a
> page's item in the query
>
> ++ mcs
>
>