How to avoid repeat where clause in oracle sql

Hi,
Please find my query below, I need a help to avoid duplication of **where** clause in my query.
In my below query, **JOIN** condition is same for both the queries and **WHERE** condition also same except this clause "and code.code_name="transaction_1"
In **IF ** condition only credit and debit is swapped on both queries, due to this **Credit and Debit** and this where clause "and code.code_name="transaction_1" I am duplicating the query. Can you please give some solution to avoid this duplication. I am using oracle 11g
select DAY as business_date,sum(amount) as AMOUNT, type_amnt as amount_type,test_code as code_seg
from
select table1_alias.date as DAY,code.code_numb as test_code,
CASE
WHEN qnty_item > 0 THEN 'credit'
ELSE 'debit'
END as type_amnt,
"25.55" as amount
from
code_table code,
table1 table1_alias
join table2 table2_alias on table1_alias.id = table2_alias.id
where
table1_alias.state="OK"
and table1_alias.type="R"
and code.code_type="Movie"
and code.code_name="transaction_1"
UNION ALL
select table1_alias.date as DAY,code.code_numb as test_code,
CASE
WHEN qnty_item > 0 THEN 'debit'
ELSE 'credit'
END as type_amnt,
"25.55" as amount
from
code_table code,
table1 table1_alias
join table2 table2_alias on table1_alias.id = table2_alias.id
where
table1_alias.state="OK"
and table1_alias.type="R"
and code.code_type="Movie"
and code.code_name="transaction_2"
group by DAY, test_code,type_amnt
Thanks

