Help with filling a if statement

hello everyone i hope someone can help me
if you look at my code below the arraylist contains the number 8. but i want to know how i can use that number 8 inside the if statement (if (i%10 == 1)) where the number 1 is, so that number 1 will change to the number 8.
could someone please help me.
thanks for your time
loftty
hash.put(new Integer(8), st1);
if(hash.containsValue(st1)) {
                         Enumeration e = hash.keys();
                              while (e.hasMoreElements()) {
Object it = e.nextElemenet();
Object it1 = hash.get(it);
if (it1.equals(st1){
arraylist.add(it);
Enumeration e = v.elements();
                    Object o;
                    for(int i = 1;e.hasMoreElements();i++) {
                    o = e.nextElement();
                         if (i%10 == 1){
                    System.out.println(o);

By ArrayList do you mean the hashtable in your code?
Because a hastable is not the same as an arraylist....
For one thing your hashtable is wrong...
The first parameter you pass in a put method is a key, the second is an object...
When you want to get the object from the hashtable you pass it the key.... like so:
hash.put("Str1", new Double(8));
Double l_Double = (Double)hash.get("Str1");With an ArrayList you don't use keys by the way...
Vermelh0

Similar Messages

  • Help with a "AT NEW" statement

    I am debugging at some code and I am trying to understand the following statement
    <i>LOOP AT it_data_item_final INTO st_data_item_final.
    MOVE st_data_item_final-waers TO w_waers.
    <b>AT NEW xblnr."xblnr." budat xblnr waers.</b>
          MOVE-CORRESPONDING st_data_item_final TO s_bbkpf.
          s_bbkpf-waers = w_waers.
          t_upload_file = s_bbkpf.
          APPEND t_upload_file.
    ENDAT.</i>
    I know this code is to only execute when there is a change in the fields but I am not sure how to read the statement. I am assuming there if there is a change in the budat xblnr waers fields of the st_data_item_final table, this code will execute. I am not sure what the xblnr."xblnr." code is trying to do.
    thanks for the help in advance

    hi,
    LOOP AT it_data_item_final INTO st_data_item_final.
    v_tabix = sy-tabix.
    MOVE st_data_item_final-waers TO w_waers.
    AT NEW xblnr.
      read table it_data_item_final into st_data_item_final index v_tabix.
      MOVE-CORRESPONDING st_data_item_final TO s_bbkpf.
      s_bbkpf-waers = w_waers.
      t_upload_file = s_bbkpf.
      APPEND t_upload_file.
    ENDAT.
    endloop.
    After the at new XBLNR, the structure gets empty and only contains the fields that are left to the field (in the internal table) at which we are performing at end/at new.
    XBLNR F1 F2
    1     2   4 <-
    1     3   6
    2     2   4 <-
    3     3   3 <-
    then it gets triggered at these three positions. To fill the structure again with the values we need to read the table again with sy-tabix.
    Hope this helps.
    Regards,
    Richa

  • Help with Autodiscover.Proxy Unhealthy state.

    Hello, I am trying to diagnose unhealthy systems in Exchange 2013.  Here is my command and output.  Lets start with the first one, Autodiscover.Proxy.
    [PS] C:\Windows\system32>Get-HealthReport -Server email| where {$_.alertvalue -ne "Healthy" }
    Server State HealthSet AlertValue LastTransitionTime MonitorCount
    email Offline Autodiscover.Proxy Unhealthy 11/19/2014 10:52... 1
    email Online HubTransport Unhealthy 11/24/2014 6:38:... 96
    email Online FrontendTransport Unhealthy 9/25/2014 9:28:3... 12
    email NotApplicable MSExchangeCertif... Disabled 1/1/0001 12:00:0... 2
    I go to follow this article here: http://technet.microsoft.com/en-us/library/ms.exch.scom.autodiscover.proxy%28v=exchg.150%29.aspx
    But the issue is that Invoke-MonitoringProbe does not return anything of value to me.  Can you help me analyze this output?
    [PS] C:\Windows\system32>Invoke-MonitoringProbe Autodiscover.Proxy\AutoDiscoverProxyTestProbe -Server email | Format-Lis
    t
    RunspaceId : bfa8f7cf-cc0b-4395-b3c8-75ab16fc227c
    Server : email
    MonitorIdentity : Autodiscover.Proxy\AutoDiscoverProxyTestProbe
    RequestId : d677ac2a-43fa-4147-b806-b2f433c5a6e3
    ExecutionStartTime : 11/25/2014 3:23:33 PM
    ExecutionEndTime : 11/25/2014 3:23:33 PM
    Error : Unknown app pool name:
    Exception : System.InvalidOperationException: Unknown app pool name:
    at Microsoft.Exchange.Monitoring.ActiveMonitoring.ClientAccess.CafeLocalProbe.DoWork(Cancellati
    onToken cancellationToken)
    at Microsoft.Office.Datacenter.WorkerTaskFramework.WorkItem.Execute(CancellationToken
    joinedToken)
    at
    Microsoft.Office.Datacenter.WorkerTaskFramework.WorkItem.<>c__DisplayClass2.<StartExecuting>b__0()
    at System.Threading.Tasks.Task.Execute()
    PoisonedCount : 0
    ExecutionId : 60170839
    SampleValue : 0
    ExecutionContext : Probe Absolute Timeout=60000ms, Timeout Value=60000ms, Calculated HttpRequest Timeout=59000ms
    FailureContext :
    ExtensionXml :
    ResultType : Failed
    RetryCount : 0
    ResultName : d677ac2a43fa4147b806b2f433c5a6e3-AutoDiscoverProxyTestProbe
    IsNotified : False
    ResultId : 27004887
    ServiceName : InvokeNow
    StateAttribute1 :
    StateAttribute2 :
    StateAttribute3 :
    StateAttribute4 :
    StateAttribute5 :
    StateAttribute6 : 0
    StateAttribute7 : 0
    StateAttribute8 : 0
    StateAttribute9 : 0
    StateAttribute10 : 0
    StateAttribute11 :
    StateAttribute12 :
    StateAttribute13 :
    StateAttribute14 :
    StateAttribute15 :
    StateAttribute16 : 0
    StateAttribute17 : 0
    StateAttribute18 : 0
    StateAttribute19 : 0
    StateAttribute20 : 0
    StateAttribute21 :
    StateAttribute22 :
    StateAttribute23 :
    StateAttribute24 :
    StateAttribute25 :
    Identity : 956989c13cc44e6faf102491a8d7a11b
    IsValid : True
    ObjectState : New
    I'm not seeing any issue right now with Autodiscover but I don't want a larger issue to show up in the near future.

    Ok, I guess we can do that.  A new health set came up today Unhealthy.  Its Compliance and in a NotApplicable state.  I will try to determine the impact of this and start a different thread on that if I can't figure that one out.
    Otherwise I don't see any problem with mail.
    More info, not sure if I posted this, but if this helps, the Event Viewer states this:
    Log Name: Microsoft-Exchange-ManagedAvailability/Monitoring Source: Microsoft-Exchange-ManagedAvailability Date: 12/23/2014 7:03:08 AM Event ID: 4 Task Category: Monitoring Level: Error Keywords: User: SYSTEM Computer: email.domain.com Description: The Autodiscover.Proxy
    health set has detected a problem on EMAIL beginning at 12/22/2014 3:01:12 PM (UTC). The health manager is reporting that recycling the MSExchangeAutodiscoverAppPool app pool has failed to restore health and it has requested the protocol be marked offline.
    Attempts to auto-recover from this condition have failed and administrator attention is required.
    Details below: MachineName: EMAIL
    ServiceName: Autodiscover.Proxy
    ResultName: AutodiscoverProxyTestProbe/MSExchangeAutodiscoverAppPool
    Error: The remote server returned an error: (500) Internal Server Error.
    Exception: System.ApplicationException: The remote server returned an error: (500) Internal Server Error. at Microsoft.Exchange.Monitoring.ActiveMonitoring.ClientAccess.CafeLocalProbe.DoWork(CancellationToken cancellationToken) at Microsoft.Office.Datacenter.WorkerTaskFramework.WorkItem.Execute(CancellationToken
    joinedToken) at Microsoft.Office.Datacenter.WorkerTaskFramework.WorkItem.<>c__DisplayClass2.<startexecuting>b__0() at System.Threading.Tasks.Task.Execute() </startexecuting>
    <startexecuting>ExecutionContext: Probe Absolute Timeout=60000ms, Timeout Value=60000ms, Calculated HttpRequest Timeout=59000ms FailedResponse after 0 milliseconds. The remote server returned an error: (500) Internal Server Error.
    [000.000] Probe Absolute Timeout=60000ms, Timeout Value=60000ms, Calculated HttpRequest Timeout=59000ms [000.000] Starting HTTP request task [000.000] Waiting 59000 ms [000.000] Issuing GET against https://autodiscover.domain.com/AutoDiscover/ [000.000] Awaiting
    GET response [000.000] Performing SSL validation [000.000] Failed with exception: The remote server returned an error: (500) Internal Server Error. </startexecuting>
    <startexecuting>FailureContext:</startexecuting>
    <startexecuting></startexecuting>ResultType: Failed
    IsNotified: False
    DeploymentId: 0
    RetryCount: 0
    ExtensionXml:
    StateAttribute1: No response headers available.
    StateAttribute2: [email protected] cfj>M!T@O-;XNkj+=u8[SL#f8Oby*S:(&Bg@GTal_=R@3YXtGi=%Vj832L_AE|l>Jhy18K/an^cNHv7i*3-8d*9?#FQa8u!IUoAai-mr(&PG|ZALs2&?6hI2N]9NKK][
    StateAttribute3:
    StateAttribute4:
    StateAttribute5:
    StateAttribute6: 0
    StateAttribute7: 0
    StateAttribute8: 0
    StateAttribute9: 0
    StateAttribute10: 0
    StateAttribute11:
    StateAttribute12:
    StateAttribute13:
    StateAttribute14:
    StateAttribute14:
    StateAttribute16: 0
    StateAttribute17: 0
    StateAttribute18: 0
    StateAttribute19: 0
    StateAttribute20: 0
    StateAttribute21:
    StateAttribute22:
    StateAttribute23:
    StateAttribute24:
    StateAttribute25:
    PoisonedCount: 0
    Client Access Array: Client Access Array name could not be retrieved.
    ExecutionId: 30334093
    ExecutionStartTime: 12/23/2014 12:03:08 PM
    ExecutionEndTime: 12/23/2014 12:03:08 PM
    ResultId: 32263287
    SampleValue: 0 Event Xml:
    <event style="font-size:0.75em;line-height:1.5;" xmlns="http://schemas.microsoft.com/win/2004/08/events/event"><system><provider guid="{C424A887-A89F-455F-8319-960917152221}" name="Microsoft-Exchange-ManagedAvailability"><eventid>4</eventid>
    <version>0</version> <level>2</level> <task>2</task> <opcode>0</opcode> <keywords>0x8000000000000000</keywords> <timecreated systemtime="2014-12-23T12:03:08.889029200Z"><eventrecordid>7753</eventrecordid>
    <correlation activityid="{ED377619-21A3-44A7-9444-751CDE95B0A1}"><execution processid="4204" threadid="14216"><channel>Microsoft-Exchange-ManagedAvailability/Monitoring</channel> <computer>email.domain.com</computer>
    <security userid="S-1-5-18"></security></execution></correlation></timecreated></provider></system> <userdata><eventxml xmlns="myNs" xmlns:auto-ns2="http://schemas.microsoft.com/win/2004/08/events"><healthset>Autodiscover.Proxy</healthset>
    <subject>Exchange Server Alert: The Autodiscover.Proxy health set is unhealthy.</subject> <message>The Autodiscover.Proxy health set has detected a problem on EMAIL beginning at 12/22/2014 3:01:12 PM (UTC). The health manager is reporting
    that recycling the MSExchangeAutodiscoverAppPool app pool has failed to restore health and it has requested the protocol be marked offline. Attempts to auto-recover from this condition have failed and administrator attention is required. Details below: <b>MachineName:</b>
    EMAIL <b>ServiceName:</b> Autodiscover.Proxy <b>ResultName:</b> AutodiscoverProxyTestProbe/MSExchangeAutodiscoverAppPool <b>Error:</b> The remote server returned an error: (500) Internal Server Error. <b>Exception:</b>
    System.ApplicationException: The remote server returned an error: (500) Internal Server Error. at Microsoft.Exchange.Monitoring.ActiveMonitoring.ClientAccess.CafeLocalProbe.DoWork(CancellationToken cancellationToken) at Microsoft.Office.Datacenter.WorkerTaskFramework.WorkItem.Execute(CancellationToken
    joinedToken) at Microsoft.Office.Datacenter.WorkerTaskFramework.WorkItem.<>c__DisplayClass2.<StartExecuting>b__0() at System.Threading.Tasks.Task.Execute() <b>ExecutionContext:</b> Probe Absolute Timeout=60000ms, Timeout Value=60000ms,
    Calculated HttpRequest Timeout=59000ms FailedResponse after 0 milliseconds. The remote server returned an error: (500) Internal Server Error. [000.000] Probe Absolute Timeout=60000ms, Timeout Value=60000ms, Calculated HttpRequest Timeout=59000ms [000.000]
    Starting HTTP request task [000.000] Waiting 59000 ms [000.000] Issuing GET against https://autodiscover.domain.com/AutoDiscover/ [000.000] Awaiting GET response [000.000] Performing SSL validation [000.000] Failed with exception: The remote server returned
    an error: (500) Internal Server Error. <b>FailureContext:</b> <b>ResultType:</b> Failed <b>IsNotified:</b> False <b>DeploymentId:</b> 0 <b>RetryCount:</b> 0 <b>ExtensionXml:</b> <b>StateAttribute1:</b>
    No response headers available. <b>StateAttribute2:</b> [email protected] cfj>M!T@O-;XNkj+=u8[SL#f8Oby*S:(&Bg@GTal_=R@3YXtGi=%Vj832L_AE|l>Jhy18K/an^cNHv7i*3-8d*9?#FQa8u!IUoAai-mr(&PG|ZALs2&?6hI2N]9NKK][
    <b>StateAttribute3:</b> <b>StateAttribute4:</b> <b>StateAttribute5:</b> <b>StateAttribute6:</b> 0 <b>StateAttribute7:</b> 0 <b>StateAttribute8:</b> 0 <b>StateAttribute9:</b>
    0 <b>StateAttribute10:</b> 0 <b>StateAttribute11:</b> <b>StateAttribute12:</b> <b>StateAttribute13:</b> <b>StateAttribute14:</b> <b>StateAttribute14:</b> <b>StateAttribute16:</b>
    0 <b>StateAttribute17:</b> 0 <b>StateAttribute18:</b> 0 <b>StateAttribute19:</b> 0 <b>StateAttribute20:</b> 0 <b>StateAttribute21:</b> <b>StateAttribute22:</b> <b>StateAttribute23:</b>
    <b>StateAttribute24:</b> <b>StateAttribute25:</b> <b>PoisonedCount:</b> 0 <b>Client Access Array:</b> Client Access Array name could not be retrieved. <b>ExecutionId:</b> 30334093 <b>ExecutionStartTime:</b>
    12/23/2014 12:03:08 PM <b>ExecutionEndTime:</b> 12/23/2014 12:03:08 PM <b>ResultId:</b> 32263287 <b>SampleValue:</b> 0</message> <monitor>AutodiscoverProxyTestMonitor/MSExchangeAutodiscoverAppPool</monitor></eventxml></userdata></event>

  • Need Help with Filling in Created Object

    I'm trying to fill in this object with a solid color I created just using the arc tool. However,  what happens when I use the default fill and stroke tool is that it fills in the shape of the arc rather than just inside the object
    Can someone help me figure out how to fill in just inside the object? I have CS6. Thanks

    dknovice,
    In addition to what Doug said, your screenshot says that you have two paths meeting in the middle. You can just select them and Ctrl/Cmd+J (I think). In earlier versions you needed to Direct Select one set of coinciding end Anchor points (the top or bottom set (dragging over only them after having deselected everything), and then you could (normal) select the whole path and Ctrl/Cmd+J to join the other set.

  • Help with a large compound statement - sort of

    Hi all. Hopefully you can help me. I'm trying to develop a little application in htmldb/ application express and having troubles with one little box.
    I have a page item that will have a value between 2003 and 2036. I will be referencing the value of this item from the session state, no worries. The next item in the page will be based on this value and the session state will trigger one of 33 possible queries for this 2nd item. I know that sounds complex but it has to be that way unfortunately, the queries that will be triggered by this :ITEM_1 value are very different so there is no pretty way of doing that bit.
    So say the value of Item1 = :ITEM1(session state value)
    I need to do something like
    IF
    :ITEM1 = '2004'
    THEN
    select column.name from table.name where condition
    ELSEIF
    :ITEM = '2005'
    THEN
    select column.name from table.name where condition
    ELSEIF
    :ITEM = '2006'
    THEN
    ''you get the idea
    I need to repeat this the 33 times for 33 different SELECT statements. I've tried to figure out the best way to approach it, whether that is an IF statement, a WHERE statement or similar but am really struggling. I have no training in any of this and am not an IT person or programmer, just a cartograpaher who got an extra job to do :)
    Which is the best approach for me here? And what is the syntax I need to use? I tried the IF statements but must be making some really fundamental mistakes in syntax. Forums are the only support available to me. Please help.....
    Cheers and thanks for your time. Michael

    :ITEM1 = '2004' ... :ITEM = '2005'
    select column.name from table.name where conditionAssuming ITEM1 and ITEM is just a typo and if the select statement is the same, you can use
    if :ITEM BETWEEN TO_NUMBER('2004') and TO_NUMBER('2005') THEN
    select column.name from table.name where condition
    end if;
    HTH
    Ghulam

  • Help with parsing an UPDATE statement

    I am stuck and need help! The teacher has not gone over parsing with us
    and it is not on his scheduled topics list. But, I am a person that likes to
    scope out and learn new things. For our final project, we have to allow
    updates, delete and inserts into the 5 main tables of the Premiere Products
    database. I have done everything except for the updates. I can achieve
    the updates of the entities by pretty much hardcoding them and that is
    okay by the teacher, but I want to learn about parsing because Barbara
    from this site mentioned this to me.
    This is what I was able to write and I am getting errors:
    CREATE OR REPLACE PROCEDURE updatecust_proc (
    v_cust_num IN customera.cust_num%TYPE,
    v_attributetoupdate VARCHAR2 ,
    v_updatedvalue VARCHAR2 )
    AS
    e_invalidcustnum_error EXCEPTION;
    BEGIN
    v_isvalidcustnum := iscust(v_cust_num);
    IF (v_isvalidcustnum = FALSE) THEN
    RAISE e_invalidcustnum_error;
    END IF;
    PARSE(
    'UPDATE customer
    SET' | | v_attributetoupdate | | '=' | | v_updatedvalue | |
    'WHERE cust_num =' | | v_cust_num
    END;
    EXCEPTION
    WHEN e_invalidcustnum_error THEN
    DBMS_OUTPUT.PUT_LINE('Cannot be updated. Invalid customer number');
    END;
    Any help would be useful. I went to the Oracle help site but their examples are a little too complicated for me to understand, plus, I am not using any C code.
    Thanks in advance!
    Bob

    Now we are getting somewhere. Identifier 'PARSE' must be declared.
    I again used the 'Search' link just above the forum posts and entered 'dbms_sql.parse' and got a short list of hits (as I suggested in my previous reply).
    There is one with Barbara's name on it. It shows exactly how to do what you are trying to do. In particular note her code:
    DBMS_SQL.PARSE
    (cursor_name,
    'UPDATE client SET '
    | | v_column
    | | ' = ' | | '''' | | v_new_data | | ''''
    | | ' WHERE account_id = '
    | | v_account_id,
    DBMS_SQL.NATIVE);
    Compare her PARSE statement to yours and you will see some major differences. The PARSE procedure is defined in the DBMS_SQL package and must be reference by DBMS_SQL.PARSE as Barbara shows.
    In addition to dynamic SQL using the DBMS_SQL package Oracle 8i also supports the EXEC IMMEDIATE statement.
    All of Oracle's documentation is available online via the 'Documentation' link on the left side of the OTN home page.
    The 'Supplied PL/SQL Packages Reference' has a chapter for each package (including DBMS_SQL) and describes the procedures/functions in the package and how to use them.
    The 'Application Developers Guide - Fundamentals' has chapters on 'processing SQL statements' and 'dynamic SQL' that go into some detail on performing dynamic sql.
    Yes, Barbara's code uses a CURSOR. The DBMS_SQl package requires it and so does your code. Almost all SQL uses a CURSOR either implicitly or explicitly.
    My comments are not, and were not, directed at you personally so I hope you don't take them that way.
    Your latest reply has a lot of useful information in it.
    1. 19/1 PLS-00201: identifier 'PARSE' must be declared. This is the explicit error message we need to help someone. We don't have to guess which error they are talking about. We can look it up in the MESSAGES manual if necessary. When someone says 'I get an error', or 'I get a PARSE error' we can only guess which error they are talking about.
    In your reply you state that you looked at Barbara's code, she uses a cursor and you don't need a cursor. That is very useful information to someone trying to help you because it tells us two things: you are trying to find the answer for yourself (a lot of people just want someone to write the code for them) and it shows that you haven't made the connection between Barbara's example (which shows EXACTLY what you need to do) and your own code.
    This is a public forum and I have found it useful to keep repeating certain suggestions.
    For whatever reason many people still do not seem to realize that:
    1. ALL of Oracle's documentation is available on-line via the 'Documentation' link on the left side of the OTN main page.
    2. You can purchase (for about $50) a CD-ROM that has all of the Oracle documentation on it in both PDF and HTML format.
    3. The 'search' link just above each discussion forum allows one to search any or all forums for topics, users, etc.
    The above resources should be used by everyone.
    Good luck!
    null

  • Help with a update,select statement

    Hi all please can you help me with a update statement i am struggling with.
    I have 2 tables
    Holiday and data
    In the Holiday table i have columns for
    Machine_ID NUMBER,
    date_from DATE,
    date_to DATE,
    ID NUMBER
    Machine column represents a type of machine, the two dates represent the start and end date of a holiday and ID represents the ID of the machines that the holiday effects (as you can have many machines that are the same, so the ID unique field to seperate them.
    i.e.
    996     25-DEC-08 00:00:00     27-DEC-08 00:00:00     91     
    996     25-DEC-08 00:00:00     27-DEC-08 00:00:00     92     
    100     28-DEC-08 00:00:00     29-DEC-08 00:00:00     1
    100     28-DEC-08 00:00:00     29-DEC-08 00:00:00     2
    In the data table i have the following columns:
    DATE DATE
    Machine NUMBER
    SHIFT1S DATE
    SHIFT1F DATE
    SHIFT2S DATE
    SHIFT2F DATE
    CALS DATE
    CALF DATE
    CAP NUMBER
    CALCAP NUMBER
    total_hrs_up NUMBER
    In here i have data for every date in the calendar. The machines are cross references with the machine in holidays table.
    I run two shifts so have shift 1 start, finish. shift 2 start, finish. These are dates with times, so shift1s could be 01-01-08 09:00:00 shift1f could be 01-01-08 17:00:00.
    shift2S could be 01-01-08 21:00:00 shift2f could be 01-01-08 23:59:00.
    so that machine would be up between them hours of the day.
    Other columns include
    CALS, ,CALF = calendar start, finish, - This needs to be populated from the holiday table. currently null. So if the date is the 26 DEC and the machine is the same as what is in the holiday table then these two columns should be populated with them data
    CAP is the total number of these machines i have available.
    CALCAP is the no of machines the holiday affects -currently null
    total_hrs_up is the number of hours this machine is up and running -currently null.
    So what i need to do is populate the cals, calf calcap, total_hrs_up columns.
    total_hrs_up is the important one, this needs to work out based on the two shift patterns the number of hours that the machine is available and then take off the holiday hours to give a final value.
    so current data example in data is
    date machine shifts shiftf shift2s shift2f cals, calf, cap, calcap, total_hrs
    16-JUL-08     100 09:00:00     17:00:00     12:00:00     00:00:00               '','','',1     ,''     
    16-JUL-08     105 09:00:00     17:00:00     12:00:00     00:00:00               '','','',1     ,''
    16-JUL-08     107 09:00:00     17:00:00     12:00:00     00:00:00               '','','',1     ,''
    id like to see based on the holiday table if there is a holiday then this data is updated as such and a total_hrs machine is available populated on that date.
    Any help is very much appreciated!
    Thanks

    Hi,
    The following query does what you requested.
    It makes the following assumptions:
    (a) in data, shift1start <= shift1finish
    (b) in holiday, hol_start <= hol_finish
    (b) in data, the combination (machine, shift1start) is unique
    (c) in holiday, hol_start <= hol_finish
    (d) in holiday, rows for the same machine and id never have overlapping dates (including times). For example:
    INSERT INTO holiday (machine, id, date_from, date_to)
    VALUES (200, 1, '26-DEC-08 07:00:00', '26-DEC-08 09:59:59');
    INSERT INTO holiday (machine, id, date_from, date_to)
    VALUES (200, 1, '26-DEC-08 09:00:00', '26-DEC-08 09:59:59');will cause a probem. Multiple rows for the same machine and day are okay, however, if the times do not overlap, like the following:
    INSERT INTO holiday (machine, id, date_from, date_to)
    VALUES (200, 1, '26-DEC-08 07:00:00', '26-DEC-08 08:59:59');
    INSERT INTO holiday (machine, id, date_from, date_to)
    VALUES (200, 1, '26-DEC-08 09:00:00', '26-DEC-08 09:59:59');Here's the UPDATE statement:
    UPDATE     data     m
    SET     (     hol_start
         ,     hol_finish
         ,     no_of_available_minutes
         ) =
    (     SELECT     MIN (date_from)
         ,     MAX (date_to)
         ,     (     MAX (shift1finish - shift1start)     -- Total from data
              -     ( NVL     ( SUM     ( LEAST (date_to, shift1finish)
                             - GREATEST (date_from, shift1start)
                        , 0
                        )                    -- Total from holiday
                   / MAX (total_no_of_machines)          -- Average
              ) * 24 * 60                         -- Convert days to minutes
         FROM          data     d
         LEFT OUTER JOIN     holiday     h     ON     h.machine     = d.machine
                             AND NOT     (     date_from     > shift1finish
                                  OR      date_to          < shift1start
         WHERE          d.machine     = m.machine
         AND          d.shift1start     = m.shift1start
    );The subquery has to use its own copy of data (that is, in needs d, not m), since the subquery has to return a non-NULL number of minutes when no rows in h match m.

  • Help with fill, in shape tool?

    Hi
    InDesign CS 4.
    When I drag a new rectangle it always fills with a fade from left to right with a border line that fades as well. It's the same with elipses or polygons.
    Trying to change the fill, or the line color has no effect.
    I don't know how I got this turned on and I can't figure out how to turn is off.
    I'm in the middle of a job, I need to get this fixed.
    Thanks for the help
    Mike

    Hi
    Here is the image...
    As you can see it works fine if I open a new document.
    If I open any of the pages then the problem comes back.\
    So somehow what ever is happening is encoded into the documents.
    I also noticed that the shapes created are transparent.
    When I overlapped it with another box I could see it underneath.
    Well since it works fine in Windows 7 I'll just finish the job using it and hope that it doesn't happen on the next job.
    Weird that it works in Windows 7 and suddenly not in Windows 8.
    And if it's an error in the file why does it not open the same in 7.
    Mike

  • Help with filling a background

    I have photoshop elements 5.0 and I primarily want to use it to create my own custom scrapbooks. Before, I had used microsoft powerpoint. Powerpoint had a very easy way to fill in my backgrounds. You selected background-->fill-->texture-->file. This allowed me to select a custom background tile from my picture documents to fill the entire background. I don't see this feature in photoshop.
    I do see a fill layer option which prompts you to select a pattern. I tried to load my own custom pattern but was unable to find any files with the .pat extension. Please help me figure out how to fill in my backgrounds using graphics from my own files.

    I use a resolution of 300 for my projects, but I keep them on a portable hard drive and off my c drive.
    I think you probably want a resolution of at least 200 if you are planning to print. Check your printer documentation.
    If space is a problem you might want to keep just a jpg of your finished page on your hard drive and save the original layered psd (or tif) off line on dvd or cd.
    Two other good sources for digital scrapbooking with elements advice are:
    http://www.scrappersguide.com/
    http://www.photoshopelementsuser.com/index.php

  • Help with TYPE and LIKE statements

    HI guys,
    I know this is really novice stuff, but I am a little confused.
    Can anyone please explain the exact difference between TYPE and like with the help of a program, to understand it.
    What situation would demand the use of each of the LIKE statement, since I can do all these things using the TYPE ?

    Hi Akhil,
    I summarized the info in SDN posts and SAP Help, to make it easier for you to understand. I also included some code snippets. Hope these prove to be helpful to you.
    The following is from SAP Help:
    The Additions TYPE and LIKE
    The additions TYPE type and LIKE dobj are used in various ABAP statements. The additions can have various meanings, depending on the syntax and context.
    ·        Definition of local types in a program
    ·        Declaration of data objects
    ·        Dynamic creation of data objects
    ·        Specification of the type of formal parameters in subroutines
    ·        Specification of the type of formal parameters in methods
    ·        Specification of the type of field symbols
    A known data type can be any of the following:
    ·        A predefined ABAP type to which you refer using the TYPE addition
    ·        An existing local data type in the program to which you refer using the TYPE addition
    ·        The data type of a local data object in the program to which you refer using the LIKE addition
    ·        A data type in the ABAP Dictionary to which you refer using the TYPE addition. To ensure compatibility with earlier releases, it is still possible to use the LIKE addition to refer to database tables and flat structures in the ABAP Dictionary. However, you should use the TYPE addition in new programs.
    The LIKE addition takes its technical attributes from a visible data object. As a rule, you can use LIKE to refer to any object that has been declared using DATA or a similar statement, and is visible in the current context.  The data object only has to have been declared. It is irrelevant whether the data object already exists in memory when you make the LIKE reference.
    ·        In principle, the local data objects in the same program are visible. As with local data types, there is a difference between local data objects in procedures and global data objects. Data objects defined in a procedure obscure other objects with the same name that are declared in the global declarations of the program.
    ·        You can also refer to the data objects of other visible ABAP programs. These might be, for example, the visible attributes of global classes in class pools. If a global class cl_lobal has a public instance attribute or static attribute attr, you can refer to it as follows in any ABAP program:
    DATA dref TYPE REF TO cl_global.
    DATA:  f1 LIKE cl_global=>attr,
           f2 LIKE dref->attr.
    You can access the technical properties of an instance attribute using the class name and a reference variable without first having to create an object. The properties of the attributes of a class are not instance-specific and belong to the static properties of the class.
    Example
    TYPES: BEGIN OF struct,
             number_1 TYPE i,
             number_2 TYPE p DECIMALS 2,
           END OF struct.
    DATA:  wa_struct TYPE struct,
           number    LIKE wa_struct-number_2,
           date      LIKE sy-datum,
           time      TYPE t,
           text      TYPE string,
           company   TYPE s_carr_id.
    This example declares variables with reference to the internal type STRUCT in the program, a component of an existing data object wa_struct, the predefined data object SY-DATUM, the predefined ABAP type t and STRING, and the data element S_CARR_ID from the ABAP Dictionary.
    The following info is from various posts:
    --> Type: It is used when userdefined object link with SAP system data type.
    Local types mask global types that have the same names. When typing the interface parameters or field symbols, a reference is also possible to generic types ANY, ANY TABLE,INDEX TABLE, TABLE or STANDARD TABLE, SORTED TABLE and HASHED TABLE.
    --> Like: It is when data object link with the other data object.
    --> TYPE, you assign datatype directly to the data object while declaring.
    --> LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly.
    you can refer to all visible data objects at the ABAP program's positon in question. Only the declaration of the data object must be known. In this case it is totally irrelevant whether the data object already exists physically in
    memory during the LIKE reference. Local data objects mask global data objects that have the same name.
    --> Type is a keyword used to refer to a data type whereas Like is a keyword used to copy the existing properties of already existing data object.
    Types: var1(20) type c.
    data: var2 type var1. ( type is used bcoz var1 is defined with TYPES and it
    does not occupy any memory spce.
    data: var3 like var2. ( like is used here bcoz var2 is defined with DATA
    so it does occupy space in memory ).
    data: material like mara-matnr. ( like is used here bcoz mara-matnr is stored in memory)
    --> Type refers the existing data type
    --> Like refers the existing data object
    Please Reward Points if any of the above points are helpful to you.
    Regards,
    Kalyan Chakravarthy

  • Need help with filling circle with circular fill animation

    Hello, I'm creating an old fashioned movie countdown
    animation but I'm not sure how to approach filling a circle with a
    radar-like sweep.
    If anyone has any sort of clue how to do this I would
    appreciate your help. It can be a timeline based animation or an
    ActionScript based animation. Either way is fine with me.
    I looked on the internet for tutorials but couldn't find
    anything.
    Brenda

    for some interesting patterns make the lineStyle color and
    beginFill color different:

  • Help with decode or case statement

    I have the following insert statement
    insert into t_outcome (
    TRANSACTION_ID,
    charge_DATE,
    Charge_TIME,
    STATUS_CODE)
    values(cur_tem.transaction_id,
    cur_tem.charge_date,
    cur_tem.charge_time,
    cur_tem.STATUS_code)
    I require to incorporate the following rules into the population of charge_TIME
    if cur_tem.STATUS_code is 7 and cur_temp.charge_time is not null then populate charge_TIME with cur_temp.charge_time
    else if cur_tem.STATUS_code is 7 and cur_temp.charge_time is null then populate charge_TIME with -9
    else if cur_tem.STATUS_code is not 7 then populate charge_TIME with -7
    How do I add these rules into the insert statement ?
    Thanks
    Brendon

    decode(cur_tem.STATUS_code, 7, nvl(cur_tem.charge_time, -9), -7)
    I think that will work.
    Lee
    Message was edited by:
    Lee Forkenbrock

  • Help with filling out form (application)

    Hello,
    I am trying to fill out an application and when I am entering addresses, whenever I go to the next line it will automatically fill in the previous line and when I delete and change it, it will change the first line to the second line and it will not let me enter the information. Can someone please help me
    Windows Vista
    Adobe Reader 8

    Also, This forum is for FULL Acrobat - Reader forum is
    http://www.adobeforums.com/webx?13@@.3bbf42f7

  • Help with filling form!

    I've recently filled a contract and now the form will let me type everywhere except for the ONE line that I need to type in!!  Why is it locked on just that one line?  It keeps highlighting the two lines above it and there is a blue box around the text on the two fillable lines above it.

    Hi paigew93234382,
    It might be a signature field where typing is disabled or so.
    Please share the screenshot of the same so that I can analyze what exactly it is.
    If possible, please share the document with me.
    I am sending you a private message with my contact ID details.
    Hope to get your response.
    Regards,
    Anubha

  • Help with a union all statement

    Hello
    I am pulling a query much like this:
    (select ID, Created_timestamp from snapshot1
    where created_timestamp >= to_date ('8/15/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM')
    and created_timestamp < to_date('8/18/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM'))
    UNION ALL
    (select ID, created_timestamp from snapshot2
    where created_timestamp >= to_date ('8/15/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM')
    and created_timestamp < to_date('8/18/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM'))
    UNION ALL
    (select ID, created_timestamp from data_history
    where created_timestamp >= to_date ('8/15/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM')
    and created_timestamp < to_date('8/18/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM'))
    Is there an easier way to handle created_timestamp?
    I would like to put it at the beginning so I only have to change it in one place.

    I don't understand.
    I try your with statement and get: "end_date" invalid identifier as an error
    I start my query out:
    WITH start_date as
    (select to_date ('08/15/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM') from dual),
    end_date as (select to_date ('08/18/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM) from dual)
    select sales.id, start_date as callstart, end_date as callend
    where sales.created_timestamp >= start_date
    and sales.created_timestamp < end_date
    UNION ALL
    <<<<<<<here is where you take the last select statement and replace sales with manufacturing>>>>>>>>>>>>>
    UNION ALL
    <<<<<<<here is where you take the last select statement and replace sales with engineering>>>>>>>>>>>>>
    and it still fails.

Maybe you are looking for

  • Sharing Printer from iMac

    I have an HP PhotoSmart C4280 connect via USB to my iMac running OS 10.5.4. I have shared this printer in the Sharing Panel of the iMac. My PowerBook sees the printer & can select it, but when I go to print a document it says it is unable to connect

  • Transfer package to another control system

    We have an independent  control /central system which is busy with a big time reduction TDMS project, now it's at the beginning of the data transfer. However its CPU has  crashed 2 times this week. Can we transfer this package to another TDMS control

  • Maintenance Certificate for SAPNetweaver Trial

    Does anybody now if it possible to obtain an Maintenance Certificate for SAPNetweaver Trial System?

  • Where can I find my password

    Where can I find my password to enter my AirPort Extreme WiFi network? Please help.

  • Last period where depreciation was posted

    Hi All, What transaction/report can I use to find out the FY/period where depreciation was last posted? I am using ECC 6.0 This is useful for doing testing for company codes in test systems that are note up-to-date in their depreciation runs. Regards