filtering data

Hi everyone, I need help filter some data. consider the following data:

WITH the data AS

(

SELECT id 7846, cid 7, would be "dual UNION ALL status".

SELECT the id 7847, 7 cid, the from ' status OF double UNION ALL

SELECT the id 7848, 7 cid, the from ' status OF double UNION ALL

SELECT the id 7849, 7 cid, the from ' status FROM dual

),

data2 AS

(

Select 7846 id, cid 7, name "DED" dual UNION ALL

Select 7846 id, cid 112, name "DED" double UNION ALL

Select 7847 id, cid 7, name "SWD" dual UNION ALL

Select 7848 id, cid 7, name "SDG" dual UNION ALL

SELECT the id 7849, cid 7, name 'HSE' TO double

)

a combination ID and cid in database2 may or may not be in the data table.  I want to display the following output.

IDENTITY NAME OF CID

=====================

7847 SED 7

7847 7 SDG

7849 7 SSE

I created a view with the following join:

FROM Database2 l2,.

data m

WHERE l2.cid = m.cid (+)

AND l2.id = m.id (+)

AND NVL(m.status, 'S') IN ('Y', the from ')

I get the following result:

IDENTITY NAME OF CID

=====================

7846 DED 112

7847 SED 7

7847 7 SDG

7849 7 SSE

What I want to do is to get all the rows in table data2 where id matches the data table and the situation is not D.  If you look at the join, I included cid because data2 is partition of cid and I need so that I have not

Ask all the data.  the cid's pass as FastInventory to the query and therefore the application only works on a partition.  the problem is that given the cid in the join will bring 7846 112 rank since 112cid is not in the data table.

How can I change the query so that the id and the cid is used in where clase but at the same time I filter 7846 112 rank.  If I remove the join of the cid, then I get the result I want, but who will go through any partition that is not what I want.

in general, I have to filter all rows of data.2 where id in data2 = id in the <>table data and the State would have "."  at the same time use cid be used to partition query

ouput should be

IDENTITY NAME OF CID

=====================

7847 SED 7

7847 7 SDG

7849 7 SSE

Hello

It looks like you want a plain old inner join, not an outer join.

Which produces the results you requested:

SELECT l2.*

FROM Database2 l2,.

data m

WHERE l2.cid = m.cid

AND l2.id = m.id

AND NVL (m.status, the of ') IN ('Y', the from ')-m.status or <> has '

;

Use an outer join if you want to include all rows in a table, if there are matching rows in the other table.

In this case, you only want rows of data.2 is they have matching rows in the data, so use an inner join.

The condition that you have published in your code (NVL (m.status, the of ') IN ('Y', a ')) is not the same thing as what you said in explaining (status <> has '); they arrive just to give the same results with the data for this example.  Use any State you want.

Tags: Database

Similar Questions

  • How can I get the filtered data from the first form

    How can I get the filtered data from the first form in a second form to make an update of the multi.
    Thank you very much

    William,

    I would use for this collections. A link is good if you need to pass a single value.

    1. create a collection
    2 fill the collection with your result set
    3. go in the page target and uses a method of a query in your link to this page
    4. your target page receives a request and allows you to edit documents.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • Table 2d-filtering data in column 1

    Hello, let me thank you for your help with this.

    I'm trying to understand a method takes an array 2d and pulling a specific section of this table based on the numbers in a column.  If it was excel, then I would be, for example, snapped up lines 28 to 65.  Specificaly, I like to shoot all the amplitudes associated with a range of frequencies.  You can set the limit higher than a single frequency and the lower limit to be a second frequency and a subarray will be created based on an original array that contains the results for that specific range.  For everything I tried, the end result is an empty array.  I will paste a link of my labview below code.

    This program is to find the equation of the lev - best mar for the amplitude of vibration based on the frequency.  He reads the data that has already been achieved.  The only parts that I'm getting is the adjusted vi, and must be run for each position of natural frequency, that's why I'm trying to build the filter table of he.  If you see a better way to do this, feel free to report it as well.  Part of the code, for example two tables that show the result after the filter, are for me to be able to see the result, while I'm doing the work of filtering.

    Thanks again for your help.

    This shows you how to get a subset of all the lines, where the number in the first column is between 400 and 500 (included). The bottom of the loop, this is how I would do it before LV2012. If you have LV2012, I would use the upper loop.

    Table functions, I used, from left to right, are table index, replace table subset and subset of the table.

  • a model of filtering data?

    Hello

    I have a GroupDataModel defined as an a custom object Q_PROPERTY, attached to a ListView that contains pointers to another custom class.

    {To ListView

    dataModel: myClass.model

    }

    I would like to be able to filter content in the GroupDataModel so it displays all the items, or elements based on one of the properties of the custom object in the GroupDataModel, but I'm not clear on how best to address the issue.  If it's important, I'm trying to display it in a segmentedControl with two options... one for all and one for 'Active'.

    I tried to do this with two listViews attached to various properties of the custom - like object:

    ListView {dataModel: myClass.model}

    and

    ListView {dataModel: myClass.modelFiltered}

    then by a visible: true and visible: false according to the selectedIndex property of the SegmentedControl.

    that has not worked, and it seems a little sloppy for me.

    is there a nice way to do it?  mainly:

    provide a GroupDataModel as a property of a custom object

    be able to filter or unfilter the list (simple bool)

    have updated the user interface when the list is changed

    ?

    I'm done with two data models, one for the complete list and one for the filtered list.

    I guess I could have also clearly () was the model and fills again with a filter applied, but I was not do this way for reasons unknown to me.

    Seems in any case, these are the two options to use.

  • Custom object filters (data card)

    How do you run the filters with data cards?

    We have Contact information stored in the Contact record, and our products are stored against cards of data with the email address as a common link between them.

    I need to run reports for some products, that lists all the products selected for some countries.

    Kind regards

    John

    He discovered. Using the "field of the linked object Custom' and 'A related custom object' in the contact filter allows filtering in the game of the data card.

  • Filtering data grouped in Advanced DataGrid

    I want to display hierarchical data (data groping) in advance DataGrid and at the same time I want so the filtering feature. The problem is that if I want grouped view then I provide GroupingCollection the dataprovider (which has no function filterFunction type functionality).
    Is it possible to fix this?

    I found the solution.

    1. store the data collection ArrayCollection (say ac).

    2 - ac.filterFunction = processFilter / / some filter function

    3 assign this collection for GroupingCollection ArrayCollection (say gc) as a source.
    GC.source = ac

    4 assign gc as dataProvider of dataGrid

    5 - when you want to apply the filter:
    ECL Refresh();

  • AS3, filtering data on the client

    Hello again, friends:

    Play again with cartoons, I'm working on another way to view them. The app is here, http://www.timos.com/timos/GreenEarthEN/GreenEarthEN.html and View Source is enabled for the corresponding code.

    I want to be able to navigate the cartoons by category (the each topic) - it's the data grid column titled "key words". Some of the cartoons are more than one keyword, so the keywords, the fields are really LISTS. The combo box above the data grid view allows you to choose a keyword to fetch the relevant cartoons. Whenever you select a new keyword from the drop-down list, a call is made to the server for a new filtered list. These lists manipulation is very easy with ColdFusion or SQL.

    Given that the whole dataset CreationComplete lights in the app and is always available, it would be smarter to do all filtering on the client. I searched all the Adobe docs and google all I could think of, but found very little on the filtering of the data with ActionScript.

    Any ideas on how to proceed would be much appreciated. If you want to give a shot of this, keep in mind we are dealing with lists, not simple keywords.

    Best of all,

    Carlos

    Using a filterFunction on your ArrayCollection collection function is probably the easiest way to go. I looked at only your code, but see if it works for you.

    TS

  • Filtering data source based on the current user.

    Hello world


    I would like to add a Data Source Filter whenever a certain user connects.

    Any ideas on how to implement this?

    OEID v3.0

    Concerning

    Hi Omi,

    Use case sounds like a fairly standard security manager.  You're looking to filter the view of user data based on attributes of the user profile (be it from the LDAP or elsewhere).

    It is documented here for OEID v 3.0:

    Extension of Security Manager

    That should cover, if you're not a Java guy, or you're looking for some advice, don't hesitate to reach out in offline mode, we have built our fair share of complex and simple (as you describe).

    Patrick Rafferty

    Branchbird

    [email protected]

  • Filtering DATES

    I have millions of rows in a table from the year 2003 to sysdate. I only need data where month > = January 1, 2007. From the following options, which one is faster? or do you recommend using something else?
    In addition, can what type of index I put on service_date to improve the query performance?

    "TRUNC (SERVICE_DATE, 'MONTH') > = January 1, 2007.
    "SERVICE_DATE > = January 1, 2007.
    SERVICE_DATE BETWEEN 1 JANUARY 2007 AND SYSDATE

    Thank you

    Published by: 788729 on October 6, 2010 06:39

    Published by: 788729 on October 6, 2010 06:46

    Published by: 788729 on October 6, 2010 06:46

    788729 wrote:

    So, is there another way to say pick service_date > = other than the January 1, 2010

    sysdate > to_date('01-JUN-2010','dd-MON-yyyy'
    

    Yes.

    For the third time, it would be.

    SERVICE_DATE >= to_date('01-JAN-2007','DD-MON-YYYY')
    

    This really should not be so difficult.

  • filtering data for temperature measurement

    Hi, need some help here.

    Before I add in the filter, I get the graph like figure 'graph-1. PNG ". But it is false because impossible, temperatures can drop to 30 0 30 0 31 0...

    After I add in the filter (as shown in the "filter graph n. PNG"), the chart is to look like figure 'graph-filter. PNG'. The graph move continuously in but the scale of the x-axis is changed.

    So, how can I solve this problem in order to get the graph constantly move (will not fall back to zero) and the x-axis of the correct scale (for example, 0 to 50 degrees Celsius). What kind of filter should I use.

    emergency aid!

    THX.

    Cournoyer,

    To my knowledge no instrument will not give this temperature difference, I would like to know how you measure the temperature before you apply the filter check your labview code if your postal code here, I can help you more.

    Siva.

  • Data filtering

    Hello

    can anyone help on this below requirment? the requirment is, there are a many (2) replication (oracle for oracle only), the particular source of tables in database with all the data of 2 regions (United Kingdom and New Zealand), replication must come from a source of first target with only the datas UK and NDDN target will be with the NZ data. simple method how we can use to achieve this, the table has the column "region_name". but when I use under the control of filter caps letter No filtering as the name of the region, only its filtering as we mentioned in the filter condition, how to filter if region name the two caps (UK) are in small letters (uk)?

    TABLE CBC. ACCOUNTS, FILTER (@STRFIND (rated, 'uk') > 0);

    the same tried with where clause and the filter also, clause but is not region name of replication like UK (caps), only replication of data with "uk".

    advice where to mention the terms of filter extracted also aside or replicate for better performance?

    Thanks in advance.

    Could you try with one of the following?

    TABLE CBC. ACCOUNTS, FILTER (@STRFIND (@STRUP (rated), 'UK') > 0);
    or
    TABLE CBC. ACCOUNTS, FILTER (@STRFIND (UPPER (rated), 'UK') > 0);

    The best way to do it is to use an extract that extracts all the data. Use then the two excerpts from datapump, which filters UK data and one that filters data NZ.

  • Application roles data filters did not work

    I put filters data for the role of BIConsumer by default, but it did not work.

    Hello

    Default administrator can access all tables/columns presentation. In other words, only users not in the administrator group can be restricted permission for this configuration. That is why the weblogic user is able to see the object limits. Try to create a new user without privilege BIAdministrator and find the table of 'Time', your setting will work for sure.

    Rgds,
    DpKa

  • Filtering XML data in the grid

    I can't sem to figure out how to filter my XML data before entering my data grid. I want to load only the XML data with the ID 'BALUSTER' attribute and have tried to enter:

    data_grid. DataProvider dp =. (@ID IS 'BALUSTER');

    in my function xmlLoaded without success.  I'm fairly new to as3 and could certainly use the help.  Thank you.

    var dpataProvider;
    var products_xml:XML;
    var xmlReq:URLRequest = new URLRequest("data/products.xml");
    var xml_loader:URLLoader = new URLLoader();

    function xmlLoaded(event:Event):void {}
    var ldr:URLLoader = event.currentTarget as URLLoader;
    var xmlDP:XML = new XML (ldr.data);
    DP = new DataProvider (xmlDP);
    data_grid. DataProvider = dp;
    }

    xml_loader. Load (xmlReq);
    xml_loader.addEventListener (Event.COMPLETE, xmlLoaded);

    Assign the filtered data (not the original) to the data provider:

    function xmlLoaded(event:Event):void {}
    var ldr:URLLoader = event.currentTarget as URLLoader;
    var xmlDP:XML = new XML (ldr.data);
       
    var data: XML = ;
        data.setChildren (xmlDP.PRODUCTS. (@ID) IS 'BALUSTER'));
       
    DP = new DataProvider (data);
    data_grid. DataProvider = dp;
    }

  • Data corruption FXP user variables

    Windows 7 Professional

    LabVIEW 2009 SP1, RT

    I have stumbled on this nasty problem yesterday and am looking for help (please).

    I used the scan engine and User Variables to send filtered data modules FPGA C Series in the OTR.

    When the fixed Point of Variables data user was read in the OTR, it was transformed using the primitive Double-precision Float.

    The result has been that positive were out correct but negative numbers has become corrupt.

     

    Other tests revealed the following:

     

    • This has occurred on the target of the RT, the target PC worked (tested and converted User Variables were published network)
    • This was produced for the User Variables (app 3 FXP representations and that have touched all of them) as a data source
    • If the data source has been a constant FXP then conversion to a DBL worked properly on the target of RT
    • If the data source has been probed or FXP control output, then the data is displayed correctly, it's the conversion only after the DBL occurred by corruption
    • Access to Variables such as a DBL using the shared Variable API via reading do not corrupt Variable data for the network publishes user read RT target Variables
    • Access to Variables such as FXP then convert to DBL using the API Variable shared via scanned reading corrupt the data read from the target RT
    • This was also the case for the simple primitive Float precision

    JG-code,

    The CAR has already been filed for this issue. What I will do, is to check that I can reproduce the problem with RIO 3.4 and update of the CAR in order to take account of the current situation.

  • filtering

    Hi all

    I have a set of data (table 1 d with a value of 500) and I use the basic filter of the LV (smootihing with average mobile, rectangular, half width = 1) for smoothing noisy data. As you can see in the photo, the curve smoothed red seems to offset 2 pixels with respect to the original blank data. If I take the difference btw the original and the filtered data in the measurement of noise (green curve), then it will be exaggerated due to this change. You can write code to compensate for this, but I wonder if there is a way to correct it in LV also, what are the causes exactly this change?

    The second photo shows the sub vi to do filtering, etc.

    Thank you!

    The moving average of smoothing itself is a low pass filter. Like any digital filter, it has the answer. Don't forget, phase in nature is the delay in time. There are some filters with zero delay/linear delay but apparently the smoothing filter isn't one of them. When you configure the filter, transfer function Select display mode, you can find the answer in the second chart. Notice that it has a non zero delay to phase in most frequencies.

    You can also increase the width of the filter and you should be able to watch the delay increases as well. So, not much you can do with it other that realign the signal after filtering if you wish.

Maybe you are looking for