Select / display of the most recent image.

Hi, I use Bridge to see the photos I take captive.

Is there a way to keep the most recent selected image so that I can see the most recent shot?

OK I got it to work, but only with Bridge CS5 , he dislikes cs6 or cc.

The code is here:- http://expirebox.com/download/abc4e20ea65c95853809a500fe92f105.html

ExpireBox | BridgePreviewLatestFile.zip

I used the film mode, and once a new file is droped in the folder displayed in the bridge.

Bridge CS5 is always the best!

Tags: Bridge

Similar Questions

  • Select the most recent DATE for identification.

    Hi all

    I need to SELECT records with the most recent DATE for each code. A DATE range is part of the selection criteria.

    My data.
    MY_ID MY_DATE
    1684662 26 JANUARY 09
    1424097 27 JANUARY 09
    1684663 27 JANUARY 09
    1684664 27 JANUARY 09
    1684672 28 JANUARY 09
    0689073 28 JANUARY 09
    1052476 21 JANUARY 09
    1052476 21 JANUARY 09
    1360828 23 JANUARY 09
    1684661 23 JANUARY 09
    1052476 30 JANUARY 09
    1052476 30 JANUARY 09
    1052476 30 JANUARY 09
    1052476 30 JANUARY 09

    The code below works fine when you select 1 ID in the subselect, but with several ID he always selects rownum = 1 (of course). As far my mind takes me.
    SELECT my_id,
    my_date
    Of
    (SELECT my_id,
    my_date
    FROM my_table
    ORDER BY DESC my_date
    )
    WHERE rownum = 1
    AND * {color: #ff0000} my_id = 1052476 {color} *.
    AND TO_CHAR(my_date,'YYYY/MM/DD') BETWEEN ' 01 / 01/2009 ' AND '' 2009/01/31;

    If I could somehow pass the ID SELECT in the subselect WHERE clause I should have done this.

    Any suggestions?

    Thanks in advance for your help,

    Lou

    One of the many soultions possible.

    ME_XE?with data as
      2  (
      3     select 1684662 as id, to_date('26-JAN-09','dd-mon-yyyy') as the_date from dual union all
      4     select 1424097 as id, to_date('27-JAN-09','dd-mon-yyyy') as the_date from dual union all
      5     select 1684663 as id, to_date('27-JAN-09','dd-mon-yyyy') as the_date from dual union all
      6     select 1684664 as id, to_date('27-JAN-09','dd-mon-yyyy') as the_date from dual union all
      7     select 1684672 as id, to_date('28-JAN-09','dd-mon-yyyy') as the_date from dual union all
      8     select 0689073 as id, to_date('28-JAN-09','dd-mon-yyyy') as the_date from dual union all
      9     select 1052476 as id, to_date('21-JAN-09','dd-mon-yyyy') as the_date from dual union all
     10     select 1052476 as id, to_date('21-JAN-09','dd-mon-yyyy') as the_date from dual union all
     11     select 1360828 as id, to_date('23-JAN-09','dd-mon-yyyy') as the_date from dual union all
     12     select 1684661 as id, to_date('23-JAN-09','dd-mon-yyyy') as the_date from dual union all
     13     select 1052476 as id, to_date('30-JAN-09','dd-mon-yyyy') as the_date from dual union all
     14     select 1052476 as id, to_date('30-JAN-09','dd-mon-yyyy') as the_date from dual union all
     15     select 1052476 as id, to_date('30-JAN-09','dd-mon-yyyy') as the_date from dual union all
     16     select 1052476 as id, to_date('30-JAN-09','dd-mon-yyyy') as the_date from dual
     17  )
     18  select id, the_date
     19  from
     20  (
     21     select id, the_date, max(the_date) over (partition by id) as max_the_date
     22     from data
     23  )
     24  where the_date = max_the_date;
    
                    ID THE_DATE
    ------------------ --------------------------
                689073 28-JAN-0009 12 00:00
               1052476 30-JAN-0009 12 00:00
               1052476 30-JAN-0009 12 00:00
               1052476 30-JAN-0009 12 00:00
               1052476 30-JAN-0009 12 00:00
               1360828 23-JAN-0009 12 00:00
               1424097 27-JAN-0009 12 00:00
               1684661 23-JAN-0009 12 00:00
               1684662 26-JAN-0009 12 00:00
               1684663 27-JAN-0009 12 00:00
               1684664 27-JAN-0009 12 00:00
    
                    ID THE_DATE
    ------------------ --------------------------
               1684672 28-JAN-0009 12 00:00
    
    12 rows selected.
    
    Elapsed: 00:00:00.03
    
  • How to cancel the setting of the image that is not the most recent change

    This question has been posted in response to the following article: http://help.Adobe.com/en_US/Lightroom/using/WS9AB9509C-05BE-4396-9ED2-313C0FF8A154.html

    Title of the message was edited by: Brett N

    Develop module, the left panel, history. Open this article and you will see a list of the settings, the most recent is at the top of the list. Select the step you want to come back and then start to make adjustments. Everything above this market will be replaced.

  • selecting a field value, which is the most recent CREATE_DATE

    I have two fields in the table CREATE_DATE (Date) and QUEBEC (varchar). How the value of the field for record with the most recent CREATE_DATE? So, if the table contains the following records

    AS CREATE_DATE
    ABCD ON 20/12/2008
    2008-12-21 DEFH
    2009-01-10 ALINE

    I want to request to return ALINE. I now have a query "select table where rownum = 1 order by desc CREATE_DATE. Is there a better way to do it?

    Thank you
    Ravi

    Select from the table where CREATE_DATE = (SELECT MAX (CREATE_DATE) FROM table)

  • After WSUS downloaded and installed the most recent Windows XP and 7 updates, we encountered the following error: page of the Intranet Web displayed in Internet Explorer (8 or 9) is on SERVER_A

    After that WSUS installed and downloaded the most recent Windows XP and 7 updates, we encountered the following error:

    The Web page of the Intranet being viewed in Internet Explorer (8 or 9) is on SERVER_A
    and the page contains a link to a file on a network share on the Serveur_B, making the href path something like
    'http://SERVER_B/myShare/myDocument.doc '.
    ... then it does NOT work.

    If the Intranet Web page being read in IE (8 or 9) SERVER_A on
    and the page contains a link to a file on SERVER_A, making the href path something like
    'http://IP..ADDRESS/myDocument.doc '.
    ... then it does not work.

    Before these updates, the system worked flawlessly.  We try to identify the update that caused this problem, but 28 of them fell on a Tuesday.  (22/11/2011).   These questions are the same with IE8 or IE9 and WindowsXP and Windows7.

    Has anyone seen this problem?

    Thanks, Jim

    It is a specific consumer support forum.

    You will find support for WSUS in this forum: http://social.technet.microsoft.com/Forums/en-US/winserverwsus/threads

    You will find support for Windows XP in an enterprise in this forum environment: http://social.technet.microsoft.com/Forums/en/itproxpsp/threads

  • files recent home screen does not display the most recent files

    Hello

    my Photoshop welcome screen has continued to show the most recent files that have been opened. It has only a list of files from when it worked finally. It worked fine for the first two days after I updated. all the solutions to fix it?

    Thank you

    There is a bug in Photoshop 2015.1.1 causes recently opened files not to be registered when after a hundred cases have been opened. According to me, which was corrected in Photoshop 2015.1.2

  • How to find the most recently read or access files or documents.

    In XP, there is a choice of the icon when you open start botton for the most recently viewed or read files.  Once again, I would like this feature.  How?

    Currently, I click on start, then the documents, and the only choice which is "recently changed". This choice is usually useless for me.  Thank you

    Windows, which fell in the start menu because now you can pin programs to the start menu and programs have separate to show their recent files in the same kind of drop-down menu, then it has become redundant.

    In the same start menu list watch the privacy section and check the two options and apply.

    Once these programs are on the list of the start menu, make a right click and select PIN to start menu, all recent item will be on this list and can be pinned to this list.

    You can also drag and pin programs to the taskbar as well.

    Also if you want an option to see recently changed items, open your library and on the top of the left column is changed recently listed, click with the right button on this list, select send to and click on create the shortcut on the desktop, once on your desktop you can drag to your taskbar or just leave it there change the display of this page and the dates of changes will be listed.

  • My firefox does not work llook like the most recent version. I downloaded it on my aunts comp and in the corner upper lft, there's a firefox orange box but still just mine has firefox symbol.

    I had firefox for over a year and I recently installed on my computer of aunts. When I've done in the upper left corner, there was an orange box that says firefox on it. I have recently installed on my computer and it's always the same, as I had before. (Just the symbol of firefox) How can I get the latest version? It does not say I have the 6.2 or what is the most recent. Thank you in advance for the quick response to my question.

                                        Amy Vitko
    

    The current stable version is Firefox 6. 0.2

    https://support.Mozilla.com/en-us/KB/how-do-i-get-Firefox-button
    Why can't I see it?

    To make Firefox look like other programs in Windows XP, the menu bar is displayed instead of the Firefox button, while under Windows Vista and Windows 7, the button is displayed by default in Firefox.

  • Path of the most recent added file using applescript

    I use appleScript Automator to download new pictures on my Instagram.

    The script trigger when the new file is added to a folder "updates".

    Open the app (work)

    activate an application "Uploader HD for Instagram"

    delay 0.5

    Tell application "system events".

    say "Uploader HD for Instagram" processes

    Click on the menu "open...". "the menu 1 menu bar item 'File' from the menu bar 1

    tell the end

    tell the end

    Activate the "go in the folder" CMD + SHIFT + G

    Tell application "system events".

    delay 1

    combination of keys 'G' using {control down, moving down}

    delay 1

    tell the end

    This is the problem... I "Don't KNOW" the name of the most recent added the file and there are a lot of files on the folder... So I can't use the full path of the file on the 'go in the folder ".

    Tell application "system events".

    combination of keys "/ Users/HazaelDiaz/Google Drive/IFTTT/Instagram/update/2016 / '.

    delay of 0.1

    strike back

    delay of 0.1

    strike back

    tell the end

    Since I trigger the 'applescrip' using the 'Workflow folder action... " Is it possible that I can get the value or the path of the new file included?

    I found a code that renames all the files from 0 to xxx folder action, but the new included file is always the last of them on digital process... is possible to rename the files and give the new file name "update1.jpg" first?

    Also I can order "Go to folder" action must seek that specify the file: 'update1.jpg. '

    This is the script name change: (BTW, these scripts always ask me to select folder... and what I want is to be automated out of my interaction with but do not know how to change so it will always use the "updates" folder

    Tell application "Finder".

    a in each file of the entire contents of the value (choose the folder)

    Repeat with aa in one

    the file_name my MakeBase (aa AsString) value

    If file_name is not 'JUMP' then

    count_er Set 1

    the value all_files (all files in aa)

    Repeat the operation with ff in all_files

    the name value of ff ((texte-3-1 par le biais de ("000" & (count_er as string))) & "." & (name extension for ff))

    Set count_er to count_er + 1

    end repeat

    end if

    end repeat

    tell the end

    to MakeBase (txt)

    the value astid delimiters to point to the text of the AppleScript

    the text value of the point AppleScript delimiters «:»

    the value for each item of text txt new_Name_Raw

    the text value of point AppleScript delimiters to "_".

    the value final_Name for each item in new_Name_Raw text text

    the text value of the point AppleScript astid delimiters

    If length > 251 of final_Name then set final_Name on 'SKIP' - will be more than 4 characters for counter

    return final_Name

    end MakeBase

    Any help will be much appreciated.

    Thanks /.

    What version of Mac OS X are you running?

  • The most recent data in a table view

    I'm adding values to a bulletin board as in the example, but I want to be the most recent data for the user to see the top line.

    He keeps adding to the bottom, and then the user will have to Diecut down see all data.      Can I select the most recent data somehow or get auto-scrolling data table are applied?     I tried registers to shift as well, but no luck.

    Here's my VI

    Thank you

    Mike

    Have you read the help of the function insert in the table? He clearly says that if you leave the unwired index entries, it will insert at the end. So, don't let the unwired index entries. Wire a '0' to the row index.

  • How to turn off the most recent list used to term & other apps

    were if you search the registry problem disable MRU in all applications, especially the run command on the start menu, but I would like to eliminate all the other apps as well

    I found several solutions including one that mentions comdlg32, others who need to add fields to the register, any other fair value dword

    Is there a single solution or do I need a combination of solutions

    I didn't do this, but here I found at least 5 versions, one of which is correct & universal
    :
    1. [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Comdlg32]
    "NoFileMru" = DWORD: 00000001

    2.HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
    Value name: NoRecentDocsMenu
    Value type: REG_DWORD
    Value data: 0 or 1
    0 = Yes, allow these recent docs
    1 = no, do not allow any recent docs

    Value name: ClearRecentDocsOnExit
    Value type: REG_DWORD
    Value data: 0 or 1
    0 = no does not clear
    1 = Yes, clearly their

    Value name: NoRecentDocsHistory
    Value type: REG_DWORD
    Value data: 0 or 1
    0 = historic Yes
    1 = no history

    3 turn off the history:
    Click Start--> Run--> type "regedit" in the Run dialog box.
    When in the registry, locate the following key:
    HKEY_CURRENT_USER > Software > Microsoft > Windows > CurrentVersion > Explorer > RunMRU.
    Right click on the RunMRU key and choose "Permissions."... ».
    Click on "Add..." ».
    Type "Everyone" and click OK in the box that opens.
    In the permissions (security) dialog box, select all and then deny read access.
    Click OK.
    Close the registry editor. You may need to restart your computer for the changes to take effect

    ' 4 ' most recently used ' list - how to disable file
    Previous

    The information in this article applies to:

    WinWay RESUME 9.0 and versions later

    Summary

    Like many other Windows applications, the menu 'File' of WinWay RESUME luxury offers easy access to read files recently. This article explains how to remove this list.
    More information

    Windows offers a system policy to disable the file 'most recently used' lists for applications in accordance with this particular policy standard.
    To turn off the "most recently used" list of files, download and run this file.
    To restore the list, download and run this file.

    Notes:

    This setting affects several applications, not only WinWay RESUME
    This setting applies only to the user currently logged on to the computer. You can repeat these steps for the other connections if necessary

    For advanced users

    The parameters above can be entered through the Publisher of the registry as well.

    Select Start, run, Reg Edit
    Navigate to this registry key:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
    To disable the "recently used file list", adds the value:

    Name: NoRecentDocsHistory
    Type: DWORD
    Value: 1

    To activate the "recently used file list", right-click on the 'NoRecentDocsHistory' and select 'delete '.

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion \Policies\Comdlg32 key. 2. create a REG_DWORD value called NoFileMru and set the value to 1.

    5.
    Type regedit in the box RUN, and then press ENTER. It will open the registry editor.

    2. now go to following keys successively:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
    HKEY_USERS\.default\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

    In the right pane, look for a DWORD 'ClearRecentDocsOnExit '. Its value could be set to 1. Set its value to 0 or delete it completely.

    The recent documents menu can be disabled easily by editing the registry. To do this, go to the following key:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
    Now in the right pane, create a new DWORD with the name: NoRecentDocsMenu and set its value to 1. Restart the browser to save the changes.
    You can also clear the RUN MRU history. All ads are stored in the key:
    HKEY_USERS\. Default\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU
    You can remove individual entries or the entire list. To remove history to find inscriptions date on:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Doc find Spec MRU and delete.

  • After that the most recent windows update, my computer starts a little more slowly and the start bar at the bottom rises gray and rasterized.

    After that the most recent windows update, my computer starts a little more slowly and the start bar at the bottom rises gray and rasterized. In addition, all pages that I opened on the internet are coming with the same blocks of old, gray. Any ideas on what was past, and how to fix it?

    Original title: old start bar

    Right-click on your desktop, go to customize and then make sure that any theme in the 'Aero' section is currently selected.

  • Windows 7 photo order oldest to the most recent

    Unable to display my photos in chronological order taken. They default to the most recent date but not on the closest date

    You can do a right click on the background of the white paper and click Sort by and use ascending or descending.

  • Performance of the queries in order to get the most recent price

    Happy new year everyone.

    I have a table of price in my system that has several awards for each product with the date, the price is entered into force.

    I have queries throughout the system to retrieve the most recent actual price for the date of the transaction.

    I can find to implement the easiest way is to have a user-defined function to collect the prize.

    My problem is that many of my questions have access to large amounts of data (for example, transactions) and my table of prices is also big enough - both have millions of records. Using a Pl/SQL function defined by the user in my query, I get a lot of switching context between SQL and PL/SQL and my questions are not well

    Here is an example of code, which simplifies my scenario:

    drop table xo_stock_trans;
    create table xo_stock_trans (item varchar2(25), trans_date date, quantity number(20,4));
    insert into xo_stock_trans values('A',TO_DATE('25-DEC-2014','DD-MON-YYYY'), 4);
    insert into xo_stock_trans values('A',TO_DATE('27-DEC-2014','DD-MON-YYYY'), -2);
    insert into xo_stock_trans values('A',TO_DATE('28-DEC-2014','DD-MON-YYYY'), 5);
    insert into xo_stock_trans values('B',TO_DATE('23-DEC-2014','DD-MON-YYYY'), 20);
    insert into xo_stock_trans values('B',TO_DATE('26-DEC-2014','DD-MON-YYYY'), -6);
    insert into xo_stock_trans values('B',TO_DATE('29-DEC-2014','DD-MON-YYYY'), 15);
    /
    -- Generate lots more data
    BEGIN
        -- Generate more trans dates
        for r in 1..1000
        LOOP
            insert into xo_stock_trans
            select item, trans_date - r - 7 as  trans_date, ROUND(dbms_random.value(1,50),2) as quantity
            from xo_stock_trans
            where trans_date between TO_DATE('23-DEC-2014','DD-MON-YYYY') AND TO_DATE('29-DEC-2014','DD-MON-YYYY')
              and item in ('A','B');
        END LOOP;
        COMMIT;
        -- generate more items
        for lt in 1..12 
        LOOP
            -- generate C,D, E, items
            INSERT into xo_stock_trans
            SELECT chr(ascii(item)+(lt*2)) as item, trans_date, quantity
            from xo_stock_trans
            where item in ('A','B');
            -- generate A1, A2, B1, B2, etc
            for nm in 1..10
            LOOP
                INSERT INTO xo_stock_trans
                select item || to_char(nm), trans_date, quantity
                from xo_stock_trans
                where length(item) = 1;
            END LOOP;
            COMMIT;
        END LOOP;
        COMMIT;
    END;
    /
    create index xo_stock_trans_ix1 on xo_stock_trans (item);
    create index xo_stock_trans_ix2 on xo_stock_trans (trans_date);
    exec dbms_stats.gather_table_stats(ownname =>user, tabname => 'XO_STOCK_TRANS' , estimate_percent => 100, degree => dbms_stats.auto_degree, cascade=>true);
    /
    
    
    drop table xo_prices;
    create table xo_prices (item varchar2(25), price_date date, gross_price number(20,4), net_price number(20,4), special_price number(20,4) );
    insert into xo_prices values ('A', to_date('01-DEC-2014','DD-MON-YYYY'), 10, 8, 6);
    insert into xo_prices values ('A', to_date('25-DEC-2014','DD-MON-YYYY'), 9, 8, 6);
    insert into xo_prices values ('A', to_date('26-DEC-2014','DD-MON-YYYY'), 7, 6, 4);
    insert into xo_prices values ('B', to_date('01-DEC-2014','DD-MON-YYYY'), 5.50, 4.50, 3);
    insert into xo_prices values ('B', to_date('25-DEC-2014','DD-MON-YYYY'), 5.00, 4.00, 3);
    insert into xo_prices values ('B', to_date('26-DEC-2014','DD-MON-YYYY'), 3.50, 2.50, 2);
    /
    -- Generate lots more data
    BEGIN
        -- Generate more price dates
        for r in 1..1000
        LOOP
            insert into xo_prices
            select item, price_date - r - 7 as  price_date,gross_price, net_price, special_price
            from xo_prices
            where price_date between TO_DATE('23-DEC-2014','DD-MON-YYYY') AND TO_DATE('29-DEC-2014','DD-MON-YYYY')
              and item in ('A','B');
        END LOOP;
        COMMIT;
        -- generate more items
        for lt in 1..12 
        LOOP
            -- generate C,D, E, items
            INSERT into xo_prices
            SELECT chr(ascii(item)+(lt*2)) as item, price_date, gross_price + (lt*2), net_price + (lt*2), special_price + (lt*2)
            from xo_prices
            where item in ('A','B');
            -- generate A1, A2, B1, B2, etc
            for nm in 1..10
            LOOP
                INSERT INTO xo_prices
                select item || to_char(nm), price_date, gross_price, net_price, special_price
                from xo_prices
                where length(item) = 1;
            END LOOP;
            COMMIT;
        END LOOP;
    END;
    /
    
    create index xo_prices_ix1 on xo_prices (item, price_date);
    exec dbms_stats.gather_table_stats(ownname =>user, tabname => 'XO_PRICES' , estimate_percent => 100, degree => dbms_stats.auto_degree, cascade=>true);
    /
    
    create or replace function xo_get_price(I_Item in VARCHAR2, I_Date in DATE, i_Price_type IN VARCHAR2) RETURN NUMBER
    IS
        -- Function to get most recent effective price prior to the date
        CURSOR c_get_prices(P_Item VARCHAR2, P_Date VARCHAR2)
        IS
        SELECT gross_price, net_price, special_price
        FROM XO_PRICES
        WHERE item = P_Item
         AND price_date <= P_Date
        ORDER BY price_date desc; -- most recent price
        
        l_gross_price NUMBER(20,4);
        l_net_price NUMBER(20,4);
        l_special_price NUMBER(20,4);
    BEGIN
        OPEN c_get_prices(I_Item, I_Date);
        FETCH c_get_prices INTO l_gross_price, l_net_price, l_special_price;
        CLOSe c_get_prices;
        
        IF I_Price_Type='GROSS' then return l_gross_price;
        ELSIF I_Price_Type= 'NET' then return l_net_price;
        ELSIF I_Price_Type= 'SPECIAL' then return l_special_price;
        END IF;
    END xo_get_price;
    /
    
    -- Here is a typical query I am trying to perform
    select tr.item, tr.trans_date, tr.quantity
        , xo_get_price(tr.item, tr.trans_date, 'GROSS') as gross_price
        , xo_get_price(tr.item, tr.trans_date, 'NET') as net_price
        , xo_get_price(tr.item, tr.trans_date, 'SPECIAL') as special_price
    from xo_stock_trans tr
    where tr.trans_date between '01-AUG-2014' and '31-AUG-2014';
    

    I would like to refactor my request so that I do not use the user Pl/SQL functions, but so far I can't get something that works better than the SQL above. For example, the following query is MUCH longer:

    select tr.item, tr.trans_date, tr.quantity
        , pr.gross_price
        , pr.net_price
        , pr.special_price
    from xo_stock_trans tr
    join xo_prices pr on pr.item = tr.item
                    and pr.price_date = (select max(pr2.price_date)
                                         from xo_prices pr2
                                         where pr2.item = pr.item
                                           and pr2.price_date <= tr.trans_date
                                         )
    where tr.trans_date between '01-AUG-2014' and '31-AUG-2014';
    

    I'm interested to know if anyone has addressed a similar scenario and have managed to write more efficient code.

    I looked at the determinism/manual caching of the function, but the article/date combinations are quite unique and therefore he does not benefit from him.

    Any suggestion under review - parallelism, analytical, pipeline functions, etc.

    Alan

    Hi, Alan.

    Alan Lawlor wrote:

    ...

    My problem is that many of my questions have access to large amounts of data (for example, transactions) and my table of prices is also big enough - both have millions of records. Using a Pl/SQL function defined by the user in my query, I get a lot of switching context between SQL and PL/SQL and my questions are not well...

    You got that right!  User-defined functions can be very practical, but this practice comes with a price.

    What version of Oracle are you using?  The Oracle 12, there is a new feature of 'temporal validity' which may help you.

    In any version, it will be much faster if you add a new column to the xo_prices table.  You can call this end_date, although it would in fact be the date when some other prices took effect.  You might put DATE' 9999-12-31 in the column end_date for current prices.  You can calculate end_date using the analytical function of LEAD.  Be sure to re-calcluate end_date when you insert new rows into xo_prices, or when you update the dates on existing lines.

    Once you have PRICE_DATE and end_date in the XO_PRICES table, you can join this table to get the real price from d by including

    AND d > = xo_prices.price_date

    AND d< >

    in the join condition.

    In some situations, especially when you don't have much different (item, dates) combinations, scalar-sub-queries could be faster than joins.

    Whatever it is, it participates without PL/SQL, so there is no context switching.

  • Return the most recent line with analytics

    Hi all

    Let's say I have this kind of 2 tables:

    (People) CREATE TABLE

    ID NUMBER,

    name VARCHAR2 (128));

    INSERT INTO persons VALUES (1, 'Ted');

    INSERT INTO persons VALUES (2, 'John');

    (Grade) CREATE TABLE

    people_id NUMBER,

    title VARCHAR2 (128).

    START_DATE DATE);

    INSERT INTO rank VALUES (1, 'Private', to_date('03-09-1980','DD-MM-YYYY'));

    INSERT INTO rank VALUES (1, 'First Class', to_date('25-03-1982','DD-MM-YYYY'));

    INSERT INTO rank VALUES (1, 'Sergeant', to_date('22-08-1989','DD-MM-YYYY'));

    INSERT INTO rank VALUES (2, 'Sergeant', to_date('07-09-1987','DD-MM-YYYY'));

    INSERT INTO rank VALUES (2, 'Lieutenant', to_date('17-05-1995','DD-MM-YYYY'));

    What would be the way smart to find the last year of all the people?

    Now, I would do something like this:

    WITH tmp AS)

    SELECT

    people_id

    title

    DENSE_RANK() over (PARTITION BY people_id ORDER BY start_date DESC) history

    GRADE

    )

    SELECT

    People.Name, tmp.title

    Of

    LEFT JOIN tmp WE the people (people.id = tmp.people_id AND tmp.history = 1)

    ;

    Result:

    NAMETITLE

    -------- -------------------------

    TedSergeant
    JohnLieutenant

    Is there a smarter way to do it?

    In particular, is there a way to return only the most recent (or older) line a table? (I tried the FIRST clause without success...)

    Thank you!!

    It will work for your example. More generally you would probably group by id and then just drag the columns id that show you (in case you had two Teds, for example)

    SELECT title of the Dungeon (dense_rank last order by start_date) p.name, max (title)

    class g

    join in-house people p on g.people_id = p.id

    Group p.name;

Maybe you are looking for