Re: distinct query in forms 3
Date: 1996/03/08
Message-ID: <4hpauj$bsc_at_news.uni-c.dk>#1/1
Subbu (skorisapati_at_worldbank.org) wrote:
: >I hope someone can help me with this. I want to populate a simple form
: >(SQL Forms3) to show 15 records at startup. I can not use a key-startup
: >trigger with execute_query; as trigger text because I want distinct
: >values.
: >I tried the following as the key-startup
: > select distinct a, b, c, d, e
: > into :a, :b, :c, :d, :e
: > from t;
: >This compiles with no problem. But when executed I get only 1 record into
: >the form with the error message 40735-Too Many Rows. I have talked
: >to people locally who have a great deal more experience than I =
: and they say >it can't be done. What do you think?
: You are trying to return all values/rows/records into the same forms
: record. This retrieves more than one row - but all rows into the same
: record.
: Inorder to achieve objective , Write a cursor and populate the records
: one by one.
Another solution would be to define a view on the SQL statement and a database block in the form connected the view. Then you may populate your form fields through a EXECUTE_QUERY statement on the block.
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Christian Mondrup + + Scandiatransplant, Skejby Hospital, University Hospital Aarhus + + Brendstrupgaardsvej + + + + Phone: +49 89 49 53 01 + + Telefax: +45 89 49 60 07 + + E-Mail: scancm_at_unidhp.uni-c.dk + + + + Opinions expressed are mine and do not reflect those of my employer. + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Received on Fri Mar 08 1996 - 00:00:00 CET