Find the folder with the timestamp of the last

Hello

I have a table that has four fields.


CREATE TABLE MATCH_L
(
SUBSCRIPTION_INFO VARCHAR2 (512 BYTE),
SUBSCRIBERID NUMBER NOT NULL,
VARCHAR2 (12-BYTE) USERID NOT NULL,.
TIME_LAST_USED TIMESTAMP (6) NOT NULL
)
TABLESPACE TEST1
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE)
64K INITIALS
ACCORDING TO 1 M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
DEFAULT USER_TABLES
)
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;



For each couple of records like below

FSB0004609 42 192902070016 2012-05-03 10:30:33, 011000
FSB0004609 42 192902070016 2012-04-19 14:30:33, 627000
FSB0004609 42 192902070016 2012-04-03 16:28:16, 019000
FSB0004609 42 192902070016 2012-03-21 17:11:04, 398000
FSB0004609 42 192902070016 2012-04-30 09:12:40, 366000


SUBSCRIPTION_INFO, SUBSCRIBERID, USERID are the same and they differ just in the timestamp.

So I want to get my hands on one of these "all the two files" that are having the last TIME_LAST_USED.

I hope you understood what I want (in another interpretation, I want to have a USER SUBSCRIPTION_INFO name, SUBSCRIBERID, distinct but not not using separate in the query)

Please let me know if my explanation is not enogh.

Concerning

/ Louis

Published by: Louis March 19, 2013 15:01

Simply use GROUP BY:

SELECT  SUBSCRIPTION_INFO,
        SUBSCRIBERID,
        USERID,
        MAX(TIME_LAST_USED) TIME_LAST_USED
  FROM  MATCH_L
  GROUP BY SUBSCRIPTION_INFO,
           SUBSCRIBERID,
           USERID
/

SY.

Tags: Database

