Retrieveal based on sign_on/OFF

I have the followng fields in my table
ID NUMBER
ACTION_ID NUMBER
ACTION_TIMESTAMP TIMESTAMP
ACTION_MSG VARCHAR2(255)
ACTION_PROC_ID NUMBER
The action_msg field gets populated by the values sign_on or sign_off. Usually SIgn_off would be first and then it would be sign on. There could be some other meessages also. Basically this is a stand-in application and sign_on and sign_off could happen multiple times in a day. Now I need to take this window of time between a sign_off and a immediate sin_on and use this time range to get the STAND-IN transaction details from a different TRANSACTION table. How do I do this? I tried nested tables and varrays for fetching the values of action_msg but could not gO any further due to problem with vArrays and I keep on gettin
ORA-06533: Subscript beyond count
The resulotant rows is 10 and I've declared the type variable to varray(1000). Even then I'm getting the above error. Ca anyone suggest a alternative method/logic for this
Thanks in advance

A Sign_Off would occur first and then a corresponding sign_on would occure. There may be concurrent sign_off and sign_ons but will be for different machines/servers. Any given server can have one signoff followed by a sign on. There are two servers S1 and S2. The action_msg field will have the name of the server S1 or S2, with a mention of either a sign_on or sign_off. I need to pick the name of the server from this message and consider the consecutive signoff and signon for each servers and use this time window in getting the records from transaction table. This is done on a daily basis to prepare a report
The transaction table description is
TRN_ID NUMBER
TRN_TIMESTAMP TIMESTAMP
TRN_AMOUNT NUMBER(38)
TRN_RESULT_CODE NUMBER .....
I'll be using the above fields in getting the number of transactions for the period when the server was down. Below is some code I've been testing (only for S1) when I encountered the array outta bound error
declare
type act_id is table of actnt.act_id%type;
type act_tstamp is table of timestamp;
type act_procid is table of action.act_proc_id%type;
type act_mesg is table of action.act_msg%type;
type trn_id is table of transaction. id%type;
type trn_timestamp is table of transaction. trn_timestamp%type;
type trn_RC is table of transaction. trn_result_code%type;
type trn_amt is table of transaction. amt_trn%type;
type S1_msg is varray(1000) of vRChar2(255);
type S1_time is varray(1000) of timestamp;
type S2_msg is varray(1000) of vRChar2(255);
type S2_time is varray(1000) of timestamp;
V_act_id     act_id;
V_act_proc_id     act_procid;
v_act_tstamp act_tstamp;
v_act_mesg act_mesg;
v_trn_id trn_id;
v_trn_timestamp trn_timestamp;
v_trn_RC trn_RC;
v_trn_amt trn_amt;
v_S1_msg S1_msg:=S1_msg('A','B'); ----Forced to initialise to avoid a unassigned collection error
v_S1_time S1_time:=S1_time(sysdate);
v_S2_msg S2_msg:=S2_msg('A','B'); ----Forced to initialise to avoid a unassigned collection error
v_S2_time S2_time:=S2_time(sysdate);
cursor c_log is select      act_id,     act_id,
     to_char(act_timestamp, 'DD-MON-YY HH:MI:SS'),
          act_proc_id,
          act_mesg from action          
where act_id in (111,543,634,232)and
to_char(act_timestamp,'DD-MON-YYYY')=
to_char(sysdate ,'DD-MON-YYYY')
and act_proc_ID in (999,888)
order by act_timestamp;
begin
open c_log;
loop
fetch c_log bulk collect into V_act_id,V_act_id,v_act_tstamp,V_act_proc_id,v_act_mesg;
exit when c_log%notfound;
end loop;
close c_log;
For i in 1..v_act_id.count
loop
If SUBSTR(v_act_mesg(i),1,10)='server Auth_1' then
     v_S1_msg(i):=v_act_mesg(i);
     v_S1_time(i):=v_act_tstamp(i);
     dbms_output.put_line('server Message is '||v_S1_msg(i)||' Time is '||v_S1_time(i));
end if;
end loop;
end;

