Home » Developer & Programmer » Forms » post-query Trigger error (froms 10g)
post-query Trigger error [message #640154] Thu, 23 July 2015 02:42 Go to next message
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 Go to previous messageGo to next message
cookiemonster
Messages: 13920
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 #640156 is a reply to message #640155] Thu, 23 July 2015 02:47 Go to previous messageGo to next message
palpali
Messages: 138
Registered: December 2014
Location: India
Senior Member
Hi .. Smile
thankx for your prompt reply Smile

yes, it has one or more records to Display in the Detail block.
can you please help me, how can i do this?
Re: post-query Trigger error [message #640158 is a reply to message #640156] Thu, 23 July 2015 02:59 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Do what exactly?
Remember that we know nothing about what form or DB other than what you tell us.
Re: post-query Trigger error [message #640169 is a reply to message #640158] Thu, 23 July 2015 04:41 Go to previous messageGo to next message
Littlefoot
Messages: 21807
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 #640183 is a reply to message #640169] Thu, 23 July 2015 07:41 Go to previous messageGo to next message
palpali
Messages: 138
Registered: December 2014
Location: India
Senior Member
thank you all Smile
Re: post-query Trigger error [message #640385 is a reply to message #640156] Mon, 27 July 2015 16:03 Go to previous messageGo to next message
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 Go to previous message
Littlefoot
Messages: 21807
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.
Previous Topic: developer 66 slow to response in window 7
Next Topic: set_item_property..
Goto Forum:
  


Current Time: Tue Apr 23 04:41:56 CDT 2024