Similar Questions

  • Find the last characters with grep

    I'm lousy with grep and didn't find the solution with google, we will so ask here (help me, please...)

    I need to find the last 7 characters in a paragraph and assign a character style "not break". I know that all the rest, but what is the string to find the last 7 characters (white space included, numbers and letters).

    Thanks in advance.

    try searching. {7} $

  • Camera: Find the last image?

    Hello

    Are there examples of how to find the last image taken after invoking the camera?

    Thank you

    Hi and welcome to the forums!

    If you take the picture and save, and can't find it? Or you take pictures

    Return to the back and you want to know where they are stored as you pull?

    Go to the media and click the photos, as soon as the images are displayed

    Highlight it, click menu, properties. It will show you, device, media and file

    and size.

    You can set the previous directory. Unit > menu button > options.

    Here you can set options for the camera with flash, color, size, and storage in the

    media folders,

    Thank you

    Bifocals

  • How to find the last date of execution of the objects in database

    Hi all

    We're going for an upgrade of the database 11g and for the same thing, we want to know the last date of the following-

    Packages, Tables, views
    Conc. programs / value Sets / look up / profile options

    Is there a way we can find the same thing.
    The answers would be really useful.

    Kind regards
    Shruti

    So can you provide clues on how to find the last opportunity registration

    I don't think you can find such a script with having activated audit.

    Thank you
    Hussein

  • How to find the last pasted paragraphs FMP?

    I'm sticking FMP several objects at once in a file (a file of changes to the sections containing the changebars) in the main text flow. I want a separator line to go at the end of each pasted section, so I try to insert one after the paste operation. But instead of a line between each section, all lines are added at the end of the file, after all the sections. So if there are 3 glued sections at the end of the file are three lines. My code is below, do you know how I could fix this?

    Thank you, Mark

    function copyPasteChanges (doc, chgRange) {}

    Select the section with changebar and copy it.

    doc. TextSelection = chgRange;

    doc. Copy();

    Prepare for the changes doc and paste there the modified section.

    var firstChgPgf = changesDoc.MainFlowInDoc.FirstTextFrameInFlow.LastPgf;

    var changesTloc = new TextLoc (firstChgPgf, Constants.FV_OBJ_END_OFFSET);

    var changesTRange = new TextRange (changesTloc, changesTloc);

    changesDoc.TextSelection = changesTRange;

    changesDoc.Paste ();

    To go at the end of the file again (I think)

    var lastPgf = changesDoc.MainFlowInDoc.FirstTextFrameInFlow.LastPgf;

    var dividerPgf = changesDoc.NewSeriesPgf (lastPgf);

    var TLoc = new TextLoc (dividerPgf, 0);

    changesDoc.AddText (TLoc, '_');

    }

    Hi Mark,

    The problem is that the dough does not occur when you think. The dividing line is added at the end of the file, but are not your actions of dough. Actually, I think that maybe a little random where pasta is produced, because this line:

    var changesTloc = new TextLoc (firstChgPgf, Constants.FV_OBJ_END_OFFSET);

    .. .is does not create a valid text location. You can check this by abandoning the service after:

    changesDoc.TextSelection = changesTRange;

    .. and look at where's the insertion point. It will probably be everywhere where you left it last, because the call is not valid. I can't tell you exactly why, except that it has something to do with the fact that you are using the last paragraph in the stream. There is something weird to try to define a range of full-paragraph text with the last paragraph. I'm sure it's related to how the last TFP in a stream does not show a mark of FMP, but beyond that, I don't know how to do what you're trying to do with the last paragraph.

    Having no knowledge of how do it right, any time I need to do this, I create a paragraph "dummy" at the end of the flow to fill that space strange 'last FMP", then do the work around it. In the end, I just want to remove fake TFP. I don't know if it's a good idea or not, but it's the only way I ever get it to work and it sorts the mirror how you could do this manually in the GUI.

    With this, I modified your script as follows, and it seems to work better. Note that I also modified the logic of how to find the last paragraph of the flow by writing a separate function. Your call to the 'FirstTextFrameInFlow' is OK, unless your doc begins to span several pages and/or begins with several empty pages. The function I wrote ensures that you really the last TFP in the stream.

    I hope this helps.

    Russ

    function copyPasteChanges (doc, chgRange) {}

    Select the section with changebar and copy it.

    doc. TextSelection = chgRange;

    doc. Copy();

    Prepare for the changes doc and paste there the modified section.

    var lastPgf = getLastPgf (changesDoc);

    var dummyPgf = changesDoc.NewSeriesPgf (lastPgf);

    var changesTloc = new TextLoc (dummyPgf, 0);

    var changesTRange = new TextRange (changesTloc, changesTloc);

    changesDoc.TextSelection = changesTRange;

    changesDoc.Paste ();

    To go at the end of the file again (I think)

    Don't forget that last TFP is now fake TFP

    lastPgf = getLastPgf (changesDoc);

    var dividerPgf = changesDoc.NewSeriesPgf (lastPgf.PrevPgfInFlow);

    var TLoc = new TextLoc (dividerPgf, 0);

    changesDoc.AddText (TLoc, '_');

    dummyPgf.Delete ();

    }

    function getLastPgf (doc)

    {

    textFrame var is doc. MainFlowInDoc.LastTextFrameInFlow;

    var lastPgf = textFrame.LastPgf;

    While (! lastPgf.ObjectValid () & textFrame.ObjectValid ())

    {

    textFrame = textFrame.PrevTextFrameInFlow;

    lastPgf = textFrame.LastPgf;

    }

    Return lastPgf;

    }

  • My iPhone is dead and the lack of how find the last location?

    How to find the last location of the iphone

    Apple has sent sms on my phone number. We found your lost iphone please refer to the specific location. Apple. messageios.com apple support. What shoud I do

  • How do you find the last time that an address older Windows Live Hotmail has been used if you don't remember the password?

    How do you find the last time an old hotmail address was used... especially if you can't remember the exact password?

    original title: old hotmail address

    How do you find the last time an old hotmail address was used... especially if you can't remember the exact password?

    Good enough if you can't on the account and you can't prove it is yours in order to regain access (via password self-service reset, etc)-then you won't know anything about the account.

  • [JS] To find the last updated the story?

    Hello.

    I can find the last story added.  (app.activeDocument.stories.lastItem ())

    But I want to find the last updated the story.

    Is there a way?

    Hello..

    Updated the story means that it is many possibilities... for example, if you add a cahracter, deletion of a character, track changes, change of font etc...

    so every change attribute will give the last updated the story...

    I hope that you should check the possibilities!

  • How can I find the last selection OR has highlighted it selection?

    When I select some elements in indesign I have the option of 'command + click' to highlight one selections. How can I find this item highlighted in the script?

    OR

    How I'll get the last item selected in indesign.


    I'm writing a script that relies on certain properties of the element highlight or the last selected item.


    Thank you


    Screen Shot 2014-08-01 at 12.17.03 PM.png

    Thank you myDavey. It's not exactly what I was looking for, but he had good information on something else, I'm trying.

    I found the solution to my problem. This highlighted selection apparently called the object 'key '.

    And it can be used in the script as app.selectionKeyObject. This solves what I was looking for.

    And you can find the last selection by selecting the last item in the selection table.

  • Find the last character in a string aplhanumreic

    Hi guys first time poster long time hiding in the shadows, I hope someone can help me

    I put the stored username and I need to find the last character before the number, for example

    ABC123 that I would like to find c
    AB123 I would find b

    suggestions as to how I could do this?
    Thanks in advance

    Here's one way:












  • Mr President, how to find the last DML operations

    Hello

    Please tell me how to find the last DML operations at least a minimum of 30 queries.

    Thanks in advance,

    Select sql_id, sql_text, last_load_Time from V$ SQLAREA

    or

    Select * from v$ sqltext

    Must be one of them. But don't know what exactly you are looking at.

    I usually use v$ sqlarea to see recent queries.

    Maybe you can limit the rows using rownum, order of last_load_time.

    I understand, if the same query is used again then only recent transaction is stored.

  • How to find the last update date, time and user of the file field peoplecode

    How to find the last updated date time fields of peoplecode records?

    Thank you.

    We can check the update date-time using the following query

    SELECT LASTUPDDTTM IN THE PSPCMPROG WHERE OBJECTVALUE1 LIKE "RECNAME" AND OBJECTVALUE2 AS "FIELDNAME".

  • How to find the last person from my iPad that is locked

    I need help to find who is the person who took my iPad 2, so I can't unlock

    Unfortunately, it is to you to find the previous owner. We can not help you with that.

    If you are trying to accomplish something else, we would need more information.

  • find the last time that a procedure has been called

    Hi DBAs,

    How to find when a procedure or function was called again in 10g. Besides, even when a table last access. If this can be done without activating the audit? is there a such views or tips to find such changes?

    Thank you!

    Without verification, it is not possible, generally speaking.

    If a procedure has side effects, you could potentially look through the database to find these side effects. If inserting a new row in a table with a SYSDATE CREATE_DATE, it would be very useful. If you mean a function that does not have the side effects, however, it is not an option. If the function or procedure works for a relatively long period, his performances can be picked up in an AWR / statspack report. But it is unlikely that each execution would be seized, it is unlikely that the history is kept very long, and it is not always trivial to these research reports for the last time that a procedure has been run. And if you have a relatively quick process, it is unlikely that the executions would be ever recorded.

    Statistics at the level of the segment could give you advice on access to the table. But these statistics are cumulative since the last restart. And there are likely background processes that affect all tables at certain interval (i.e. statistics collection), which is probably not the kind of 'access', you are interested.

    Justin

  • Find the last valid value in a date range

    The data I work with represents readings from different instruments. A follow-up field of a sum running while this number continues to increase. I need to look at the data for a particular date, but the problem is that sometimes the instrument is turned off. In this case there is no data for that date, however since all I want is the total sum for the signal on this instrument, I need to keep going until I find the latest valid data in the database that would represent the sum up to this point. How can I design a query or procedure that would deal with this eventuality? Some examples of data:
    PV_ID                  SMPL_DTE                  INTEG_SINCE_VAL 
    ---------------------- ------------------------- --------------- 
    271                    20-JUL-08 12.05.00 AM     6172.0387459767 
    271                    20-JUL-08 12.06.00 AM     6172.0387459767 
    271                    21-JUL-08 12.05.00 AM     6172.0387459767 
    271                    21-JUL-08 12.06.00 AM     6172.0387459767 
    271                    21-JUL-08 08.43.00 AM     6172.0387459767 
    271                    21-JUL-08 08.45.00 AM     6172.0387459767 
    271                    22-JUL-08 12.05.00 AM     6172.0387459767 
    271                    12-AUG-08 04.45.00 PM     6172.0387459767 
    271                    12-AUG-08 04.50.00 PM     6172.038748687284 
    So, if for example I run a query for July 30, I would need to get the result of the July 22 because it is the last valid number. PV_ID represents the ID of the instrument and the INTEG_SINCE_VAL of the total cumulative for signal readings on this instrument.

    Published by: Solerous on March 16, 2009 07:23

    Published by: Solerous on March 16, 2009 07:25

    Hello

    If you want the last row or before a given date of the target as on July 30, 2008)?

    Here's a way

    SELECT  *
    FROM    (
            SELECT    *       -- or whatever columns you want
            FROM      table_x
            WHERE     sample_dte < TO_DATE (:target_dte, 'DD-MON-RR') + 1     -- See note below
            ORDER BY  sample_dte DESC
            )
    WHERE   ROWNUM = 1;
    

    NOTE: the above query adds a day to the current deadline, but selects the lines that are less important (not equal to) that link, so if you enter 30 July 08, it compares against 31 July 08, so he would choose anything on the date target itself, no matter what time. In other words, if you ask 30 July 08, you could get something later than 30 July 08 23:59:59, but you wouldn't get 31 July 08 12:00:00 AM.

  • How to find the last schema change hour?

    Hello. I would like to get the following info on our list of schema full of db (11 GR 2 Linux x 64) and every scheme of last modification time (so, if changes have been made in any table, etc.). It is may also get info about who was last modifier, but if I understand correctly, it is not possible without verification turned on?

    DML changes is not something Oracle titles unless explicitly, you're doing something like enable auditing.

    There should be that all the tables in the full schema of analysis, but you could do

    select max(ora_rowscn )
      from schema_name.table_name
    

    and choose the largest value. Assuming that you care cuts, that would give you the SCN for the last INSERT or UPDATE on a table in the schema. If the last such change was relatively recent, you can convert it into a timestamp by calling SCN_TO_TIMESTAMP. But this mapping is only kept for a few days. If "long" means more than a week, and then you try to extrapolate a SNA in time which is likely to be very error-prone.

    Justin