Similar Messages

  • Is there a way to retrieve all deleted photos off of a old iPhone 4?

    I know this may be hopeless but I had to ask because this is very important IF I'm able to get these old photos. With my old iPhone 4, I would delete pictures off of there if I uploaded them online or if I just didn't want them on my phone anymore (which I'm not regretting and I don't do now with my iPhone 5). I'm just wondering if there is anyway I can retrieve/recover any of my photos that I deleted off of my phone? The last time I backed this phone up was a LONG time ago and it was on my old MacBook so I doubt I can recover the pictures that way. Help please?

    Hi thatssoblasian,
    If you don't have a backup with the photos on it, and they weren't downloaded elsewhere, they're gone. Sorry.

  • Newbie question: Designing a contact info retrieval based on filters

    Dear all,
    I am new to SSAS trying and need help in designing this reporting requirement
    Filter for Customers based on dimensions (regular and fact) in various tables related by many-to-many relationships
    With this list of Customers, retrieve their contact details (address, email, etc)
    My plan is to use SSAS (multidimensional) with either Excel 2007/SSRS reports for the user front end. My queries are:
    Should the customer contact details be a dimension or fact?  (One customer has only one contact detail and it resides in the same table)
    Once the customers have been filtered, how then to generate the customer’s contact details from the filter results?
    Will my choice of tools work for my requirements?
    Many thanks in advance,
    Best regards,
    CT

    Hi CTE00,
    The customer contact details shoud be the attributes for "Customer" dimension. For question2, what's is the filter of Excel/SSRS reports? The reports will generate corresponding result based on the filters.
    For question 3: Office Excel is a powerful tool, which offers lots of new business intelligence (BI) features and functionality. It should suit you perfectly, and meet your needs. For detail information, please refer to the following articles:
    Analyze data from SQL Server Analysis Services by using Excel:
    http://technet.microsoft.com/en-us/library/hh344830(v=office.14).aspx
    If you have any feedback on our support, please click
    here.
    Regards,
    Elvis Long
    TechNet Community Support

  • DROID X DOES NOT RETRIEVE EMAIL UNLESS POWERED OFF, THEN ON

    I've identified through testing and confirmed that my 3 day old Droid X does NOT actually retrieve email from a third party (non Google) mail server WITHOUT having to power it down, then back up first.  Activating the cute little manual retrieving spinning circle, in fact, does NOTHING.
    I have tested this a MILLION times after not getting emails.  MANUAL or SCHEDULED settings absolutely do not work.
    I REPEAT, I do not receive  email unless powered off then on
    I set the the following to no avail:
    * battery profile to "Performance"
    * Data Delivery settings to "Background data" enabled
    * Data roaming to enabled
    * Email and Corporate Synch settings/Email delivery settings "Data Push" to enabled
    * "Fetch Schedule" to EITHER "15 minutes" or "manual" (either of which shouldn't matter if Data Push is enabeled)
    * Sync over WI-FI Only is disabled 
    Not retrieving email is critical to my business- I use a device for email more than I talk to anyone.
    This constitutes a breech of service unless it is immediately rectified.
    My Droid X was delivered as the following;
    Version 1.13.604.MB810.Verizon.en.US
    Firmware 2.1-update-1
    Baseband Version BP_C_01.04P
    Kernel Version 2.6.29 w30471@il93lnxdroid08 #1
    Build Number VZW
    ERI Version 5
    PRL Version 51926

    DincX110 wrote:
    I Have had this Happen more than once Now i'll Be using my Wi-Fi Then when i shut it off on the X  it does not want to Re- Connect with the Network at all.   An i'm wondering if its beacause of a setting that i may have it on or maybee an App. Causing this issue
    Has any one experienced this on there X 
    Now when i shut the X off an do the restart it's back on.
    I don't use WiFi very often (work doesn't allow non work computers to connect, and at home I use my laptop), but I find at work that my phone sometimes doesn't want to connect to the Network when I walk into the building from the parking ramp (very spotty service on the ramp).
    What I do to correct this without restarting, I turn on 'airplane' mode until I see the little airplane in the notification bar, then turn airplane mode off. Within a minute, the network is reconnected and working in 3g just fine.
    Location is also part of the problem. I work on the first floor of the building. They are doing remodeling on my floor right now, so I am now on the top floor and have not had this happen since the move a month ago. Since my floor is below a hill with another building on top of the hill between my normal location and the closest tower, the line of sight is hidden, so I expect small problem with it. It doesn't happen all the time, but I do notice it when I try to run internet radio at work.

  • E-Mail Issues: Retrieved E-Mails deleting off server but only on one of two accounts

    I am the proud owner of a Z10 as of 4 days ago. So far, it's a great device, but I've got one problem. I want the e-mail messages retrieved on my phone to stay on the server, and this is working, but only for one account.
    I setup my two e-mail accounts, Comcast and GMail, both as POP accounts. I did not setup GMail as IMAP. I tested the connections to see that the messages were properly retrieved on the phone, then I logged into each account to see that the messages were staying on the server. It appeared as though they were, but apparently I didn't wait long enough on the GMail account because the messages were being deleted from the server and I didn't notice this for 3 days. Again, my phone is NOT doing this for my Comcast account and I don't know why.
    I have about 10 e-mails now on my phone in my GMail account that I can't seem to get back on the GMail server. I need to do this so I can download the messages to my home server where all my mail is stored.
    I thought maybe I could create a second IMAP GMail account in the hub and copy the messages from one account to the other, but I can't.
    If I continue to let the phone get those messages, they'll continue to be removed from the server.
    If I forward them to myself, then they just show up as having come from me and that's not what I need either.
    If I delete the account entirely, I lose my messages and that's definitely not what I want.
    I thought I could tell the phone to stop logging into the GMail account by updating the password on the device, but it has to authenticate to the server to confirm that the password is correct, and if it isn't, it won't take the password and returns an error.
    So far, the only thing I've been able to do to get the phone to stop retrieving the messages is to change my GMail password and not update it on the phone. That way, the phone can't sign in to GMail at all and get any new mail. However, I still have these 10 messages on my device that I need to export somehow.
    Is there a way to export mail on this device? Is there a way to copy messages from account to account? What directory is the mail stored in and what file format is it stored in? Can I convert the messages to .csv and do it that way? And why did this happen only for my GMail POP account and not Comcast?

    This is a wi-fi network connection problem - not a problem with an email account.
    Do you have cellular reception at home? If so, you should be able to receive email with both email accounts as long as you have an internet connection with the cellular network.
    On your iPhone go to Settings > General > Reset and select Reset Network Settings.
    This will delete all wi-fi network settings from your iPhone for every wi-fi network you have successfully connected your iPhone with.
    After doing so check if your wi-fi network is available again to re-join.

  • QUery retrieving based on previous and after rows.. pls help

      CREATE TABLE "POP"."RP06"
       (     "NUM" NUMBER(7,0),
         "SEQ_LINE" NUMBER(7,0),
         "CHMP" VARCHAR2(4000 BYTE)
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,1,'( ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,2,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,3,'AND ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,4,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,5,'OR ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,6,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,7,'AND /*4*/ ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,8,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,9,'OR ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,10,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,11,'AND ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,12,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,13,'OR ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,14,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,15,'OR ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,16,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,17,'AND ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,18,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,19,') ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,20,'AND /*10*/ ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,21,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,22,'AND /*11*/ ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,23,'ORACLE  IS  GREAT');after inserting the rows i want to retrieve the rows as follows
    1 select the chmp which satisfied the condition if the chmp has previous row is  'AND'* and next row 'OR'* example: chmp with seq_line 4 which has previous 'AND' in seq_line 3 and 'OR' in seq_line 5. so retrieve the 4th seq_line chmp.
    ( CHMP WITH SEQ_LINE 8,12 ARE other EXAMPLES)
    2) select the chmp which satisfied the condition if the chmp has previous row is *'OR' and next row 'AND'*
    example: chmp with seq_line 10 which has previous 'OR' in seq_line 9 and 'AND' in seq_line 11. so retrieve the 10th seq_line chmp.
    ( CHMP WITH SEQ_LINE 6,16 ARE other EXAMPLES)
    Kindly help
    S

    Hi,
    You can use the analytic LAG function to get the value from the last row before a given row, and
    you can use the analytic LEAD function to get the value from the next row after a given row.
    For example:
    WITH     got_neighbors     AS
         SELECT  num, seq_line, chmp
         ,     LAG  (chmp) OVER ( PARTITION BY  num
                           ORDER BY      seq_line
                         )     AS prev_chmp
         ,     LEAD (chmp) OVER ( PARTITION BY  num
                           ORDER BY      seq_line
                         )     AS next_chmp
         FROM     rp06
    --     WHERE     ...     -- Any filtering goes here
    SELECT  num, seq_line, chmp
    FROM     got_neighbors
    WHERE     prev_chmp     LIKE 'AND %'
    AND     next_chmp     LIKE 'OR %'
    ;I assume that your real table can have many values for num, and that when you talk about the "earlier" or "next" row, you mean a row with the same num. If that's not the case, then remove "PARTITION BY num".
    Analytic functions are computed after the WHERE clause is applied, so to use the results of analytic functions in a WHERE clause, compute them first in a sub-query (such as got_neighbors), and then use them in the WHERE clause of a super-query.

  • Retrieving contacts and photos off a dead phone?

    Hello all,
    my partner has a Nokia 2330 (I think that's the model!) and it powers up, but the screen is blank and the phone doesn't seem to do much else. The problem is she has phone numbers and photos stored on the phone and can no longer access them.
    Is there a way of retrieving them, even if the phone is basically dead?
    Many thanks!

    Your bad luck is that the Phone has PC connectivity but ONLY thru' Bluetooth and no USB..hence it will not be possible.. Sorry about that...

  • Fetch max datetime records based on cut off time

    Hi,
    I want to fetch max date timestamp value for each key value but i do have cut off time as 21:00:00, which means anything after this time will be considered as next date 00:00:00 time value. I have attached an example for the same and
    result set which i want. Kindly provide a SQL query for fetching like this.
    Note: I have to use in a SELECT statement and i should not use temp table or cte, because i have to use this piece of code in another program where i cannot use temp tables. :(
    Thanks!
    Input:
    ID is my key value
    Output:
    Regards,
    Fazlu

    Hi,
    It should be partition by ID column and we need to add 3 hours during ORDER BY clause, isn't it? 
    select * from (select * , row_number() Partition by ID Order by Cast(dateadd(hour,3,[Date]) as date) DESC ) rnfrom yourtable) t WHERE rn=1
    I will try the query in office tomorrow and let you know the status.
    Thanks for the reply!!!
    Regards,
    Fazlu

  • Any way to retrieve data (mainly photos) off of a water damaged iPod 4?

    I dropped it in the washing machine (because i'm an idiot) so it's completely fried. I recently backed it up on iTunes, but not iCloud. I have important pictures that I really need. Is there anyway to get them back off of the old iPod and put them onto a new one or the computer?

    Dry the iPod in a sealed container with uncooked rice for a week and periodically change the rice.
    The see if y can import photos.
    - If not then:
    - If they are in an iPod backup then restore another iPod, iPhone or iPad from that backup. See the restore topic of:
    iOS: How to back up
    - If you used PhotoStream then try getting them from your PhotoStream. See that topic of:
    iOS: Importing personal photos and videos from iOS devices to your computer
    - Maybe from the restored iPod via
    How to perform iPad recovery for photos, videos
    Wondershare Dr.Fone for iOS: iPhone Data Recovery - Wondershare Official     
    http://www.amacsoft.com/ipod-data-recovery.html
    iPod recovery software to restore lost music files      

  • How can i retrieve photos through icloud off of a stolen i phone?

    My I phone was stolen. How can i retrieve my photos using i cloud

    Welcome to the Apple Community Lauren.
    Photos in photo stream...
    You can log into your iCloud account on another computer or device and enable photo stream to see your photos. You should do this as soon as possible because photo stream in the cloud only keeps photos for 30 days and each day you delay, you will lose another days photos.
    Photos in the camera roll...
    If you kept a back up of your device you can use it to restore to a replacement device, this will restore all of the photos in your camera roll and isn't time limited.

  • Display 0valstckval based on storage location (Inventory)

    Hi all,
    I need to display 0valstckval in webi report based on storage location. Now this valuated stock value comes from revaluations (2lis_03_um) and can be send at the report level based on plants but not on storage location. I know this is how the standard process is. Is there any way we can report the val stock value based on storage location in report?
    Thanks

    Hi
    You need Append the structure for the UM Datasources and you write the code and can retrieve based on STOR_LOC.
    BTW, are you not using Datasource BF-Material movements for Inventory?

  • To get the value in a field based on lov selection of another field.......

    Hi all,
    I have a requirement where
    i need to select a LOV value
    and based on that value the field next to it should be generated......
    in brief suppose i have a field name EMPLOYEE NO as lov........
    as i select the employee number the field next to it assume EMPLOYEE NAME should be retrieved based on the employee number selected..
    hope i am clear
    waiting for ur responce.....
    DEV......

    Hi,
    Assuming you are having two fields on the page. One LOV for empID (ID: empIDV) and messageTextInput for emp Name (ID: empNameV)
    1) Create a VO for your LOV having a query like SELECT emp_num, emp_name FROM employees;
    2) Create region for LOV using table using wizard based on the VO created above (choose emp_num as messageStyledText and emp_name as formValue). Also make search allowed true for emp_num.
    3) Create a LOV map1:
    LOV region item: empId
    Return item: empIDV
    Criteria item: empIDV
    4) Create lovMap2:
    LOV region item: empName
    Return item: empNameV
    Also try to implement dependent LOVs : http://sushantsharmaa.blogspot.in/2012/12/10-dependent-lov-in-oaf.html
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • To change the Email retrieval logic for MSS in Portal

    Hi All,
    In standard MSS Business Package for employee selection Iview, under column email, manager get an option to send mail to employee by clicking on highlighted send option.
    At present the option "SEND" get highlighted if the email value is maintained in IT0105 and manager is able to send mail to employee on the same email address.
    Now in my scenario instead of getting the email address from IT0105, I need to get the email address maintained in transaction SU01.
    And the problem in doing this is, for highlighting the "SEND" link under employee selection ivew, standard SAP code uses a
    method GET_EMAIL_ADDRESS of class CL_HRWPC_SER_EMAIL in which they use a function module HRWPC_READ_CONTACT to check if the email address exist in IT0105 or not.
    I can overite this check by using a implicit enhancement in method GET_EMAIL_ADDRESS based on email in SU01. But my concern is, if use an implicit
    enhancement, then all the application using this method will retrieve data based on SU01 entry, instead of IT0105.
    This email address retrieval based on SU01 entry is only required for MSS and it is not a common requirement.
    So please suggest me a solution, so that i can get the "SEND" option highlighted only for email address based on SU01 entry only for MSS.
    Also suggest me how to check the which all application are using method GET_EMAIL_ADDRESS.
    As where used list only give me interface where this method is called and interface is called dynamically.
    Thanks
    Namit

    Hi Namit,
    I think your question is more related to in another forum (HCM).
    This is not a portal specific question, but more or less related to function modules and BADIs.
    But maybe someone else can help you on this one. I think there is no list of applications that use GET_EMAIL_ADDRESS. As far as I can remember, the only application that sends emails in ESS/MSS is this teamoverview page.
    Kind regards,
    Noel

  • How do i retrieve purchases?

    how do i retrieve purchases i bought off my iphone that did not back up on my itunes?

    To transfer files from your iPhone to iTunes...
    Connect your iPhone, select it in iTunes then iTunes menu File > Transfer purchases.

  • Extract data off a broken MacBook Pro 15" Retina Display Mid 2012?

    Hi,,,
    I had a problem with my MacBook Pro 15" Retina Display Mid 2012  - display and something ending with logic being broken = black screen. Since is was over £1000 to fix it, i decided to buy a new Macbook pro with Retina Display 16gb ram, 512gb.
    Now, what is the best way to retrieve the data out off the old macbook pro SSD? If I open the computer and take it off, how do i connect it to my new mac? is there a cable to connect to the SSD, as i searched and can't find. Really need to transfer all my files that is inside the old mac to the new one.
    Thank you in advance for the help

    Remove the SSD from the old MBP and put it in an external USB enclosure. Connect to your new MBP and transfer your files. You can find a good enclosure at OWC.

Maybe you are looking for

  • Font in a text area

    I am creating a word processor which allows for font changes. it works to change the font, but it will change previously entered font in addition. i do not want text that has already been entered to be changed by new settings. how can i accomplish th

  • Mac book lion crashes with boot camp !

    I have a macbook pro model: A1278 with LION with BOOTCAMP After some times using windows (bootcamp) mac crashes. Then I verified mac and repaired and then install mac drive 9 , after that I had access through mac with windows to copy files which were

  • Operating system windows 8 SL

    I am unable to recover my windows 8 SL through recovery disc it shows error file "BCD" corrupted or missing.. i know my product key .. how can i download windows 8 OEM SINGLE LANGUAGE ISO.....I HAVE TIRED CORE SINGLE LANGUAGE with Single language pro

  • Invoice amount is wrong compared to the sales order

    On my repair sales order my totals are pulling through correclty to the invoice.  I can go to the condition tab of the invoice and the amount is correct...but when I print the output it is prinitng a different amount....the line items are printing th

  • Download Adobe Acrobat Pro9

    I would need to install the Adobe Acrobat Pro 9 version in my new PC.