How to calculate a string (select '1 + 1' from dual;)

I have this system that gives me data (roughly a gig per hour) in the format:
Time_idle
13h 56m
56m 23s
24h 23m
4h 3m
4m 3s
I have to translate it into date, or desimal hour so I can use it in calculations and SQL.
How can I do this?
I have tried the following:
select RTRIM(REPLACE(REPLACE(REPLACE(REPLACE(time_idle,'h',''),'m','/60'),'s','/3600'),' ','+'),'+') from thedate where prosess = 1;
and I then get:
result:
10+54/60
14+12/60
54/60+1/3600
which is correct, if I could get Oracle to calculate the number sum instead of just providing me with the string value. How do I make Oracle calculate the value of the string?
Or how can I use to_date function to translate the text into a date?
Anyone know?
BB

Unfortunately this soultion breaks down when the time involved exceeds 24 hours. Try it for the given data sample 24h 23m ...
SQL> select (to_number(to_char(to_date('24m 23m', 'HH24"h" MI"m" SS"s"'), 'HH24'))) +
  2   (to_number(to_char(to_date('24m 23m', 'HH24"h" MI"m" SS"s"'), 'MI'))/60) +
  3   (to_number(to_char(to_date('24m 23m', 'HH24"h" MI"m" SS"s"'), 'SS'))/3600) total
  4   from dual
  5  /
select (to_number(to_char(to_date('24m 23m', 'HH24"h" MI"m" SS"s"'), 'HH24'))) +
ERROR at line 1:
ORA-01850: hour must be between 0 and 23
SQL> Cheers, APC

