Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I select distinct values when user executes query?
Hi David,
Thanks very much. This is very helpful.
Take care,
John
On Thu, 22 Jul 1999 16:34:22 GMT, "hazledid" <david.hazledine_at_roche.com> wrote:
>If the SHIP_NO block is only ever used for queries, create a view which
>does SELECT DISTINCT SHIP_NO and
>use that view in your SHIP_NO block. If you want to enter new
>shipments as well as query
>existing ones then life gets more difficult (you can't insert into a
>view which uses a DISTINCT function).
>
>Options include:
>
>* Have a separate block in your form for data entry, which accesses
>the table instead of the DISTINCT view
>* Create triggers to override Oracle Forms' default commit processing
>and code the INSERT etc. statements yourself
>* Better still, normalise your data model and move shipment
>information into a separate table with 1 row per shipment
>
>Hope this helps.
>
>David J. Hazledine
>Roche Products Limited
>40 Broadwater Road
>Welwyn Garden City
>AL7 3AY
>United Kingdom
>Registration Number 100674
>
>E-mail: david.hazledine_at_roche.com
>Fax: +44 (0)1707 325666
>Tel: +44 (0)1707 366166
Received on Thu Jul 29 1999 - 10:17:00 CDT
![]() |
![]() |