How can I perform this kind of range join query using DPL?

How can I perform this kind of range join query using DPL?
SELECT * from t where 1<=t.a<=2 and 3<=t.b<=5
In this pdf : http://www.oracle.com/technology/products/berkeley-db/pdf/performing%20queries%20in%20oracle%20berkeley%20db%20java%20edition.pdf,
It shows how to perform "Two equality-conditions query on a single primary database" just like SELECT * FROM tab WHERE col1 = A AND col2 = B using entity join class, but it does not give a solution about the range join query.

I'm sorry, I think I've misled you. I suggested that you perform two queries and then take the intersection of the results. You could do this, but the solution to your query is much simpler. I'll correct my previous message.
Your query is very simple to implement. You should perform the first part of query to get a cursor on the index for 'a' for the "1<=t.a<=2" part. Then simply iterate over that cursor, and process the entities where the "3<=t.b<=5" expression is true. You don't need a second index (on 'b') or another cursor.
This is called "filtering" because you're iterating through entities that you obtain from one index, and selecting some entities for processing and discarding others. The white paper you mentioned has an example of filtering in combination with the use of an index.
An alternative is to reverse the procedure above: use the index for 'b' to get a cursor for the "3<=t.b<=5" part of the query, then iterate and filter the results based on the "1<=t.a<=2" expression.
If you're concerned about efficiency, you can choose the index (i.e., choose which of these two alternatives to implement) based on which part of the query you believe will return the smallest number of results. The less entities read, the faster the query.
Contrary to what I said earlier, taking the intersection of two queries that are ANDed doesn't make sense -- filtering is the better solution. However, taking the union of two queries does make sense, when the queries are ORed. Sorry for the confusion.
--mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • I am using i 4 phone. recently I had a problem with my lap top and had formatted hard disk of it. Now I want to use sync data in my iphone back to itune n my lap top. how can I perform this task with out loosing data in my i phone.

    I am using i 4 phone. recently I had a problem with my lap top and had formatted hard disk of it. Now I want to sync data in my iphone back to itune on my lap top. how can I perform this task with out loosing data in my i phone.

    Hey floridiansue,
    Do you have an installed email program such as Microsoft Outlook?  If your email is through an online login, such as Gmail, etc, then one will have to create an email association with a program such as Microsoft Outlook on the PC for this Scan to Email system to function.
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------
    I am not an HP employee.

  • I have about 10000 images of different persons with dimension of 640*480. I wan to crop face from these images to dimension of 200*280. The location of face varies in differnt pics. So, please let me know step by step how can I perform this using the Ligh

    I have about 10000 images of different persons with dimension of 640*480. I wan to crop face from these images to dimension of 200*280. The location of face varies in differnt pics. So, please let me know step by step how can I perform this using the Lightroom software. Also I wan to know what should be the aspect ratio to do so.Thank you in advance

    The aspect ratio should be set to 200x280, or equivalently 5x7.
    I don't think it is possible to do the cropping automatically in Lightroom, you'd have to do this image by image to crop the faces correctly.

  • How can i design this kind of chart ?

    How can I create this kind of pie chart.

    After you enable dashed line, go the right and make sure the second icon is down. Enable the second icon for cap. Enter the 3 values I have shown, and then adjust to your liking

  • Each time I try to watch my itunes U podcast and try to skip forward my itunes freezes and gives me an error report and shuts off, this happens also when I try to convert it to my iPod. How can I fix this problem to be able to use the iTunes U?

    Each time I try to watch my iTunes U podcast and try to skip forward my iTunes freezes and gives me an error report and shuts off, this happens also when I try to convert the podcast to my iPod. How can I fix this problem to be able to use iTunes U?

    Hello, bisco,
    This forum is for questions from people who administer iTunes U sites. You'll be most likely to get help with this issue if you ask in the iTunes or iPod forums.
    Regards.

  • My airport extreme has connected to a Tplink router, i set my AE in Create network, so i get a problem of Double NAT. How can i repair this probleme because i have to use TPlink for my IP TV and i want to use AE to creat my network and the guest NW.

    my airport extreme has connected to a Tplink router, i set my AE in Create network, so i get a problem of Double NAT. How can i repair this probleme because i have to use TPlink for my IP TV and i want to use AE to creat my network and the guest NW. If we don't have a solution for this question, can i set my AE to use the IP TV and how??? I'm using a 4th Airport extreme

    No, not unless it is simply a network connection.
    How is your IPTV being provided.. if it is using a separate vlan or separate vpi/vci in the adsl connection. Who is your ISP?
    Is the TP-Link ADSL?
    Is the IPTV using a separate voice channel on adsl?
    Or a different vlan.
    Sorry but it is something where a definite answer is not possible unless you provide all the details.
    The setups are unique to each ISP around the world..
    Here is one for our local ISP.
    http://www.avenard.org/iptv/Setup.html
    He has a section on getting this working with apple router over wireless.. look
    http://www.avenard.org/iptv/IPTV_and_Wireless.html
    Google around and see if other people have had success.. the whole setup is tricky.. and it is hard if nobody has used it who actually understands networking.

  • How can i get this kind of background

    Hello,
    I downloaded some brushes in here : http://differentxdreamz.deviantart.com/art/Abstract-Design-Brushes-119627540.
    I just want to do the same background with those brushes but i could'nt. I've made a lot of gradient colors but it's not like this picture.
    Some descriptions of the differents steps would be very useful for me.
    Also, how can i get this mix of colors in the bottom of this picture : http://www.shutterstock.com/pic.mhtml?id=56261755
    Thanks

    Hi,
    To get blurred colors you can use a bluring technique. Start off by painting large spots of color on your image.
    Go to FIlter > Blur > Gaussian Blur:
    Then, change the intensity of the blur to your liking
    As far as the other image, that seems a little more complicated and requires some more steps.
    Here's the tutorial for that image:
    http://differentxdreamz.deviantart.com/art/Abstract-Aura-Tutorial-123825904
    Hope this helps!
    Julia

  • How can I avoid this kind of pigment? (What really causes it?)

    I have clip that works great with all kinds of effects on it, except brightness/contrast (both of them used separately as well). The second I render the clip with those effects, my clip becomes "choppy". It's weird, cause with other color effects (including luma) it doesn't react like this. It seems to be that red tones are more susceptible for it as well.
    Why do this happen and how do I deal with this? I'm interested in the color, not the image btw. What other way can I get a strong contrast-darkness effect.

    I must also add, maybe the crucial part. 636 x 480 square pixel 1.0 are the settings for the clip, and it reacts this way when I copy and paste it (and render) into 720 x 576 16:9 D1 widescreen (1.45).
    So how can I get it to fit the widescreen? I've tried to create a new project with it and save it as a 720 x 576 but with the same result, but when I render, I get the same result.
    Thx

  • My Ip5 got stocked on "searching..." For my carrier. I already removed the SIM but it doesnt stop searching. How can i troubleshoot this kind of problem?

    How can I troubleshoot my iphone5 if it got stocked searching for my carrie?. I already tried removing the SIM card but it doesnt stop searching. I also tried using other SIM but still same result.

    Try this: press F10 or tap the Alt key to display the menu bar temporarily, then
    View > Toolbars > Menu Bar
    If that doesn't work, you could reset your toolbars to factory default using Firefox's Safe Mode. First, make a backup of your computer for safekeeping. To back up Firefox, see [https://support.mozilla.com/en-US/kb/Backing+up+your+information Backing up your information].
    Next, start Firefox in Firefox
    [http://support.mozilla.com/kb/Safe+Mode Safe Mode], and check only the box to reset toolbars. Be careful not to "reset" anything else if you didn't back up.
    Hope this helps.

  • How can I get this kind of page of pdf?

    I created a pdf file with iText,and there are some text fields and a submit button.What I want to do is than when I click the submit button,a new pdf page will show all the dates I put in the text fields of the last pdf form.Is there any anyone can give me any suggestions or samples?Thanks a lot!

    You have the input forms in HTML or the PDF?!
    If you have the forms in PDF, you can't interact with them on client side, because
    they are not under the control of the server anymore. (you downloaded them, so the server has no clue about your PDF anymore)
    When thats the fact, this is the wrong forum. :-)
    You need somthing like an "web"-submit button which posts the values filled in the PDF input forms to some URL.
    I don't know if there is such thingi.
    In fact thats the wrong forum here, ask the iText maintainer. ;-)

  • It seems that Import bookmarks form Opera(v.11.01) doen't work. How can I perform this?

    1) Open firefox browser
    2) Open Bookmarks window
    3) Import Html... ->Opera
    4) then I choos my opera vertion
    5) press next
    6) see that import has been finished successfully
    but my opera bookmarks haven't been appeared

    In method HMAC, you have towards the bottom
    catch(Exception e) {}please change this to
    catch(Exception e)
                e.printStackTrace();
            }Note that using the sun.* classes, including the sun.misc.BASE64Encoder class, requires elevated privileges (see http://forum.java.sun.com/thread.jspa?threadID=483223&messageID=2255882).
    It is not difficult to write your own encoder/decoder class, or borrow one from someone else. Just google on "java base64 encoder".

  • Hoping someone can help. Just recently, maybe a week, Firefox has been crashing every few minutes into being online. How can I stop this from happening? I'm using IE right now and hate it. Help!

    Add-ons: {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}:1.2.2,{3112ca9c-de6d-4884-a869-9855de68056c}:7.1.20110512W,{CAFEEFAC-0016-0000-0017-ABCDEFFEDCBA}:6.0.17,{03B08592-E5B4-45ff-A0BE-C1D975458688}:0.6.0.8,{a0d7ccb3-214d-498b-b4aa-0e8fda9a7bf7}:20100908,{CAFEEFAC-0016-0000-0025-ABCDEFFEDCBA}:6.0.25,{4ED1F68A-5463-4931-9384-8FFF5ED91D92}:3.4.0,{972ce4c6-7e08-4474-a285-3208198ce6fd}:3.6.8
    BuildID: 20100722155716
    CrashTime: 1318829294
    EMCheckCompatibility: true
    Email: [email protected]
    FramePoisonBase: 00000000f0de0000
    FramePoisonSize: 65536
    InstallTime: 1280028266
    ProductName: Firefox
    ReleaseChannel: release
    SecondsSinceLastCrash: 2517
    StartupTime: 1318827564
    Theme: classic/1.0
    Throttleable: 1
    Vendor: Mozilla
    Version: 3.6.8
    This report also contains technical information about the state of the application when it crashed.

    Maybe you are using Firefox 3.6..can you please upgrade it to 7
    * getfirefox.com

  • Search option not working after updating Firefox. How can I correct this? Don't want to use Explorer, but will have to if we can't fix this.

    An automatic update ran this morning. Noticed when I started up the computer, a message came up saying that Firefox was running, even tho' it wasn't. Update finished, and now I cannot get the search tool to work. Help!!!

    Is this the search bar on the about:home page/
    Try to reset some preferences to the default with the SearchReset extension:
    *https://addons.mozilla.org/firefox/addon/searchreset/
    Note that the SearchReset extension only runs once and then uninstalls automatically, so it won't show on the "Firefox > Add-ons" page (about:addons).
    If there is a problem with searching via the default about:home page then try to reset the search engine used on the about:home page.
    Reset the <b>browser.startup.homepage_override.mstone</b> pref via the right-click context menu to the default on the <b>about:config</b> page and close and restart Firefox to restore the about:home page to its default.
    *http://kb.mozillazine.org/about:config
    #Open the <b>about:config</b> page via the location bar
    #Type in the Filter bar: mstone
    #Right-click the browser.startup.homepage_override.mstone line and select: Reset
    #Close and restart Firefox
    If this didn't help then delete the delete the chromeappsstore.sqlite file in the Firefox Profile Folder and repeat the above.
    You can also check for problems with preferences and try to rename or delete the prefs.js file and possible numbered prefs-##.js files and a possible user.js file to reset all prefs to the default values.
    *http://kb.mozillazine.org/Preferences_not_saved
    *http://kb.mozillazine.org/Resetting_preferences
    Also check that you do not have a mozilla.cfg file in the Firefox program folder.

  • Firefox has been unusable because of crashes; I want to delete it from my desktop and re-install; please, how can I do this? I'm stuck with using safari and I want to be able to get back to using firefox!

    firefox crashes on opening, every time, and very speedily; I have sent reports in, when it began, without receiving any help; since then I've been trying delete firefox and reinstall it, but have miserably failed; I have very little time to play around with it, so have fallen back to safari, but I want to get back to it as simply as possible! I am the opposite of a computer nerd, as you can imagine! But I know what I like ...
    Simple help, please? Many thanks.

    See Empty/corrupt library after upgrade/crash...
    tt2

  • How can i achive this result by writing SQL Query ?

    Dear Exparts,
    Here is my banner
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    "CORE     10.2.0.3.0     Production"
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - ProductionI have two table with relation. Here is the scripts of create table and insert data.
    TABLE
    CREATE TABLE TAB1
      T1_ID NUMBER(5)
    , T1_NAME VARCHAR2(100)
    ALTER TABLE TAB1 
    MODIFY (T1_ID NOT NULL);
    ALTER TABLE TAB1
    ADD CONSTRAINT TAB1_PK PRIMARY KEY
      T1_ID
    ENABLE;
    CREATE TABLE TAB2
      T2_ID NUMBER(5) NOT NULL
    , T2_T1_ID NUMBER(5)
    , T2_RV_NO VARCHAR2(20)
    , T2_RV_DATE DATE
    , T2_F1 VARCHAR2(20)
    , T2_F2 VARCHAR2(20)
    , T2_F3 VARCHAR2(20)
    , CONSTRAINT TAB2_PK PRIMARY KEY
        T2_ID
      ENABLE
    ALTER TABLE TAB2
    ADD CONSTRAINT TAB2_TAB1_FK1 FOREIGN KEY
      T2_T1_ID
    REFERENCES TAB1
      T1_ID
    ENABLE;INSERT DATA
    Insert into TAB1 (T1_ID,T1_NAME) values (1,'Test 1');
    Insert into TAB1 (T1_ID,T1_NAME) values (2,'Test 2');
    Insert into TAB2 (T2_ID,T2_T1_ID,T2_RV_NO,T2_RV_DATE,T2_F1,T2_F2,T2_F3) values (1,1,'00',to_date('01-OCT-2012','DD-MON-RRRR'),'Probation','05','Yes');
    Insert into TAB2 (T2_ID,T2_T1_ID,T2_RV_NO,T2_RV_DATE,T2_F1,T2_F2,T2_F3) values (2,1,'01',to_date('06-OCT-2012','DD-MON-RRRR'),'Confirm','06','Yes');
    Insert into TAB2 (T2_ID,T2_T1_ID,T2_RV_NO,T2_RV_DATE,T2_F1,T2_F2,T2_F3) values (3,2,'00',to_date('02-OCT-2012','DD-MON-RRRR'),'Probation','07','No');
    Insert into TAB2 (T2_ID,T2_T1_ID,T2_RV_NO,T2_RV_DATE,T2_F1,T2_F2,T2_F3) values (4,2,'01',to_date('09-OCT-2012','DD-MON-RRRR'),'Probation','07','Yes');
    Insert into TAB2 (T2_ID,T2_T1_ID,T2_RV_NO,T2_RV_DATE,T2_F1,T2_F2,T2_F3) values (5,1,'02',to_date('10-OCT-2012','DD-MON-RRRR'),'Confirm','06','No');Now i want to produce the following reports..
    Period:      06-OCT-2012 to 09-OCT-2012
    T2_RV_DATE     T1_NAME          T2_RV_NO     Revised_Column     Previous_Value     Revised_value
    06-OCT-2012     Test 1          01          T2_F1          Probation     Confirm
                                  T2_F2          05          06
    09-OCT-2012     Test 2          01          T2_F3          No          YesI just achieve Revised_Column     Previous_Value     Revised_value for a particular name.
    Here is my code
    SELECT T2_RV_NO,T2_RV_DATE,T1_NAME,'T2_F1' Revised_Column,PREVIOUS_VALUE,REVISED_VALUE
    FROM(
    SELECT T2_RV_NO,T2_RV_DATE,T1_NAME,'T2_F1',
    LAG(T2_F1) OVER (ORDER BY T2_RV_DATE) PREVIOUS_VALUE ,T2_F1 REVISED_VALUE
    FROM TAB2,TAB1
    WHERE TAB1.T1_ID=TAB2.T2_T1_ID
    AND TAB1.T1_ID=:EMP_ID)
    WHERE NVL(PREVIOUS_VALUE,'null')<>NVL(REVISED_VALUE,'null')
    AND T2_RV_DATE BETWEEN :BEGIN_DATE AND :END_DATE
    AND T2_RV_NO<>'00'
    UNION ALL
    SELECT T2_RV_NO,T2_RV_DATE,T1_NAME,'T2_F2' Revised_Column,PREVIOUS_VALUE,REVISED_VALUE
    FROM(
    SELECT T2_RV_NO,T2_RV_DATE,T1_NAME,'T2_F2',
    LAG(T2_F2) OVER (ORDER BY T2_RV_DATE) PREVIOUS_VALUE ,T2_F2 REVISED_VALUE
    FROM TAB2,TAB1
    WHERE TAB1.T1_ID=TAB2.T2_T1_ID
    AND TAB1.T1_ID=:EMP_ID)
    WHERE NVL(PREVIOUS_VALUE,'null')<>NVL(REVISED_VALUE,'null')
    AND T2_RV_DATE BETWEEN :BEGIN_DATE AND :END_DATE
    AND T2_RV_NO<>'00'
    UNION ALL
    SELECT T2_RV_NO,T2_RV_DATE,T1_NAME,'T2_F3' Revised_Column,PREVIOUS_VALUE,REVISED_VALUE
    FROM(
    SELECT T2_RV_NO,T2_RV_DATE,T1_NAME,'T2_F3',
    LAG(T2_F3) OVER (ORDER BY T2_RV_DATE) PREVIOUS_VALUE ,T2_F3 REVISED_VALUE
    FROM TAB2,TAB1
    WHERE TAB1.T1_ID=TAB2.T2_T1_ID
    AND TAB1.T1_ID=:EMP_ID)
    WHERE NVL(PREVIOUS_VALUE,'null')<>NVL(REVISED_VALUE,'null')
    AND T2_RV_DATE BETWEEN :BEGIN_DATE AND :END_DATE
    AND T2_RV_NO<>'00'but it's not work for multiple employee id
    Thanks in advance
    Edited by: Asked to Learn on Oct 6, 2012 9:18 PM

    Asked to Learn wrote:
    thanks members. i get a solution of my own for my reporting purpos. Thanks..Well why don't you post your solution? Why not be helpful to others like yourself who might search the forum looking for answers? Don't just take, give back.
    Cheers, APC

Maybe you are looking for

  • Active Directory accounts problem logging in to Mavericks

    We have twenty iMacs in a lab and five in an Internet café, all wired to a multiple subnet network. OS X Mavericks is bound to Active Directory.  Frequently OS X Mavericks behaves as if the network user account password is entered incorrectly until t

  • Car Bluetooth connection with MAPS and iPhone 5.

    I have my iPhone Bluetooth connected to my new Toyota Camry and it indicates such on the phone and the car.  However, in going to MAPS navigation, there is no voice, only written directions.  Initially the voice worked, but now it doesn't.  Toyota sa

  • Broadband Usage Meter unavailable

    The broadband usage meter on the BT website refuses to show my usage, on the basis that, as I have unlimited broadband, I don't need to know. Is there any way I can find out my usage? Just because I'm on an unlimited contract does not mean I am not i

  • Model in BMM

    Hi Everybody, i have following model in physical Layer I want to build that in BMM. A -< B A -< C A -< D E -< B F -< B B -< D Actually, B is containing some facts. But if we drag the same physical layer to BMM, B is appearing as Dimension. B, C, D ar

  • Oracle BI Publisher 11g Trial Edition installation for AIX

    Can I install BI Publisher Trial Edition 11g for Linux 32 and 64 bit on AIX with Unix operating system? If cannot, any option or solution? Oracle provide BI Publisher 10.1.3.4.2 for AIX (32/64 bit) for 10g, what about 11g? Regards Edited by: 988821 o