Solved

filter data block

Posted on 2014-10-11
6
154 Views
Last Modified: 2014-10-17
hi
i have tabular form based on database table
i want to filter records based on many criteria

i started with one column like this :

i created no database block , create non database item name it : t_date  
i created one push button , i set the when button press like this
 
SET_BLOCK_PROPERTY('gen_ledgers',DEFAULT_WHERE ,to_date(:genral.t_date)); 
  execute_query; 

Open in new window

but when i select a date into t_date then i pressed the button , it return error , enable to perform a uqery
0
Comment
Question by:NiceMan331
  • 4
  • 2
6 Comments
 
LVL 10

Expert Comment

by:HuaMinChen
Comment Utility
Can you instead create database block by putting the current table name to that block, and retry? thanks
0
 

Author Comment

by:NiceMan331
Comment Utility
you mean instead of creating the non_database block , i create another database block ?
or to shift the non_database items to the tabular database block ?
0
 
LVL 10

Expert Comment

by:HuaMinChen
Comment Utility
To shift it to tabular database block. thanks
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:NiceMan331
Comment Utility
sorry , i didn't understand
can please do more explanation
0
 

Accepted Solution

by:
NiceMan331 earned 0 total points
Comment Utility
i got the solution
i had mistake in the trigger
the correct  code is like this

declare
	x varchar2(1000); 
begin

	X := 'Acc_no = 21210';
	X := X || '  AND   ' || 'doc_date > = ' || chr(39) ||to_char(:gen_ledgers.F_date, 'dd-mm-yyyy')|| chr(39);
	x := X || '  AND   ' || 'doc_date < = ' || chr(39) ||to_char(:gen_ledgers.t_date, 'dd-mm-yyyy')|| chr(39);

   SET_BLOCK_PROPERTY('gen_ledgers',DEFAULT_WHERE ,x);
 
   execute_query; 
 
   end;

Open in new window

0
 

Author Closing Comment

by:NiceMan331
Comment Utility
i got no useful answer
then i search the web , i found the answer in another site
if you like to not accept my answer , i have no problem to delete the question
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Via a live example, show how to take different types of Oracle backups using RMAN.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now