user10624672 wrote:
Hi,
Please find my query below, I need a help to avoid duplication of **where** clause in my query.
In my below query, **JOIN** condition is same for both the queries and **WHERE** condition also same except this clause "and code.code_name="transaction_1"
In **IF ** condition only credit and debit is swapped on both queries, due to this **Credit and Debit** and this where clause "and code.code_name="transaction_1" I am duplicating the query. Can you please give some solution to avoid this duplication. I am using oracle 11g
select DAY as business_date,sum(amount) as AMOUNT, type_amnt as amount_type,test_code as code_seg
from
select table1_alias.date as DAY,code.code_numb as test_code,
CASE
WHEN qnty_item > 0 THEN 'credit'
ELSE 'debit'
END as type_amnt,
"25.55" as amount
from
code_table code,
table1 table1_alias
join table2 table2_alias on table1_alias.id = table2_alias.id
where
table1_alias.state="OK"
and table1_alias.type="R"
and code.code_type="Movie"
and code.code_name="transaction_1"
UNION ALL
select table1_alias.date as DAY,code.code_numb as test_code,
CASE
WHEN qnty_item > 0 THEN 'debit'
ELSE 'credit'
END as type_amnt,
"25.55" as amount
from
code_table code,
table1 table1_alias
join table2 table2_alias on table1_alias.id = table2_alias.id
where
table1_alias.state="OK"
and table1_alias.type="R"
and code.code_type="Movie"
and code.code_name="transaction_2"
group by DAY, test_code,type_amnt
ThanksA very brief glance and it looks to me like the only difference between the 2 queries are
and code.code_name="transaction_1"In the first portion and
and code.code_name="transaction_2"So if that's all that is difference, you'd just want to use a single query (no union's) with
and code.code_name in ('transaction_1', 'transaction_2')Cheers,

Similar Messages

  • Clarification on using function in where clause of oracle sql query

    I have an issue in regarding function using where clause of sql query..
    We are facing performance issue while executing query, so in what ways to improve the performance of the query which i have posted below.
    select col ,case when my_function(parameter)
    from tab1 a ,tab2 b,tabl3 c
    where a.column1=b.column2
    and b.column3 =c.column6
    and my_function(parameter)>0
    Regards
    Dinesh
    Edited by: wild fire on May 18, 2012 4:15 PM

    Dinesh,
    remind that when you use a function in the where clause it normally will get started for each record in the table.
    So your answer is two-fold:
    1. make the function only start when needed by adding a function based index on the table (this will make inserts and updates slower)
    2. make the function faster by adding the DETERMINISTIC clause if possible. this will make Oracle "cache" the result of the function.
    Regards,
    Richard
    blog: http://blog.warp11.nl
    twitter: @rhjmartens
    If this question is answered, please mark the thread as closed and assign points where earned..

  • How to dynamically update columns in a where clause to a SQL query in OSB?

    Hi Gurus,
    I have a requirement where in we need to dynamically update a where clause to a SQL query in OSB(11.1.1.6.0).
    For example:
    If the JCA sql string is "select * from emp where emp_id = 100 and emp_status ='Permanent'" now i want to change this where clause and the new query has to be like "select * from emp where emp_name like 'S%' and emp_dept like 'IT' ". basically we need to change the where clause dynamically.
    We can also use "fn-bea:execute-sql()" in a xquery but I don't want to use this function as creates a new connection.
    I have done some home work and found out --> as per the DOC "http://docs.oracle.com/cd/E23943_01/dev.1111/e15866/jca.htm#OSBDV943" section: "25.5.2 JCA Transport Configuration for Proxy and Business Services", when a business service is created by using JCA, we can see Interaction Spec Properties under JCA Transport Tab. This will have a property "SqlString' and we can over ride it. But I am unable to figure out how to over ride the value. I have tried by using Transport Headers activity but no luck. Please guide me how to achieve this?
    Thanks in advance
    Surya

    I solved my problem.
    In my header renderer, I simply added a line to set the text to the object value "label.setText( (String) value );" (where label is an instance of a JLabel.
    Thank you to who took some time to think about it.
    Marc

  • How do I modify the WHERE clause in my SQL query?

    This seems like such a straight-forward part of the report design, but I'm fairly new to Crystal Reports and I only have experience with modifying reports someone else has already written.  In this particular case, I just need to modify the WHERE clause of the SQL query.  I can select Show SQL Query and see what statement is being used to select data, but I can't find where to modify it since it's grayed out.  I see how to change the selection criteria, parameters, grouping, etc...just not the WHERE clause.  The report is linked to a database used for reporting with a table created and populated by a stored procedure.  I don't need to modify the stored procedure because the data I want to filter by is currently in the table--I just don't know how to filter by what I need.  Here's part of the query:
    SELECT "rpt_dist"."startdate", "rpt_dist"."transtype", "rpt_dist"."laborcode", "rpt_dist"."crewid", "rpt_dist"."regularhrs" FROM   "Reporting"."dbo"."rpt_dist" "rpt_dist"
    WHERE  (rpt_dist."transtype" <> 'WORK' AND rpt_dist."transtype" <> 'WMATL') AND rpt_dist."laborcode" LIKE 'S%' AND (rpt_dist."crewid" = 'HOUS' OR rpt_dist."crewid" = 'HOUS2' ...
    I would like to add another crewid to the WHERE clause.  Thanks for any input.

    1.Open the report in the crystal designer
    2.Go to the field explorer(if hidden go to view menu->field explorer)
    3.Rt. click on the database fields->choose database expert
    4.Now you will see 2 columns-Available DataSource  and Selected Tables
    5.Rt. click on the object(ex.command) available in the Selected Tables column->Choose Edit command
    6.A new Modify Command window will appear,here you can edit your SQL Query
    I get to step 4 and I see the two columns including my database and the report table, but there is no command object available.  If I right-click on my table, I can just view the Properties. ??
    As for the other tip to modify the record selection:  I don't see anywhere the other crewid values are set and if I add the one I'm missing, it doesn't modify the existing SQL Query and when I preview the report it throws off the results so that no data displays??
    I'm using Crystal Reports 11.5 if that makes a difference.  Thanks again.

  • How to open a package body in Oracle sql developer

    How to open a package body in Oracle sql developer..any shortcut for that

    I need another way to get to my package body. I'm on a locked down system, so the only way I can reference anything is if I already know the name of it. I accidentally overwrote my text document that I was using to work on it and I closed out of the package body in sqldeveloper. There must be a command, like an alter or some such. Anyone know the old fashioned way of looking at a package?

  • How to use a Sybase table in Oracle SQL statement?

    How to use a Sybase table in Oracle SQL statement?
    Sybase version : 11.9.2.4
    Oracle version : 10.2.05
    Thanks.

    user12088323 wrote:
    How to use a Sybase table in Oracle SQL statement?
    Sybase version : 11.9.2.4
    Oracle version : 10.2.05
    Thanks.Any Oracle client connected to the Oracle database can access Sybase data through the <font style="background-color: #FFFFCC">Database Gateway for Sybase</font> (it requires an additional license) or the <font style="background-color: #FFFFCC">Database gateway for ODBC</font> (it's free).
    The Oracle client and the Oracle database can reside on different machines. The gateway accepts connections only from the Oracle database.
    A connection to the gateway is established through a database link when it is first used in an Oracle session. In this context, a connection refers to the connection between the Oracle database and the gateway. The connection remains established until the Oracle session ends. Another session or user can access the same database link and get a distinct connection to the gateway and Sybase database.
    Database links are active for the duration of a gateway session. If you want to close a database link during a session, you can do so with the ALTER SESSION statement.
    To access the Sybase server, you must create a <font style="background-color: #FFFFCC">database link</font>. A public database link is the most common of database links.
    SQL> CREATE PUBLIC DATABASE LINK dblink CONNECT TO
    2  "user" IDENTIFIED BY "password" USING 'tns_name_entry';
    --dblink is the complete database link name.
    --tns_name_entry specifies the Oracle Net connect descriptor specified in the tnsnames.ora file that identifies the gatewayAfter the database link is created you can verify the connection to the Sybase database, as follows:
    SQL> SELECT * FROM DUAL@dblink;
    Configuring Oracle Database Gateway for Sybase
    <font style="background-color: #FFFFCC">{message:id=10649126}</font>

  • How to avoid repeatation of code

    hi
    My code is as mentioned below.
    if l_location ='USA'
    insert into location
    select f1,f2,f3,f4
    from usa_tab
    else if l_location = 'FRANCE'
    insert into location
    select f1,f2,f3,f4
    from france_tab f , x1_tab x
    where f.id = x.id
    else if l_location = 'UK'
    insert into location
    select f1,f2,f3,f4
    from uk_tab u,y1_tab y
    where u.id = y.id
    end if;
    how to avoid the repeatation of code here?

    954992 wrote:
    it is an existing application. The tables can not be changed.
    actually here the insert and select statements are fixed , only the from and where conditions are getting changed.
    howf to avoid repeatation of the fixed code?Oracle supports features called "+partition views+" and "+instead of triggers+". This can be used to glue tables (same structure) together and select and insert against these tables via a view.
    Basic example:
    // tables that constitutes the partition view - a check constraint on
    // country is used to specify which cities are in which table, similar
    // to a partition key
    SQL> create table location_france(
      2          country varchar2(10) default 'FRANCE' not null,
      3          city    varchar2(20) not null,
      4          --
      5          constraint chk_france check (country in 'FRANCE'),
      6          constraint pk_location_france primary key
      7          ( country, city )
      8  ) organization index;
    Table created.
    SQL> create table location_uk(
      2          country varchar2(10) default 'UK' not null,
      3          city    varchar2(20) not null,
      4          --
      5          constraint chk_uk check (country in 'UK'),
      6          constraint pk_location_uk primary key
      7          ( country, city )
      8  ) organization index;
    Table created.
    SQL> create table location_spain(
      2          country varchar2(10) default 'SPAIN' not null,
      3          city    varchar2(20) not null,
      4          --
      5          constraint chk_spain check (country in 'SPAIN'),
      6          constraint pk_location_spain primary key
      7          ( country, city )
      8  ) organization index;
    Table created.A partition view is a view that uses union all to glue these tables together:
    SQL> create or replace view locations as
      2          select * from location_france
      3          union all
      4          select * from location_uk
      5          union all
      6          select * from location_spain
      7  /
    View created.To support inserts against the partition view, an instead-of trigger is used:
    SQL> create or replace trigger insert_location
      2          instead of insert on locations
      3  begin
      4          case :new.country
      5                  when 'FRANCE' then
      6                          insert into location_france values( :new.country, :new.city );
      7                  when 'UK' then
      8                          insert into location_uk values( :new.country, :new.city );
      9                  when 'SPAIN' then
    10                          insert into location_spain values( :new.country, :new.city );
    11          else
    12                  raise_application_error(
    13                          -20000,
    14                          'Country name ['||:new.country||'] is not supported.'
    15                  );
    16          end case;
    17  end;
    18  /
    Trigger created.Rows can now be inserted into the view and the trigger will ensure that the rows wind up in the correct table.
    SQL> insert into locations values( 'FRANCE', 'PARIS' );
    1 row created.
    SQL> insert into locations values( 'UK', 'LONDON' );
    1 row created.
    SQL> insert into locations values( 'SPAIN', 'BARCELONA' );
    1 row created.As with a partition table, a select on a partition view that uses the "partition column" (in this case, the COUNTRY column), the CBO can prune the non-relevant tables from the view and only select against the relevant table. In the following example, the UK is used as country filter and the CBO shows that only table LOCATION_UK is used.
    SQL> set autotrace on explain
    SQL> select * from locations where country = 'UK';
    COUNTRY    CITY
    UK         LONDON
    Execution Plan
    Plan hash value: 1608298493
    | Id  | Operation           | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT    |                    |     1 |    19 |     1   (0)| 00:00:01 |
    |   1 |  VIEW               | LOCATIONS          |     1 |    19 |     1   (0)| 00:00:01 |
    |   2 |   UNION-ALL         |                    |       |       |            |          |
    |*  3 |    FILTER           |                    |       |       |            |          |
    |*  4 |     INDEX RANGE SCAN| PK_LOCATION_FRANCE |     1 |    19 |     2   (0)| 00:00:01 |
    |*  5 |    INDEX RANGE SCAN | PK_LOCATION_UK     |     1 |    19 |     2   (0)| 00:00:01 |
    |*  6 |    FILTER           |                    |       |       |            |          |
    |*  7 |     INDEX RANGE SCAN| PK_LOCATION_SPAIN  |     1 |    19 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       3 - filter(NULL IS NOT NULL)
       4 - access("COUNTRY"='UK')
       5 - access("COUNTRY"='UK')
       6 - filter(NULL IS NOT NULL)
       7 - access("COUNTRY"='UK')
    Note
       - dynamic sampling used for this statement (level=2)
    SQL>Oracle provides a number of methods to address flawed data models and problematic client code. However, despite this flexibility on Oracle's part, you should still consider fixing the flawed design and code - as that flaws invariable mean reducing flexibility, performance and scalability.

  • How to dynamically build where clause in Linq

    Hello everyone,
    Oracle DB:11gR2
    Oracle Client: 11.2.0.3.0 (ODP.NET)
    Oracle Developer Tools for Visual Studio
    VS 2010 (C#)
    In a Windows Form, we need to query the data based on the values of dropdown listboxes, which user will select.
    Let's say, two combox, one is for Department and one is for Salary
    Department:
    -1 All
    10 Department 1
    20 Department 2
    30 Department 3
    Salary:
    -1 All
    1 < 20000
    2 20000 to 50000
    3 50000 to 100000
    4 > 100000
    Here is C# code to query data:
    using (var myEDMctx = new HREntities())
    var LINQrslt = from emp in myEDMctx.EMPLOYEES
    select emp;
    The default values for both combox should be All.
    How to write the dynamic where clause for this LINQ?
    Thanks in advance!!!

    There is nothing Oracle-specific about dynamic LINQ queries. Dynamic LINQ queries are handled all the same way, no matter which data source you use. Microsoft describes how to use Dynamic LINQ here:
    http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx
    http://weblogs.asp.net/davidfowler/archive/2010/08/19/dynamic-linq-part-2-evolution.aspx

  • How to set dynamic where clause in ADF?

    Hi,
    I have a View object called BillInfoVO. This has
    all the information about who created the request, the time , status etc.,
    I need to display this VO in a jsp. But before I display, i need to fileter this
    VO results with different where clauses according to the role of the user.
    For example, if the role is admin, then
    where clause should be 'status = 'Completed, and created by = 'Current user'
    If the role is requestor, then
    the where clause should be
    sales manager id = 'Current user' and
    Status != Complete etc.,
    Could any one please let me know how I can
    dynamically set the where clause to filter the appropirate
    result row set in the jsp?
    Your help will be greatly appreciated.
    Thanks,
    venki

    You'll create a service method in your AM that will use the setWhereClause method of a viewobject.
    Then you'll expose it as a client method.
    Then you'll drag it from your data-control onto a button in your JSF page that will call your page for the query.
    More about service methods here:
    http://download.oracle.com/docs/html/B25947_01/bcservices003.htm#sm0206
    http://download.oracle.com/docs/html/B25947_01/bcquerying008.htm#sthref286

  • Using OR operator in the WHERE clause in Oracle BI

    Hi, i am using Oracle BI EE 10.1.3.3.3.
    I construct the simple report in BI Answers on the Accounts presentation layer, and use the following filter clause:
    "WHERE (AccountNum BETWEEN '441' and '473') OR (БалСчет1Порядка BETWEEN '501' and '519')"
    Then i look in the cursor cache and find the real query which is going to database, and it's "where" clause now is:
    "where ( (T45172.BA >= '441' or T45172.BA >= '501') and
    (T45172.BA >= '441' or T45172.BA <= '519') and
    (T45172.BA >= '501' or T45172.BA <= '473') and
    (T45172.BA <= '473' or T45172.BA <= '519') ) "
    Why BI create so many expressions instead of the source 2 expressions?
    How can i force BI to use the source expressions?

    I have the same settings too.
    I post the following query in the Administration web interface, and set the maximum logging level (7):
    SELECT "Plan Account"."Balance Account" saw_0
    FROM "Plan Account"
    WHERE ("Plan Account"."Balance Account" between '441' and '473')
    OR ("Plan Account"."Balance Account" between '501' and '519')
    ORDER BY saw_0
    And got the following BI execution plan:
    RqList <<5619441>> [for database 0:0,0] distinct D1.c1 as c1 [for database 3023:44913,46]
    Child Nodes (RqJoinSpec): <<5619450>> [for database 3023:44913:DB,46]
    RqList <<5619277>> [for database 3023:44913:DB,46]
    D1.c1 as c1 GB [for database 3023:44913,46]
    Child Nodes (RqJoinSpec): <<5619360>> [for database 3023:44913:DB,46]
    RqList <<5619284>> [for database 3023:44913:DB,46]
    Dim - Plan Account.BA as c1 GB [for database 3023:44913,46]
    Child Nodes (RqJoinSpec): <<5619350>> [for database 3023:44913:DB,46]
    TB_PLAN_ACCOUNT T45172
    DetailFilter: (not Dim - Plan Account.BA < '441' or not Dim - Plan Account.BA < '501') and (not Dim - Plan Account.BA < '441' or not '519' < Dim - Plan Account.BA) and (not Dim - Plan Account.BA < '501' or not '473' < Dim - Plan Account.BA) and (not '473' < Dim - Plan Account.BA or not '519' < Dim - Plan Account.BA) [for database 0:0]
    ) as D1
    ) as D1
    OrderBy: c1 asc [for database 0:0,0]
    and following query sent to database:
    -------------------- Sending query to database named DB (id: <<5619277>>):
    select distinct D1.c1 as c1
    from
    (select distinct T45172.BA as c1
    from
    TB_PLAN_ACCOUNT T45172 /* Dim - Plan Account */
    where ( (T45172.BA >= '441' or T45172.BA >= '501') and (T45172.BA >= '441' or T45172.BA <= '519') and (T45172.BA >= '501' or T45172.BA <= '473') and (T45172.BA <= '473' or T45172.BA <= '519') )
    ) D1
    So, i got the same bad where clause...
    What can you advice?

  • How to set dynamic WHERE clause to VO from backingBean?

    Hi,
    Can any one let me know the best way to add the dynamic WHERE clause in to VO query.
    I have created AM (with AMImpl.java) & VO (with VOImpl.java & VORowImpl.java) in my model project. I suppose to set the WHERE condition at runtime while the user click the search button. I am handling the user button click at UI layer backingBean. From the backing bean I could able to get the objct of the VO and set the where clause by below code.
            ValueExpression valueExp = elFactory.createValueExpression(elContext, "#{bindings.UserSearchVO1Iterator}", Object.class);
            DCIteratorBinding dcIter = (DCIteratorBinding)valueExp.getValue(elContext);
            ViewObject userSearchVO = dcIter.getViewObject();
            userSearchVO.setWhereClause("lower(usr_login) LIKE ':1' and usr_udf_suid like ':2' ");
            userSearchVO.executeQuery();But as I fear this is not the right way to do it. So I am creating the cutom method inside the VOImpl.java and triggring that method by creating one more cutom method in AMImpl.java. But I dont know how to invoke this AM method from backingBean.
    AMImpl method
    public void initDetails()
            UserSearchVOImpl vo = getUserSearchVO1();
            vo.initQuery();
    VOImpl method
        public void initQuery()
            setWhereClause("lower(usr_login) LIKE 'a%' and usr_udf_suid like '%1144%'");
            executeQuery();
        }Can any one guide me which is the best way to set the where clause to VO? How to call the AM method from backingBean?
    Thanks
    kln

    i am new to oracle 11g i writing a stored procedure in which i have made use of case in where clause to pass my parameter value v_toStoreID
    i have googled a lot regarding that i found that to use case in where clause it should be like this
    where
    case  column_value
    when 0
    then value1
    else
    value2
    end
    this my query
    SELECT ITMID as ItemId,
    NVL(OrderDtl.PackageID, 0) PackageId,
    OrderDtl.OrdDtlID,
    (CASE NVL(OrderDtl.PackageID, 0)
    WHEN 0
    THEN 1
    ELSE 0
    END) as PackageFlag,
    ivitem.Code ItemCode,
    ivitem.ITMNAME AS itemName,
    IvPatientIssueMst.IssueNo Issue_No,
    to_char(Issuedate, 'DD/MM/YYYY') IssueDate,
    OrderDtl.OrdQty,
    NVL(OrderDtl.AllocationID, 0) Package,
    OrderDtl.ServiceAmount MRP
    FROM IvPatientIssueMst
    JOIN OrderMst
    ON IvPatientIssueMst.OrderId = OrderMst.OrdId
    JOIN OrderDtl
    ON OrderDtl.OrdID = OrderMst.OrdId
    JOIN ivitem
    ON ivitem.ITMID = OrderDtl.DrugId
    LEFT JOIN IVPatientIndentMst
    ON IVPatientIndentMst.IndentID = IvPatientIssueMst.IndentId
    WHERE OrderMst.OrdVisitID = 395899
    AND
    *(CASE IvPatientIssueMst.StoreId*
    when NVL(IvPatientIssueMst.StoreId, 0)=0
    THEN v_toStoreID
    ELSE  IVPatientIndentMst.ToStoreID
    END)
    ORDER BY ivitem.ITMNAME;
    it is not working please someone help

  • How to retrieve the 'Where Clause' text?

    Hello all,
    I have created a package to retrieve all the DML's executed against the database for the day, for a particular user. DBMS_LOGMNR package was used to retrieve DMLs. But the DMLs retrieved have their 'WHERE' clause text converted to ROWID's. I need to find out the 'WHERE' clause with the parameters.
    I tried retrieving values from the v$sql views, but that information is cryptic and very volatile.
    Is there a way to retrieve the 'Where' clause? If not, is there a way to retrieve the 'WHERE' clause information using a trigger against the corresponding table.
    I am desparately lookin'for a solution. Hope someone out there can help me out.
    Regards,
    Prabu Raghav.

    Hi Andrew,
    Thanks for the suggestion.
    I am using Oracle 8i not 9i.FGA using DBMS_RLS let's me add policies and retrieve all other information about a user except the SQL statement that's executed by the user.
    I want to retrieve the Current sql statement executed against the table by a particular user and record it.
    Any suggestions?
    Regards,
    Prabu Raghav.

  • How to set the where clause of a value set on the basis of a form field

    I am using a DFF(Descriptive FlexField), which needs to display the value of a certain column(say columnA) on the basis of the value of another column(say columnB).
    So i have created a value set which points to the table which has both these columns, and the DFF uses this value set. However, the problem is that I have not put any where clause in the value set, because of which i cannot handle the exact fetch returns more than one rows error.
    The query has to be as follows:
    select ColumnA from tbl where ColumnB = [ a form value ];
    What I want to know is how can i get the value of a certain field of a certain block of the form in the above query.
    Edited by: 981615 on Jan 14, 2013 12:48 AM
    Edited by: 981615 on Jan 14, 2013 12:48 AM

    Just have a look over these two statements if it solves your problem
    one time where clause
    Set_Block_Property('BLOCK_NAME',ONETIME_WHERE,your form item);
    dynamic where clause
    set_block_property('BLOCK_NAME'default_where, your form itme)
    you can where clause at run time from any procedure or some triggers

  • How to avoid repeated emails using send email tasks in package?

    Hi,
    I have package with two sqeuence containers which are not connected.So when I was using send email tasks I was getting repeated emails like 5 to 6 emails.So, can someone hep me on this.How can we avoid repeated emails.
    Regards,
    Sudha
    sudha

    See this example on preventing executing a task within an Event Handler:
    http://microsoft-ssis.blogspot.com/2014/07/prevent-events-executing-multiple-times.html
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • How to edit the where clause of View object in search example dynamically

    Hi,
    I am new to OA Framework. Can anybody please tell me how can I assign the where clause dynamically. I want to search only those rows whose creation date is between a 'Date form' and 'Date to' inputs from the search page
    Thanks
    Anupam

    user567342 ,
    I will advice u again pls refer dev guide, there u can find code sample for ur requirement, which can be accomplished using stringbuffer.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • What's new in the CS5.5 SDK?

    OK, well, not a whole lot. But since I went through and diffed it against CS5, I though I'd share. This is from the Mac perspective. Some documentation reorganization -- getting-started.pdf moved into docs/guides and whats-new.pdf disappeared and we

  • Number of data files per database!

    Hello, http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/limits002.htm#i287915 reads >> Database files Maximum per tablespace Operating system dependent; usually 1022 Maximum per database 65533 May be less on some operating systems Limit

  • Restoring Firefox tabs to new desktop, from earlier synced smartphone?

    I was refreshing my computer, by installing a new hard drive, and thus had to re install everything on it. But, before doing that, I synced my Firefox tabs, to my mobile's Firefox browser. But, now, when I'm trying get those tabs back on the desktop,

  • Sub Clips In Movie Clips

    Ok, I have continually run into this so i guess i just don't understand some foundation to how AS3 works. So, I have a movie clip in the library (ClipA) - it is linked to a class. Inside Clip A there are 3 other Movie Clips (SubClip1, SubClip2, SubCl

  • 7912 and CCM 4.2. Response redirect not working. 7912 Bug

    I'm using response.redirect. All of a sudden we do receive support cases from customers using CCM 4.1.3SR2 and 4.2. It turns out that when using response.redirect (ASP) it does work anymore. 7940,60 still works. You have to press a button twice to be