Home » Developer & Programmer » Forms » problem with runtime where clause
problem with runtime where clause [message #268454] Tue, 18 September 2007 13:16 Go to next message
Messages: 141
Registered: November 2006
Location: india
Senior Member

i am using a view(all_data) in forms6i.
now i writing a code that is

runtime_where_clause varchar2(500);
runtime_where_clause := 'where '||:a1||:a2||:a3||:a4;
insert into temp_dc_spcn(dcan)
(select dcan from all_data runtime_where_clause);

by that code it should add the where clause at runtime, so by that code it should filter the data and insert the records as per where clause but it is inserting all the records of all_data into temp_dc_spcn;

please help me .........


note := i am using non database block and can't use database block.

[Updated on: Tue, 18 September 2007 13:30]

Report message to a moderator

Re: problem with runtime where clause [message #268469 is a reply to message #268454] Tue, 18 September 2007 15:59 Go to previous messageGo to next message
Messages: 20847
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What is the result of the following code (i.e. insert the MESSAGE statement in there):
  runtime_where_clause := 'where '||:a1||:a2||:a3||:a4;

Can you see a reason for inserting all records instead of only a part of them? What if you use this WHERE clause in an SELECT statement and run through SQL*Plus? What happens?
Re: problem with runtime where clause [message #268521 is a reply to message #268454] Wed, 19 September 2007 00:09 Go to previous message
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Why are you manually inserting records?

Populate block using cursor
and my feelings about it.
Another one of my rants.

Previous Topic: Screen Resolution
Next Topic: adding values in a table from list item
Goto Forum:

Current Time: Mon Oct 24 15:57:56 CDT 2016

Total time taken to generate the page: 0.08414 seconds