Help needed to apply the filter condition

I need to apply a filter condition based on the database environment:
1. only if the database name is UAT tb1. > 23 - OCT-2012 CREATED_DT.
2. only if the database name is OATS then tb1.application_no in ('1 ', ' 2')
3 If the database is a different database then these conditions do not apply.

Try this

Select  tb1.*,tb2.* from tb1
join tb2
on (tb1.col1=tb2.col1)
join (select  case when global_name='UATDB' then 'UAT'
                         when global_name='QATDB' then 'QAT'
                         else 'OTHERDB' end DB_NAME  from global_name) DB
on 1=1
where (DB.DB_NAME='UATDB' and tb1.CREATED_DT > 23-OCT-2012)
or (DB.DB_NAME='QATDB' and tb1.application_no in ('1' ,'2'))
or (DB.DB_NAME='OTHERDB');
 

Note: not tested code

Tags: Database

Similar Questions

  • How to apply the filter to a specific column condition, but not to the report?

    Hello

    I'm having a problem in the application of a filter to one of the column condition.
    I have a scheme with the table around 10 dimension tables and a fact. My requirement is to provide a count on the table of facts with associated with some other columns in the dimension tables.

    Lets consider a scenario with tables as sales (Fact), region (Dimension), Year (Dimension), Type of sale (Dimension).

    Now my requirement is to highlight the fields

    City (Region) - city
    Year-
    Sales Count (dirty table) - number of all sales of the fact table
    Sales Count (dirty table) - count of all sales of the fact which type of sale table is 'Cash'

    Here, my question is how to apply the filter condition of Sales Type = 'MONEY in' only on one of the Sales Count column that comes from the fact table. I want to be ordered for the fourth column, the filter condition.

    Can someone let me know how?

    Thank you

    You must do this:

    1) click the button column fx sales. (This procedure does than on fact, not attributes.0

    2) click on the filter button.

    (3) select the size of sales from the left Type "selection list."

    (4) in the filter window, enter CASH, and click OK.

    This will create one filter on sales 'use' size 'type sales' as the filter. It willl filter only to this column.

  • How to use OMB to change the filter conditions in OWB maps

    Hello
    I want to know how we can use the OMB to change the filter conditions in an OWB map.

    In my scenario, I have a filter FLTR_1 operator in my cards and I need to change the filter condition of


    INOUTGRP1.ID IN (1,2)
    AND
    INOUTGRP1. VALUE > CONST_0_MAX_VAL

    TO

    INOUTGRP1.ID IN (1,2)
    AND
    INOUTGRP1. VALUE > CONST_6_MAX_VAL


    Just for more information for everyone we are migrating from OWB 9.2 10.2 OWB and we called constant procedures and used their values in filter conditions. 10.2 OWB generates the values for the constants in a way different than OWB 9.2 which is why this change is necessary. I want to automate the Act of changing the names of constants so that we can save time to change maps.

    THX

    Hello

    change in the framework of your database module, then try

    OMBALTER MAPPING 'MY_MAP' MODIFY OPEARTOR 'FLTR_1' SET PROPERTIES (FILTER_CONDITION) VALUES ('INOUTGRP1.ID IN (1,2) AND INOUTGRP1.VALUE > CONST_6_MAX_VAL ')
    

    Kind regards
    Carsten.

  • apply the filter command button does not

    Hello experts, I have the code to apply the filter of order button below, but when I click on the command button, it runs under code but works.   Array is not be filtered:

    {} public void applyTableFilters (ActionEvent actionEvent)

    FilterableQueryDescriptor qd = (FilterableQueryDescriptor) myTable.getFilterModel ();

    QueryEvent queryEvent = new QueryEvent (searchResultTable, qd);

    myTable.queueEvent (queryEvent);

    AdfFacesContext.getCurrentInstance () .addPartialTarget (myTable);

    }

    < af:commandButton text = "ApplyFilter".

    ID = "applyFiltersCB" styleClass = 'blue '.

    actionListener = "#{viewScope.myBean.applyTableFilters} '"

    Binding = "#{viewScope.myBean.applyFilterCB} '"

    immediate = "true" >

    < / af:commandButton >

    < af:table value = "#{bindings.myList.collectionModel}" var = 'row' "

    Rows = "#{Bindings.myList.rangeSize} '"

    emptyText = "#{bindings.myList.viewable?" "{'No RECS found': 'Access Denied.'}".

    fetchSize = "#{bindings.myList.rangeSize} '"

    disableColumnReordering = "true" rowBandingInterval = "1".

    inlineStyle = ' height: 400px; "

    filterModel = "#{bindings.myListQuery.queryDescriptor} '"

    queryListener = "#{bindings.myListQuery.processQuery} '"

    filterVisible = "true" varStatus = "vs."

    selectionListener = "#{viewScope.myBean.currentSelectionListener} '"

    rowSelection = "#{viewScope.myBean.rowSelectionMode} '"

    ID = "t1".

    Binding = "#{viewScope.myBean.MyTable}" >

    < af:column sortProperty = 'year' filterable = "true" sortable = "true".

    shortDesc = 'AnnΘe Prg'

    headerText = "Year" Prg"id = 'c4' >

    < af:outputText value = "#{row.yearCode}" id = "ot6" / > "

    < f: facet = name 'filter' >

    < af:inputText label = "" id = "it1" shortDesc = "Prg Yr Filter" "

    value = "#{vs.filterCriteria.yearCode} '"

    maximumLength = "5" >

    < / af:inputText >

    < / f: facet >

    < / af:column >

    ......................................

    < / af:table >

    Appreciate any help.

    Finally it worked.    The question is the table PPR using backing bean does not display the filtered data rather than it shows full data.  If I use UI PPR, then apply filter method works very well.

  • link to an interactive report AND apply the filter for 2 items.

    Hi can you help me out here on how to create a link to an interactive report AND apply the filter for 2 items.

    Here is my code

    I have a list of table, clicking the selected item should link to interactive report and create the filter. Below the code does not work for a filter. can you help me what to do with 2 filters.

    A filter = > works very well

    sys. HTP.p ("< ul class =" uChartList"> ');

    sys. HTP.p ("< class li =" uNumber uGrid col_2 col_sart"> ');

    sys. HTP.p ("< a href =" "|") sys. HTF.escape_sc ('f? p ='|: APP_ID |': 0 0 :'||: APP_SESSION |':00:P00_XXX:000, RIR:IREQ_XXX:Test :') |) » » >') ;

    sys. HTP.p ("< class =" uValue"> ' | l_tester |) ("< / big >");

    sys. HTP.p ("< small class =" uLabel"> < /small > Tester ');

    sys. HTP.p ("< /a > '");

    sys. HTP.p ("< /li >" ");

    Scenario 2:

    Two filters = > does not

    sys. HTP.p ("< ul class =" uChartList"> ');

    sys. HTP.p ("< class li =" uNumber uGrid col_2 col_sart"> ');

    sys. HTP.p ("< a href =" "|") sys. HTF.escape_sc ('f? p ='|: APP_ID |': 0 0 :'||: APP_SESSION |':00:P00_XXX:000, RIR:IREQ_XXX:Test:P00_YYY:001:IRC_YYY:test2 :') |) » » >') ;

    sys. HTP.p ("< class =" uValue"> ' | l_tester |) ("< / big >");

    sys. HTP.p ("< small class =" uLabel"> < /small > Tester ');

    sys. HTP.p ("< /a > '");

    sys. HTP.p ("< /li >" ");

    Thanks in advance

    actually the syntax wrong values in the syntax of the passes to several elements.

    is

    f? p = 6000:6004: & APP_SESSION. : NO:6003:MY_ITEM1, MY_ITEM2, MY_ITEM3:1234, 5678

    Use above scenario and verification.

    Go

  • Not able to apply the filter on certain groups of OBIEE integrated with EBS

    Hello

    We have integrated with EBS OBIEE. There are some pre configured in OBIEE RPD groups. These groups are all members of the Group GL safety rules. I applied the filter of some safety GL group business model... But are not filtering data for certain groups. For the rest of the groups it works fine.

    I applied after filter on table GL Business logical area. (VALUEOF (NQ_SESSION. ("" EBS_BUSINESS_AREA_FULL ") = 'X' OR Core. "Dim - GL business district '." "' Level 20 business code" = VALUEOF (NQ_SESSION. (("" EBS_BUSINESS_AREA "))

    But this filter does not work for the following groups
    (1) OBI Budget content Global Support
    OBI 2 overall content power user)

    While it works very well for the following groups
    (1) OBI UK broadcast finance.
    Director of finance 2) OBI UK broadcast.

    I'm new to EBS. If someone can explain how the EBS group are mapped with RPD OBIEE groups and how the security is implemneted then it will be a great help.


    Thank you
    Sandeep

    Hi Sandeep,

    You mean in Oracle eBS? That it would be something like this;

    Select user_id fur.user_name
    user_name fur.description
    rsp.responsibility_name
    rsp.description responsibility_description
    of apps.fnd_responsibility_vl RER
    apps.fnd_user_resp_groups furg
    applsys.fnd_user fur
    where rsp.responsibility_id = furg.responsibility_id
    and furg.user_id = fur.user_id
    and fur.user_name like nvl(:p_user_id,'%')
    and rsp.responsibility_name like nvl(:p_resp_name,'%')
    and furg.end_date is null
    order of rsp.responsibility_name;

    If you mean for Oracle BI EE, check the repository via Manager, security.

    I hope this helps.

    Good luck

    Daan Bakboord
    http://obibb.WordPress.com

  • APEX 5. Dynamic action on the CHANGE event does not work after applying the filter on IR.

    APEX 5.

    Dynamic action for the CHANGE event does not work after applying the filter on IR.

    Event: Change, selection Type: jQuery Selector, jQuery Selector: td [header = 'abc'] entry

    Real action

    Selection type: jQuery Selector, jQuery Selector: td [header = 'abc'] entry, Action: run the Javascript Code

    Is TI WHEREAS behavior?

    I know, I can work around this problem by using the Refresh event and javascript, but I prefer DA and if possible Change event.

    Concerning

    mdyla

    mdyla wrote:

    It is, how to force them reallocate dynamic Action in the event of CHANGE of the input elements after refresh of IR region.

    Set the dynamic scope of the event action to Dynamics.

  • Need help to apply the filter in my query

    Hello

    I have impact records in my table. These impacts are of two types, a normal incidence where I impact flag N and other altered impact where I impact flag Y. These impacts can have several status as 1. 2 cancelled. 3 closed. Open, etc.

    A single frequency can have several plan to fill that and more this plan contains multiple activities.

    Now I have to apply a filter to my report of the Sub conditions.

    I want to show all the records the impact of normal incidence.
    exclude impact modified records where status impact = cancelled
    exclude impact modified records where status is closed and there is no date of completion of the plan
    exclude the impact changed records where activity status = canceled


    Your help will be greatly appreciated.

    Thank you
    Shantanu

    Hi, Shantanu,

    That's what you asked for:

    SELECT    *
    FROM       table_x
    WHERE       incidence     = 'N'
    OR       (    status               != 1     -- Cancelled
           AND  (   status           != 2     -- Closed
                OR  completion_date     IS NOT NULL
                )
           AND  activity_status          != 'Cancelled'
           )
    ;
    

    Among other things, which means that the status and activity_status are never NULL. If it is not NULL, the solution is a little messier, but only a little: instead of things like

    status   != 1
    

    you have to say

    NVL (status, 0)   != 1
    

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.
    Explain, using specific examples, how you get these results from these data.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).
    See the FAQ forum {message identifier: = 9360002}

  • Need help | How to clear the filter of af values: table on table linen

    Hello

    JDeveloper version 11.1.1.7

    I have af:table inside a taskflow to which has been added to several pages as a region.

    The problem I'm facing is if I enter any value in current input for the data in the column filtering and if I navigate to another page that has even added taskflow as a region filter values is still visible.

    How can I clear the values entered in the input of the filter text.

    code fragment:

    < af:table value = "#{bindings." BulletinDataVO21.collectionModel}.

    Binding = "#{pageFlowScope.bulletinArchieveBean.bulletinTable} '"

    var = "row".

    lines = ' #{bindings. " BulletinDataVO21.rangeSize}.

    emptyText = "#{bindings." BulletinDataVO21.viewable? "{customtaskflowsBundle ['table.no.data.to.display']: customtaskflowsBundle ['table.access.denied']}."

    fetchSize = "#{bindings." BulletinDataVO21.rangeSize}.

    filterModel = "#{bindings." BulletinDataVO21Query.queryDescriptor}.

    queryListener = "#{pageFlowScope.bulletinArchieveBean.onQuery} '"

    filterVisible = "true" varStatus = "vs."

    rowBandingInterval = "0" id = "t1".

    styleClass = "datatable_inside_wrapper."

    autoHeightRows = "25" width = "700" >

    the queryListener at the bean code:

    {} public void onQuery (QueryEvent queryEvent)

    QPF FilterableQueryDescriptor =

    (FilterableQueryDescriptor) queryEvent.getDescriptor ();

    Map map < String, Object > = fqd.getFilterCriteria ();

    If (log.isDebugEnabled ()) {}

    {for (String key: {map.keySet ())}

    log. Debug ("touch of filter criteria:" + key + ", value:" +)

    Map.get('zoom') (Key));

    }

    }

    final String publishingFromKey = "Publishingfromdate";

    final String publishingToKey = "Publishingtodate";

    Object publishingFrom = map.get('zoom') (publishingFromKey);

    Object publicationdans = map.get('zoom') (publishingToKey);

    String titleValue = (String) map.get('zoom') ("Value");

    If (StringUtils.isNotEmpty (titleValue)) {}

    Map.put ("Value", "%" + titleValue + '%');

    }

    String targetDepts = (String) map.get('zoom') ("Targetdepts");

    If (StringUtils.isNotEmpty (targetDepts)) {}

    Map.put ("Targetdepts", '%' + targetDepts + '%');

    }

    Category String = (String) map.get('zoom') ("Category");

    If (StringUtils.isNotEmpty (category)) {}

    Map.put ("Category", "%" + category + '%');

    }

    DCBindingContainer links =

    (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    OperationBinding = setPublishingFromDateStartOperationBinding

    bindings.getOperationBinding ("setPublishingFromDateStart");

    OperationBinding = setPublishingToDateEndOperationBinding

    bindings.getOperationBinding ("setPublishingToDateEnd");

    setPublishingFromDateStartOperationBinding.getParamsMap () .put ("value",

    publishingFrom);

    setPublishingToDateEndOperationBinding.getParamsMap () .put ("value",

    Publicationdans);

    Map.Remove (publishingFromKey);

    Map.Remove (publishingToKey);

    setPublishingFromDateStartOperationBinding.execute ();

    setPublishingToDateEndOperationBinding.execute ();

    DcIteratorBinding = DCIteratorBinding

    bindings.findIteratorBinding ("BulletinDataVO2Iterator");

    ViewObjectImpl = bulletinVO

    (ViewObjectImpl) dcIteratorBinding.getViewObject ();

    final String publishingFromCriteria = "QueryByPublishingFromDate";

    final String publishingToCriteria = "QueryByPublishingToDate";

    If (publishingFrom! = null) {}

    bulletinVO.setApplyViewCriteriaName (publishingFromCriteria, true);

    } else {}

    bulletinVO.removeApplyViewCriteriaName (publishingFromCriteria);

    }

    If (publicationdans! = null) {}

    bulletinVO.setApplyViewCriteriaName (publishingToCriteria, true);

    } else {}

    bulletinVO.removeApplyViewCriteriaName (publishingToCriteria);

    }

    JSFUtils.invokeMethodExpression ("#{bindings.") BulletinDataVO21Query.processQuery} «»

    Object.Class, QueryEvent.class,

    queryEvent);

    Map.put ("Value", titleValue);

    Map.put ("Targetdepts", targetDepts);

    Map.put ("Category", category);

    Map.put (publishingFromKey, publishingFrom);

    Map.put (publishingToKey, publicationdans);

    }

    Please let me know we can clear the values entered in input boxes of text for filtering on whenever the load table.

    Thank you

    Madhukar

    Hi all

    I could solve the problem.

    Clear the fault and implicit criteria VO display!

    Here's the code to do the same.

    Hope it will be useful for others as well, also let me know if this can be done in the best way.

    Bean code:

    DCBindingContainer links =

    (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    DCIteratorBinding data binding =.

    bindings.findIteratorBinding ("TestDataView1Iterator");

    If (dataBinding! = null) {}

    ViewObjectImpl = testDataVO

    (ViewObjectImpl) dataBinding.getViewObject ();

    testDataVO.reset ();

    The below two lines code clears the default and display implicit criteris

    which gets set in ViewCriteriaManager when we filter the data in the table to help

    This table filter text box in the column af:table headings

    NOTE: It will not erase the other criteria of which are defined by users in VO

    testDataVO.getViewCriteriaManager () .removeViewCriteria (ViewCriteriaManager.DFLT_VIEW_CRITERIA_NAME);

    testDataVO.getViewCriteriaManager () .removeViewCriteria (ViewCriteriaManager.IMPLICIT_VIEW_CRITERIA_NAME);

    If (param.equalsIgnoreCase ("home")) {}

    testDataVO.setWhereClause ("attachment = 'Y'");

    } else {}

    testDataVO.setWhereClause ("attachment = ' n '");

    }

    testDataVO.executeQuery ();

    }

    Thank you all for the suggestions.

    Thank you

    Madhukar

  • measures to apply the filter Sysdate-7 to 11 g

    Hi I need to apply sysdate - 7 filter user activity reports, can anyone helps the steps...


    Kind regards
    891105

    Published by: 891105 on February 3, 2012 06:34

    Awards points :)

  • Apply the filter at several layers at the same time (without converting them to a CG)

    Hey everybody,

    I looked everywhere for a way to simply apply the same filter with several layers at once, without first convert to smart object. I need to keep my layers intact and separated from the others. Does anyone know of a script or a way to do this?

    Any response is appreciated.

    -Andy

    Paul has a script "Filter selected Layers" on the site that makes the most of the filters.

    It's at the bottom of the "CSP Scripts" section.

    http://www.PS-Bridge-scripts.TalkTalk.NET/

  • A need to replace the filter

    I need to make a large filter to replace about 50 words with HTML tags. The best solution I have at the moment is just to staple the replace the filter. Is it possible to use a variable in a liquid as a filter {{exit | variable}}?

    Current solution

    {{ item.description | replace:'#öppna','<dt>' | replace:'#//','</dt>' | replace:'#ikon-röd','<i class="red"></i>' }}
    

    Desired solution (not an example of work)

    {% assign variable = replace:'#öppna','<dt>' | replace:'#//','</dt>' | replace:'#ikon-röd','<i class="red"></i>' %}
    {{ item.description | variable }}
    

    It would be useful to apply it on any web page that I have 10 different webapps in need of replacement.

    Top is fine, unless you want to display it more then once.

    {% assign myDescription = item.description | replace: '#öppna','}

    ' | replace:' #/ / ', '.
    ' | {replace:' #ikon-rod ',''-%}

    {{myDescription}}

  • Oracle SQL connector for HDFS - where is applied the filter?

    I just managed to get the connector SQL from Oracle for HDFS (YES!)
    working on a cluster of 2VM Linux and was curious where the filter in the where clause is applied in order to limit the data.
    i.e. is it pushed clear down to the hadoop hadoop takes all the data and then then it is filtered or all data is buffered in the database or what?

    Thank you

    Mark

    The filter will apply in Oracle. OSCH does not push down the filter Hadoop to run and code of MapReduce. If the predicate would be treated like any other external table, or I guess any table (non-exadata) would be.

  • Help needed - "cannot download the folio on your local drive.

    Hello

    (WARNING: for the first time post :-))

    I have trouble downloading my folio published. During the last 24 hours I repeatedly get the following error (after a long wait with the status 'Preparation content by downloading... ") on different computers (Mac/PC) and browsers:

    An error occurred during the export of the folio

    Could not download the folio on your local drive

    My first version is delivered to an Android app (created using the viewer Builder) and has been incorporated into an iOS app (also created using View Designer).  All this worked without any problems and I can export this now.

    In order to optimize the folio for the new iPad, I decided to use the PDF option that required me to rebuild the folio.  The content is identical to the bar a few dates changed from 2011 to 2012.  I just need to export the folio so I can incorporate into an update iOS application.  The folio is not (at this stage) given to the Android app.

    I hope someone can help :-)

    Andrew

    Edit: Using the new Adobe Content Viewer I see TWO versions of the folio - one with the lightning bolt blue - but maybe that's normal?

    Hi Philippe,.

    Thanks for the reply.  After a lot of testing, I discovered that my preview of the cover images were the problem.  I've been using PNG files and when I used the versions JPG export worked.

    Maybe that's a one-time problem, but I thought I'd share the solution in any case.

    Kind regards

    Andrew

  • apply the filter sketches without changing the color of the photo

    I want to use some filters in photoshop, those in the drop down filters.
    I was wondering is it possible to apply a filter like pencil tale of half-hearted or something without changing the colors in the original photo?

    Hope it makes sense

    Thank you!

    Duplicate the layer, the filter, and then together a blend mode of 'brightness '.

Maybe you are looking for