Similar Messages

  • How can we get the selected line number from JTextArea ?

    how can we get the selected line number from JTextArea ? and want to insert line/string given line number into JTextArea??? is it possible ?

    Praitheesh wrote:
    how can we get the selected line number from JTextArea ?
    textArea.getLineOfOffset(textArea.getCaretPosition());
    and want to insert line/string given line number into JTextArea??? is it possible ?
    int lineToInsertAt = 5; // Whatever you want.
    int offs = textArea.getLineStartOffset(lineToInsertAt);
    textArea.insert("Text to insert", offs);

  • How to calculate a number of calendar days from a start date (e.g. 60 days from 3/10/2012)

    How to calculate a number of calendar days from a start date (e.g. 60 days from 3/10/2012)

    DT,
    If the starting date is in Column A, and you want to calculate what the date would be 60 days later, in Column B, write in Column B:
    =A+60
    Couldn't be much easier.
    Jerry

  • How to make users to select the date from calendar control my making the date field read only in date time control in external list in sharepoint 2010

    How to make users to select the date from calendar control only, by my making the date text field read only (don't want to let users type the date) in date time control in external list in sharepoint 2010. I am looking for a solution which can
    be done through sharepoint desginer / out of the box.
    thanks.

    Congratulate you got the solution by yourself. I am new to a
    WinForms calendar component, I feel so helpless on many problems even I'd read many tutorials. This question on the
    calendar date selection did me a great favor. Cheers.

  • Why sql select 'Hello'||'world012345678' from dual; cause error?

    I have problem and your help to solve it would be very much appreciated.
    Can anybody tell why the result is so different for the following two sql-sentence in SQL/PLus?
    sql>select 'Hello'||'world012345678' from dual;
    sql>select 'Hello'||'world0123456789' from dual;
    sql>select 'Hello'||'world012345678' from dual;
    Result:
    select 'Hello'||'world012345678' from dual
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [17182], [158346180], [], [], [],
    sql>select 'Hello'||'world0123456789' from dual;
    Helloworld0123456789
    I found that if the length of one string equals 14, then the sql will failed as the first sentence.

    If you need to check the validity of DUAL then you have:
    Select count(1) from DUAL ;
    NOT
    Select * from DUAL;
    If you find more than 1, then
    delete from dual;
    insert into dual values ('x') ;
    commit;
    Then, try you offending query.

  • Interesting though esoteric problem of the form 'select a * b from dual'

    Hi,
    Warning: The question is of very little practical significance.
    (There, I warned you!!)
    Database version: 10.2.0.4.0
    If I try to execute the following
    select 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 * 999999999999999999999999999999999999999999
    from dualI get a 'ORA-01426: numeric overflow' error, which is fine.
    But if I try to execute the following(note the decimal point)
    select 3.14285712285715111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 * 7
      from dualI get a 'ORA-00923: FROM keyword not found where expected' error.
    Interestingly, if I remove any one digit from the first number(hence reducing its length by 1), the query works fine. Removing the spaces on either side of '*' still results in a 'ORA-00923: FROM keyword not found where expected' error though.
    Can anyone explain why?
    Regards,
    Sujoy

    Hi, Sujoy,
    There seems to be a limit of 255 characters (including decimal point) in a number literal. It doesn't seem to matter how m,any digits are before the decimal point and how many are after it. If you don't raise siome other error (such as "'ORA-01426: numeric overflow' error") first, then using a liteal with more than 255 characters will raise "'ORA-00923: FROM keyword not found where expected".
    Multiplying by 7 in your example doesn't matter; the compiler never gets that far, because the error occurs in the compilation.
    A sign doesn't matter, either, because signs are not part of the literal; they are operators applied to the value after the literal is evaluated. This is also evident because you can put withespace between the sign and the literal.

  • Select multiple rows from dual table

    Is it possible to select multiple rows from dual table using a single select statement.
    i.e., i want the out put to be
    column_name
    1
    2
    3
    4
    Edited by: vidya.ramachandra on Dec 14, 2009 8:24 AM

    Aside from the fact you're responding to an old thread...
    1002424 wrote:
    While using CONNECT BY, I see it always leave behind one row.
    Suppose I have a condition based on which I have to generate constant rows like
    SELECT 1 FROM DUAL WHERE ROWNUM < N;
    Here if N = 0, still it gives out single row.... you are obviously doing something wrong in your code elsewhere, because that SQL statement does not always return a single row...
    SQL> SELECT 1 FROM DUAL WHERE ROWNUM < 0;
    no rows selected
    SQL>

  • Function in Select...from dual

    Hi
    One generate question.
    We can do the following task in the Select Statements:-
    1. Select Function_Name('Parameter) from dual;
    2. Select Package_Name.Function_Name('Parameter') from dual;
    Why dont we can call the procedure from the Select Statements:-
    Select Procedure_Name('Parameter') from dual;
    Can we we call the Procedure in side the procedure statements ???
    Thanks
    Sandeep

    Procedure or function, it's not an Oracle question. In all prog language, it's same.
    Where a function return one value into a variable (or query here) :
    declare
    var_in1 varchar2(10);
    var_in2 varchar2(10);
    var_out varchar2(10);
    var_out:=myfunction(var_in1,var_in2);
    print var_out;
    --or
    print myfunction(var_in1,var_in2);a procedure have some output variable (may be more than one) :
    declare
    var_in1 varchar2(10);
    var_in2 varchar2(10);
    var_out1 varchar2(10);
    var_out2 varchar2(10);
    Myprocedure(var_in1,var_in2,var_out1,var_out2);
    print var_out1;
    print var_out2;Nicolas.

  • Please Help me with long time oracle  select sequence.nextval from dual

    Hi
    I'm in a real problem.In fact i have a J2EE5(JPA,Hibernate 3,EJB 3.0) project deployed at websphere 6 application server and i'm using Oracle 10 g R2.
    Well i have a batch job that inserts into some table called AVERAGEBALANCE.
    the problem is that when i have activated hibernate log i discoverd that the select from dual is the longest sql (it takes some times over second !!)
    here is the log
    11/07/2011 08:49:40,406 DEBUG SQL:DefaultQuartzScheduler-SimpleThreadPoolWorker-2 - insert into AVERAGEBALANCE (CDATE_, CUSER_, AVERAGEBALANCE_, AVERAGECREDITORBALANCE_, AVERAGEDEBITORBALANCE_, BEGINDATE_, CALCULATIONDATE_, CASHSUBACCOUNTCODE_, CASHSUBACCOUNTPK_, CODE_, ENDDATE_, NBCREDITORDAYS_, NBDEBITORDAYS_, TEDABCALCULATIONPERIODICITYPK_, VERSIONNUM_, PK_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    11/07/2011 08:49:40,468 DEBUG SQL:DefaultQuartzScheduler-SimpleThreadPoolWorker-2 - select this_.PK_ as PK1_465_0_, this_.CDATE_ as CDATE2_465_0_, this_.CUSER_ as CUSER3_465_0_, this_.UUSER_ as UUSER4_465_0_, this_.BALANCE_ as BALANCE5_465_0_, this_.BALANCETYPE_ as BALANCET6_465_0_, this_.CASHSUBACCOUNTPK_ as CASHSUBA8_465_0_, this_.CASHSUBACCOUNTCODE_ as CASHSUBA7_465_0_, this_.CODE_ as CODE9_465_0_, this_.CURRENCYPK_ as CURRENCYPK11_465_0_, this_.CURRENCYCODE_ as CURRENC10_465_0_, this_.ENDDATE_ as ENDDATE12_465_0_, this_.EXCHANGERATE_ as EXCHANG13_465_0_, this_.ORIGINBALANCEPK_ as ORIGINB15_465_0_, this_.ORIGINBALANCECODE_ as ORIGINB14_465_0_, this_.POSITIONDATE_ as POSITIO16_465_0_, this_.REVALUATIONDATE_ as REVALUA17_465_0_, this_.SUMOFCREDITS_ as SUMOFCR18_465_0_, this_.SUMOFDEBITS_ as SUMOFDE19_465_0_, this_.UDATE_ as UDATE20_465_0_, this_.VERSIONNUM_ as VERSIONNUM21_465_0_ from CASHAB this_ where this_.CASHSUBACCOUNTCODE_=? and this_.BALANCETYPE_=? and this_.POSITIONDATE_<? and this_.ENDDATE_>=? and this_.BALANCE_<>?
    11/07/2011 08:49:40,468 DEBUG SQL:DefaultQuartzScheduler-SimpleThreadPoolWorker-2 - select AVERAGEBALANCE_.nextval from dual
    11/07/2011 08:49:41,484 DEBUG SQL:DefaultQuartzScheduler-SimpleThreadPoolWorker-2 - insert into AVERAGEBALANCE (CDATE_, CUSER_, AVERAGEBALANCE_, AVERAGECREDITORBALANCE_, AVERAGEDEBITORBALANCE_, BEGINDATE_, CALCULATIONDATE_, CASHSUBACCOUNTCODE_, CASHSUBACCOUNTPK_, CODE_, ENDDATE_, NBCREDITORDAYS_, NBDEBITORDAYS_, TEDABCALCULATIONPERIODICITYPK_, VERSIONNUM_, PK_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)well i have increased the sequence cache in fact here is the creation code of the sequence.
    CREATE SEQUENCE  "COMPTAPERF5"."AVERAGEBALANCE_"  MINVALUE 1 MAXVALUE 999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 400 NOORDER  NOCYCLE   ;i think that there is some oracle parameter to tune
    Thanks in advance
    Edited by: B.Mansour Nizar on 11 juil. 2011 01:04
    Edited by: B.Mansour Nizar on 11 juil. 2011 06:33
    Edited by: B.Mansour Nizar on 11 juil. 2011 06:34
    Edited by: B.Mansour Nizar on 11 juil. 2011 06:34
    Edited by: B.Mansour Nizar on 11 juil. 2011 06:35
    Edited by: B.Mansour Nizar on 11 juil. 2011 06:35
    Edited by: B.Mansour Nizar on 11 juil. 2011 06:36
    Edited by: B.Mansour Nizar on 15 juil. 2011 07:42

    I found it.
    It's not due to oracle but it's a hibernate issue.In fact if setting FlushMode to Manual.It wil flush the in memory entities after that it will fire the insert statement.
    Here's the log.
    15/07/2011 15:32:47,984 DEBUG SQL:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - select CASHAB_.nextval from dual
    15/07/2011 15:32:47,984 TRACE AbstractBatcher:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - preparing statement
    15/07/2011 15:32:47,984 DEBUG SequenceGenerator:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - Sequence identifier generated: 20441
    15/07/2011 15:32:47,984 DEBUG AbstractBatcher:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
    15/07/2011 15:32:47,984 TRACE AbstractBatcher:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - closing statement
    15/07/2011 15:32:47,984 DEBUG ConnectionManager:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - aggressively releasing JDBC connection
    15/07/2011 15:32:47,984 DEBUG ConnectionManager:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
    15/07/2011 15:32:47,984 DEBUG AbstractSaveEventListener:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - generated identifier: 20441, using strategy: org.hibernate.id.SequenceHiLoGenerator
    15/07/2011 15:32:47,984 TRACE AbstractSaveEventListener:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - saving [com.bfi.cpt.bal.cas.CashAccountingBalance#20441]
    15/07/2011 15:32:47,984 TRACE Versioning:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - using initial version: 0
    15/07/2011 15:32:47,984 TRACE AbstractFlushingEventListener:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - flushing session
    15/07/2011 15:32:47,984 DEBUG AbstractFlushingEventListener:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - processing flush-time cascades
    15/07/2011 15:32:47,984 TRACE Cascade:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - processing cascade ACTION_PERSIST_ON_FLUSH for: com.bfi.cpt.cht.cas.CashSubAccount
    15/07/2011 15:32:47,984 TRACE Cascade:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - done processing cascade ACTION_PERSIST_ON_FLUSH for: com.bfi.cpt.cht.cas.CashSubAccount
    15/07/2011 15:32:47,984 TRACE Cascade:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - processing cascade ACTION_PERSIST_ON_FLUSH for: com.bfi.ref.cur.Currency
    15/07/2011 15:32:47,984 TRACE Cascade:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - done processing cascade ACTION_PERSIST_ON_FLUSH for: com.bfi.ref.cur.Currency
    15/07/2011 15:32:47,984 TRACE Cascade:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - processing cascade ACTION_PERSIST_ON_FLUSH for: com.bfi.cpt.bal.cas.CashAccountingBalance
    15/07/2011 15:32:47,984 TRACE Cascade:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - done processing cascade ACTION_PERSIST_ON_FLUSH for: com.bfi.cpt.bal.cas.CashAccountingBalance
    15/07/2011 15:32:47,984 DEBUG AbstractFlushingEventListener:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - dirty checking collections
    15/07/2011 15:32:47,984 TRACE AbstractFlushingEventListener:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - Flushing entities and processing referenced collections
    15/07/2011 15:32:47,984 TRACE AbstractFlushingEventListener:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - Processing unreferenced collections
    15/07/2011 15:32:47,984 TRACE AbstractFlushingEventListener:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - Scheduling collection removes/(re)creates/updates
    15/07/2011 15:32:47,984 DEBUG AbstractFlushingEventListener:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - Flushed: 1 insertions, 0 updates, 0 deletions to 3 objects
    15/07/2011 15:32:47,984 DEBUG AbstractFlushingEventListener:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
    15/07/2011 15:32:47,984 DEBUG Printer:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - listing entities:
    15/07/2011 15:32:47,984 DEBUG Printer:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - com.bfi.ref.cur.Currency{translatedName=null, certain=false, iso3166=788, quotity=1, identifier=TND, creationUser=admin, internalCode=null, name=Dinars Tunisien, creationDate=2011-07-11 14:43:06, code=TND, versionNum=0, decimal=3, updateUser=null, updateDate=null, pk=136, decimalName=millimes}
    15/07/2011 15:32:47,984 DEBUG Printer:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - com.bfi.cpt.bal.cas.CashAccountingBalance{cashSubAccount=com.bfi.cpt.cht.cas.CashSubAccount#400201, originBalanceCode=null, exchangeRate=null, sumOfDebits=0.0, endDate=31 décembre 9999, creationUser=bna, currencyPk=136, creationDate=2011-07-15 15:32:47, cashSubAccountCode=BNA/PCI_BNA/82-TND, code=2010-07-30/BNA/PCI_BNA/82-TND/AccountingDateBalance/TND, versionNum=0, originBalancePk=null, currency=com.bfi.ref.cur.Currency#136, updateUser=null, originBalance=null, balanceType=AccountingDateBalance, updateDate=null, positionDate=30 juillet 2010, sumOfCredits=10.0, pk=20441, cashSubAccountPk=400201, revaluationDate=null, balance=-10.0, currencyCode=TND}
    15/07/2011 15:32:47,984 DEBUG Printer:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - com.bfi.cpt.cht.cas.CashSubAccount{name2=null, accountPk=81, name=null, versionNum=0, currency=com.bfi.ref.cur.Currency#136, updateDate=null, chartByEntity=com.bfi.cpt.cht.std.ChartByEntity#2, refAccount=null, currencyCode=TND, chartByEntityCode=BNA/PCI_BNA, refAccountCode=null, creationDate=2011-07-15 15:25:45, account=com.bfi.cpt.cht.cas.StandardAccount#81, freeKey10=null, freeKey11=null, chartByEntityPk=2, freeKey12=null, updateUser=null, refAccountPk=null, freeKey13=null, freeKey14=null, freeKey15=null, freeKey16=null, freeKey17=null, accountCode=PCI_BNA/81, freeKey18=null, freeKey19=null, freeKey0=null, freeKey1=null, freeKey2=null, freeKey3=null, freeKey4=null, freeKey5=null, freeKey6=null, freeKey7=null, freeKey8=null, freeKey9=null, number=82-TND, creationUser=bna, freeKey20=null, freeKey21=null, freeKey22=null, freeKey23=null, freeKey24=null, freeKey25=null, freeKey26=null, freeKey27=null, freeKey28=null, freeKey29=null, currencyPk=136, code=BNA/PCI_BNA/82-TND, freeKey30=null, freeKey31=null, freeKey32=null, pk=400201}
    15/07/2011 15:32:47,984 TRACE AbstractFlushingEventListener:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - executing flush
    15/07/2011 15:32:47,984 TRACE ConnectionManager:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - registering flush begin
    15/07/2011 15:32:47,984 DEBUG UpdateTimestampsCache:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - Pre-invalidating space [CASHAB]
    15/07/2011 15:32:47,984 TRACE AbstractEntityPersister:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - Inserting entity: [com.bfi.cpt.bal.cas.CashAccountingBalance#20441]
    15/07/2011 15:32:47,984 TRACE AbstractEntityPersister:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - Version: 0
    15/07/2011 15:32:47,984 DEBUG AbstractBatcher:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
    15/07/2011 15:32:47,984 DEBUG ConnectionManager:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - opening JDBC connection
    15/07/2011 15:32:47,984 DEBUG SQL:DefaultQuartzScheduler-SimpleThreadPoolWorker-4 - insert into CASHAB (CDATE_, CUSER_, BALANCE_, BALANCETYPE_, CASHSUBACCOUNTCODE_, CASHSUBACCOUNTPK_, CODE_, CURRENCYCODE_, CURRENCYPK_, ENDDATE_, POSITIONDATE_, SUMOFCREDITS_, SUMOFDEBITS_, VERSIONNUM_, PK_) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)Edited by: B.Mansour Nizar on 15 juil. 2011 07:38
    Edited by: B.Mansour Nizar on 15 juil. 2011 07:39
    Edited by: B.Mansour Nizar on 15 juil. 2011 07:43

  • How to calculate a value, based on value from popup menu?

    I'm creating an estimate worksheet. In one cell, I have a popup menu containing service codes such as "DIS", "SP", "AD" and so on. Based on the selected service code from the popup menu, I would like for the next cell to display the correct rate for that service. For example, if "DIS" was selected, I would like the Rate to apeear as $110. If "AD" was selected, I would like the Rate to show up as $150.
    Thanks in advance,
    Tony

    You can create another reference table with your service code and cost. Then in the main table use the VLOOKUP formula to refer to the reference table and return the costs.
    Example:
    Table 2 (Reference Table)
    _ A ______B
    1 Code ___Cost
    2 DIS _____$ 100
    3 SP _____$ 125
    4 AD _____$ 150
    Main Table
    _A ________ B
    1 DIS _______=VLOOKUP(A1,Table 2 :: $A$1:$B$3,2,FALSE)
    etc,
    etc,
    Regards,

  • How to obtain the string selected by mouse in a TextField

    Hi!
    We have a JtextField with a string. We want the user to select with the mouse a part of this string and we want to get it,when he press a button. We think we should use the function getCare but we don't really know how it works.
    Thank you very much!

    JTextField extends JTextComponent which has methods for getting the selected text. The
    comments section of the class api has a link into the tutorial where you can find more
    discussion and examples.

  • How to calculate the last selected item in a tree node where we can customize the list to the node.

    Hi,
    I'm new to the Flex field. I got a task where i have a tree (TREE is the id) with X and Y as nodes. In X i have got a list of pages(dataprovider is array collection) added dynamically(means User can configure the pages).On selecting last item(last page) in the list of X node, the  view will be presented with a component say Xlast on the right side which is in view stack. In that component , there is button called NEXT which has to be greyed out for the last page. I tried by calling the below code on viewChange event
    if(viewstack.selectedchild == XlastpageId)
    Nextbtn.enabled = false;
    but this will work only when we know XlastpageId is the lastpage for the tree. but how to implement this when we dont know which is the last page of the X node in a Tree.
    I also tried by calculating the children of the tree on tree click event which is
    if (Tree.selectedItem == TREE.numChildren - 1)
    Nextbtn.enabled = false;
    i know this is wrong because we have 2 children for the tree( X and Y) so it is showing 2-1 and the button is greyed out for the first click.
    Please help me out.
    Thanks in Advance,
    Sw

    Hi,
    According to your post, my understanding is that you want to monitor the last login user’s details.
    There is no out of the box way to achieve it in SharePoint.
    We can use cookie to be a flag for checking whether there is an user just log in. After the page loaded, if the cookie is null, it suggests that there is an user just log in our site, then we
    can get this user’s information using JavaScript Object Model and add the information into a custom list. With this list, we can monitor user’s login details.
    Refer to the following link:
    https://social.technet.microsoft.com/Forums/en-US/0cd4d531-cb61-4d90-aa70-413267f4a735/how-to-know-login-and-logout-details-of-a-user-in-sharepoint-online-2013?forum=sharepointdevelopment
    Besides, here are two similar posts for your reference:
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/1a35283e-0f2a-49b8-b330-801a3cfcd890/programatically-get-all-current-logged-in-users-list-for-a-sharepoint-site?forum=sharepointdevelopmentprevious
    https://social.technet.microsoft.com/Forums/en-US/10953be3-cb1c-40c7-9454-545c8338b551/how-to-know-login-users-count-and-their-details-in-sharepoint-2010-web-application?forum=sharepointgeneralprevious
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

  • How to remove spaces at selection screen coming from logical database

    Hi Experties,
    When we hide some selection from the logical database.  The spaces still occupied and this make our selection screen looks awkward.
    How to remove the spaces left by hidden selection ?
    Regards
    Nislina

    Hi,
    I came across your un-answered question while searching for a solution on the similer problem. Though I couldn't fine a solution on SDN, but figured out one myself. Thought its a good idea to share it.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-group4 = '003'.
          screen-active = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    Here screen-group4 contains the sequence number of the select-options field starting from 000 onwards.
    You may like to assign points and close the question.
    Kind Regards,
    Khalid Mustafa

  • How do I update iTunes' selection of books from iBooks?

    I use iBooks v. 1.1 on a MacBook Air (13-inch, Mid 2012) running 10.10.1 with iTunes 12.0.1.26. I use iTunes with both an iPhone 5 and an iPad, both of which use up-to-date (Jan 15, 2015) iOS and iBooks apps.
    I have a lot of books and PDFs in iBooks on the MacBook; they show up there. In iTunes, however, I only see a limited selection, which I think might be a selection I loaded onto my iPhone or iPad maybe a year ago. I've tried relaunching both apps, rebooting the computer, using the "Move from iTunes..." command in iBooks (on the MacBook, to no avail. I still see only a limited selection.
    This *****. I can't get most of my PDFs and books to my iPad or iPhone, which is where I do my reading. I'm ready to switch to some other platform - maybe a paper-based one again. I like reading!

    You can also see a list of all your iBooks purchases directly in the iBooks application itself without having to launch iTunes on your computer. In iBooks, go to your library (the bookshelf) and then click the "Store" button at the top right.  Next, click the "Purchases" tab at the bottom right.

  • How to calculate a boolean based on data from a table fed by a BI Query

    Hi Gurus,
    I am currently struggling with the following issue:
    - I have a query in my VC model wich returns 4 ratios
    - I put the result of the query in a table in the VC model
    - then, I added a column in the table. this column is a boolean which should be true if the value of one of my 4 ratios is not 0, otherwise, it is false
    - I want that boolean to be "updatable" by the users.
    I tried to define the default value of the boolean based on the value from the signficant ratio... no luck
    I tried to change the value from the configuration tab of the column, but then I can not update afterwards....
    Has anyone ever seen that issue and found a solution ?
    Thansk for your help
    PY

    Hi Deep!
    Thanks for your feedback! I felt a bit alone in my world before you answered
    Your idea is great and it would work if I hadn't to display the data with a hierarchy.
    Actually, the only thing I did not mention is that we are posting data against fiscal period, and we are budgeting for the next 10 years (no comment on that, and the precision we could reach ). So, to display the information we are using a cusomized hierarchy on 0FISCPER using 0FISCYEAR.
    So when I used your option, the hierarchy has been deactivated on the table. But to be sure I correctly implemented your proposition, here are the steps we used :
    1) connect the query output port "data" to the share
    2) add the boolean in the share
    3) map the boolean with the rule based on the data coming from the query
    4) connect the share to the table.
    Note that we the current version we use of VC I am not able to edit the field mapping between the share and the table...
    Did I miss something ?
    If yes, could you drive me to the correct procedure ?
    If no, would you have any idea ? I already tried to change the default value of the field in the "define Data" maintenance popup of the table. I also tried to assign a value to the boolean based on the Action option of the column used in my condition...
    Thanks for your help
    PY

Maybe you are looking for

  • TCP/IP manual setup issues

    I have a 5 static IP address package from PacBell. Off the DSL modem, I have a router, feeding three computers and an old Airport BaseStation (the slowest version). Becuase my Airport is the slow. I have an ethernet cable to the appleTV and I've atte

  • I deleted my mail to the trash - how do I get it back?

    I had 2 mail icons on my desk and I moved one to the trash. No both are gone and I can't get my mail. How can I get this back - thank you.

  • Integration Repository objects for EDI adapters

    Hi, We are currently evaluating EDI integration options, and I need some information. Does anybody know where I can find a list of Integration Repository (or any other) objects such as mappings, mapping templates, msg types, etc that are provided wit

  • Allocating Virtual Machines in Hyper-V

    Does anyone have a good reference for the rules and recommendations for allocating VM's.  In other words how to determine the number of VM's I'll need relative to the roles that the VM's will play.  Also determining how VM's per physical server?  Tha

  • Plese help

    There is an online game that runs a java applet or something. However I can't run applets on my comp for some reason. Can some one help me???