Current Position:Home > Query based on parameters

Query based on parameters

Update:10-11Source: network consolidation
Advertisement
Hello,
I have two forms. The first takes several values that are entered and then passes them as parameters to the second form. How can I retrieve all records (execute query) in the second form based on the passed parameters.
What I want to do is search a specific table for values that match those parameters (=), or are based on a condition(>,< ...).
Some of the fields in the first form might also be left empty if I dont want to include them in my search.
I would be grateful for any help !
Thanks

The Best Answer

Advertisement
Try this in a pre-query trigger... I didnt test this for typos... But, this is the basic jist of how to do it...
declare
  v_where_clause varchar2(4000);
begin
v_where_clause := '1 = 1';
if :empno is not null then
  v_where_clause := v_where_clause || ' and empno = :empno';
end if;
if :job is not null then
  v_where_clause := v_where_clause || ' and job = :deptno';
end if;
set_block_property('myblock', default_where, v_where_clause);
end;Message was edited by:
Mark Reichman
  • Query based on parameters Update:10-11

    Hello, I have two forms. The first takes several values that are entered and then passes them as parameters to the second form. How can I retrieve all records (execute query) in the second form based on the passed parameters. What I want to do is sea

  • Content presenter: datasource based on CMIS query with URL parameters Update:11-30

    Hi all, I am trying to create a page containing a content presenter taskflow that is based on a CMIS query containing URL parameters. In my component properties I define the following query for my datasource: +SELECT * FROM ora:t:IDC:GlobalProfile WH

  • SOURCING10: Passing parameters to a Query Based webservice using JAVA Update:10-11

    Hi Experts, I have been working on consuming a Query based webservice published in Souricng10 in a simple JAVA class. The query has a filter parameter which is not mandatory. I am able to consume the webservice using the GET method and display the co

  • Query Based Taxonomy - Dynamic Creation of a Query Problem Update:10-11

    Hi, I'm trying to create new category nodes in a taxonomy and to assing them queries. I know how to do this, but I encountered a strange behavior. Here is the situation: I have a string property DocumentType. When manualy creating a query, it looks l

  • How to write XSJS Select Query with input parameters Update:10-11

    Hello Experts, I am creating a xsjs file and in that file I am trying to write a Select Query based on a Calculation View I have tried it the following way: var query = 'SELECT TOP 100 \"Name\", \"Address\", \"City\", \"

  • Dynamic report based on Parameters and a Button Update:11-30

    Trying to make a dynmic report based on Parameters entered.Wanted to refresh report when i click on a button say "OK" based on parameters entered. (1) created 2 text boxes -- Parameters --One date and other employee No (2) on the same page i cre

  • Query based taxonomy from scratch gives NoSuchMethodError... Update:10-11

    I'm trying to create a query based taxonomy following the instuctions specified in the help docs: KM Platform -> Admin Guide -> Content Mgmt -> Taxonomies and Classification -> Creating a QBT -> from scratch. I created an index on a newly c

  • BEx query based on virtual cube donu00B4t display a valid List of Value (LOV) Update:10-11

    Hello I have a problem with an invalid LOV. The scenario is the following; There´s a BEx query based on a virtual cube. The query has an exit variable on caracteristic that is based on 0CALMONTH. At Universe Designer I simply create a connection, a u

  • Running a SQL Stored Procedure from Power Query with Dynamic Parameters Update:10-11

    Hi, I want to execute a stored procedure from Power Query with dynamic parameters. In normal process, query will look like below in Power Query. Here the value 'Dileep' is passed as a parameter value to SP.     Source = Sql.Database("ABC-PC", &q

  • Include Button that executes PL/SQL procedure to SQL query based region Update:10-11

    I would like to add two columns to a SQL query region. These columns would not be sourced from the query, but rather would be used to execute a PL/SQL procedure. For example, I would like to have a manager approve or deny adding an additional employe