post-query Trigger error [message #640154] |
Thu, 23 July 2015 02:42 |
|
palpali
Messages: 138 Registered: December 2014 Location: India
|
Senior Member |
|
|
Hallo all...
I am trying to fetch data thru' post query Trigger but it Shows me error as:
"FRM-40735: POST-QUERY Trigger raised unhandled exception ORa-01422"
my post-query:
select Name, description, nvl(title),0)
into :blk1.name, :blk1.expl, :blk1.sub
from table1
where pid = :blk1.pid;
Please can any one help me, how can i solve this error?
Thanking you all
regards.
|
|
|
Re: post-query Trigger error [message #640155 is a reply to message #640154] |
Thu, 23 July 2015 02:44 |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
01422, 00000, "exact fetch returns more than requested number of rows"
// *Cause: The number specified in exact fetch is less than the rows returned.
// *Action: Rewrite the query or change number of rows requested
Your query returns multiple rows, you need to change it to return only one row.
|
|
|
|
|
Re: post-query Trigger error [message #640169 is a reply to message #640158] |
Thu, 23 July 2015 04:41 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
WHERE clause should be modified so that SELECT returns just one row for each record in a block.
Sometimes SELECT DISTINCT helps.
Or, using an aggregate function such as SELECT MAX(NAME), MAX(DESCRIPTION) ... does the job.
However, it is you who has to investigate all options and apply the most appropriate one.
[Updated on: Thu, 23 July 2015 04:42] Report message to a moderator
|
|
|
|
Re: post-query Trigger error [message #640385 is a reply to message #640156] |
Mon, 27 July 2015 16:03 |
|
CraigB
Messages: 386 Registered: August 2014 Location: Utah, USA
|
Senior Member |
|
|
Quote:yes, it has one or more records to Display in the Detail block.
If there is more than one record, then you have to loop through the record set to process/display each row.
select Name, description, nvl(title),0)
into :blk1.name, :blk1.expl, :blk1.sub
from table1
where pid = :blk1.pid;
If all of the values are from a single table, why not simply create a block based on this table and set the WHERE_CLAUSE of the block to filter the records by the :BLK1.PID?
Craig...
|
|
|
Re: post-query Trigger error [message #640387 is a reply to message #640385] |
Mon, 27 July 2015 17:12 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
CraigB
If there is more than one record, then you have to loop through the record set to process/display each row
If this detail block is a database block (nobody said that it isn't) and POST-QUERY is used to populate non-database items, then I disagree with you, Craig.
|
|
|