Re: [SQL*Forms 3.0] select DISTINCT possible?

From: Jonathan W. Ingram <jonathan.ingram_at_attws.com>
Date: 1996/11/06
Message-ID: <3280CA5C.1EFD_at_attws.com>#1/1


Frampton Steve R wrote:
> I'm developing a three-block forms application for tracking
> employee absence information. I'm having difficulty with one
> of the blocks, which is being used to provide summary information
> on absences taken during the year.
>

<<text deleted>

> I thought I could just throw this into a PRE-QUERY (I've also
> tried it in a KEY-EXEQRY) trigger, but when I attempt to query
> the records, I get:
>
> "PRE-QUERY trigger raised unhandled exception TOO_MANY_ROWS"

Well, your problem is that your query is returning more than one row and your form only deals with one row at a time (unless you have only one absence code, that is :-). Even if your block displays multiple rows, in order to select into a field in the form you have to return a single value.

You could make this query the default query for the block and your form would work, although it would only display one of the codes at a time unless your block is displaying multiple rows.

(I am assuming that you have master block that display employee info and a detail block that displays absence information. If this isn't the case, consider redesigning your form.)

As to how to change the default query in Forms 3.0, I can't specifically say (it's been about 5 years since I've dealt with that particular version of Forms).

Good luck!

Jonathan Ingram
Meridian Technology Group
503.639.0816 Received on Wed Nov 06 1996 - 00:00:00 CET

Original text of this message