Maybe you are looking for

  • Publish my book pdf

    Hello I would like to know how to publish my first book written in French on pdf or epub? I heard that I have to first register on ibook, it also gives me the right to publish it on Amazon or Apple prevent him. Please let me know! Thank you Evy

  • Switching from XP to Windows 7 on my Satellite M30

    Hello... I have a Satellite M30 with XP and you want to clean install Windows 7.I think that this is possible, but I noticed that Toshiba does not support my model (M30) for his DVD to upgrade to windows 7 that wants to say I can't do?Has anyone succ

  • How to hide files in the Local C drive?

    I opened the local C drive and clicked on the file of Windows. I then clicked to view the files and now do not know how to hide them again!Stupid probably and perhaps siple to sort - but I don't know how and I don't want to delete anything in the fol

  • The touchpad scrolling has stoped working on satellite

    The touchpad scrolling has stoped working.I restarted / reinstalled the driver / reformatted hardrive 3 times (this works but the feature soon stop) / sytem restore / disabled firewall /? Can anyone help please it is really annoying me for the first

  • HP Pavilion Notebook N9R33EA # a: problems with the BIOS update (HP Support Assistant)

    I was offered an update of software SP77359, which seems to me to be an update of the BIOS provided by HP Support Assistant. Version F.82Ap1. Two days ago, I updated the BIOS via the support and, on the report wizard got an other update via the suppo