How to transfer the current value of a field of the table in a Java-variable?

Subj....

Use the ImmediateAccess class -- there's quite a lot of info on
how to use it in the help.

Similar Messages

  • Get the Last Value of Status Field from SQL TABLE using SQL 2008

    I have a table with Fields such as
    UploadstartTime, UploadEndtime, STATUS From TBLA.
    The STATUS Field, has values =7 and 11 are failed and 12 is SUCCESS. I cannot do a max, since it will always show 12, I need to get the MAX(UPLOADENDTIME, and get STATUS For that record. How can I do that using 1 SQL Query?
    My current code is: The issue is
    select
      TBLNAME
    MaxUploadstarttime
    =
    max(UploadStartTime),
    MaxUploadEndtime
    =
    max(UpLoadEndTime),
         Status=max(status)
    from  DB.DBO.LOGTABLE
    p1

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. You failed! Temporal
    data should use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    >> I have a table with Fields such as <<
    Fields are not columns! There is no generic status in RDBMS. Putting “tbl-” in a table name is called tibbling and we make fun of people who do it (Google Phil Factor's humor columns. If you were polite is this what you wanted to post? 
    CREATE TABLE Something_Uploads
    (upload_source_name CHAR(15) NOT NULL,
     upload_start_timestamp DATETIME2(0) NOT NULL,
     PRIMARY KEY (upload_source_name, upload_start_timestamp),
     upload_end_timestamp DATETIME2(0),
     CHECK(upload_start_timestamp < upload_end_timestamp),
     upload_status INTEGER NOT NULL 
       CHECK (upload_status IN (7,11,12, ..))
    >> I cannot do a max, since it will always show 12, I need to get the MAX(UPLOADENDTIME, and get upload_status For that record [sic]. How can I do that using 1 SQL Query?  <<
    Since you told us nothing and gave no sample data, want to correct this postign? 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How to compare, current value in :block.text_item with the database value

    Hi
    Could you please tell me
    How to compare the current value in :block.text_item with the corresponding database column value.
    I am using forms 10g
    There is block and there is an text Item in that block.
    When I run the form and query the block (tabular), the :block.text_item shows me, whatever value there in the database.
    Now I add some value in the :block.text_item to the existing value.
    now
    the :block.text_item contains old+ new added value
    whereas
    the database table contains 'old' value
    Now on a button click , I want to find out what is the value that I have added
    Could you please tell me, is it possible without writing a select query?

    Hello,
    Now on a button click , I want to find out what is the value that I have addedSo you mean always user will add value in the existing value. Because this way will fail in one case. Let say
    Value in Database is = ABCD
    User opened the form and he removed the D and write E and now value is ABCE and length is still same 4. So, there is no addition.
    Anyway you can know the database value at runtime there is one property for item called DATABASE_VALUE. It gives the value which is in database while you are running the form before save. and you can use like this..
    Trigger = WHEN-MOUSE-DOUBLE-CLICK on item level
    DECLARE
      vItemValue DATATYPE; -- Set the data type according to your desired field.
      vValueAdded DATATYPE; -- Set the data type according to your desired field.
    BEGIN
      vItemValue:=GET_ITEM_PROPERTY('ITEM_NAME',DATABASE_VALUE);  -- It will return you the database value in vItemValue variable.
      IF LENGTH(vItemValue)>LENGTH(:FORM_ITEM_NAME) THEN  -- It mean something change or added
        vValueAdded:=SUBSTR(:FORM_ITEM_NAME,LENGTH(vItemValue)+1);
        MESSAGE('Added value is : '||vValueAdded);  -- It will show you the added value.
      END IF;
      -- now suppose you want to show the old and new value in message not the added one
      -- Then no need of IF condition. You can just use message like this
      -- And i would prefer to use like this way
      MESSAGE('Old Value : '||vItemValue||'  New Value - '||:FORM_ITEM_NAME);
      MESSAGE('Old Value : '||vItemValue||'  New Value - '||:FORM_ITEM_NAME);
    END;Hope it is clear.
    -Ammad

  • Compare the current value with the previous value in the same column

    Hi all,
    I have to include a statement in a query which allows to compare the current value of column A with the previous value of column A (same column). from there, I need to add a condition in order to have the expected result.
    Let's take an example to illustrate what I want to achieve:
    I have the following columns in table called 'Charges':
    Ship_id batch_nr Order_nr Price
    SID1111 9997 MD5551 50
    SID1111 9998 MD5552 50
    SID1111 9999 MD5553 50
    SID2222 8887 MD6661 80
    SID2222 8887 MD6662 80
    SID2222 8887 MD6662 80
    SID3333 6666 MD7771 90
    I want to check if the ship_id of row 2,3 (and more if available) is equal to the ship_id of row 1.
    If it is the case, then value 'together with the first batch_nr' in row 2 and 3 under Price column. If not, then keep the original value of Price column
    PLease see below the expected result:
    Ship_id batch_nr Order_nr Price
    SID1111 9997 MD5551 50
    SID1111 9998 MD5552 together with 9997
    SID1111 9999 MD5553 together with 9997
    SID2222 8887 MD6661 80
    SID2222 8887 MD6662 together with 8887
    SID2222 8887 MD6663 together with 8887
    SID3333 6666 MD7771 90
    Thanks in advance for your help, it is really urgent.
    Imco20030

    Hi,
    user11961002 wrote:
    Hi,
    Here is the query that I use:
    [ select
    sl.ship_id,
    o.ordnum,
    o.reffld_5 "BatchNR",
    sum(tc1.chrg_amt) "FreightPRC",
    sum(tc2.chrg_amt) "FuelPRC",
    sum (tc1.chrg_amt + tc2.chrg_amt + tc3.chrg_amt) "Total Price"
    from ord_line ol
    join ord o on (ol.ordnum = o.ordnum and ol.client_id = o.client_id)
    join shipment_line sl on (ol.ordnum = sl.ordnum and ol.client_id = sl.client_id and ol.ordlin = sl.ordlin)
    join adrmst a2 on (o.rt_adr_id = a2.adr_id)
    left join tm_chrg tc1 on (tc1.chargetype = 'FREIGHT' and tc1.chrg_role = 'PRICE' and tc1.ship_id = sl.ship_id)
    left join tm_chrg tc2 on (tc2.chargetype = 'FUELSURCHARGE'and tc2.chrg_role = 'PRICE' and tc2.ship_id = sl.ship_id)
    where sl.ship_id = 'SID0132408'
    group by o.client_id, o.ordnum, o.reffld_2, sl.ship_id, a2.adrnam, a2.adrln1, a2.adrpsz, a2.adrcty, a2.ctry_name,
    o.reffld_5, ol.early_shpdte
    order by ship_id
    ]That looks like the query you were using before you started this thread.
    Modify it, using the analytic fucntions FIRST_VALUE and LAG, like I showed you.
    I see that you did simplify the problem quite a bit, and it's good that you did that.
    It doesn't matter that your real problem involves joins or GROUP BY. Analytic functions are calculated on the results after all joins and GROUPS BYs are done. Just substitute your real expressions for the simplified ones.
    For example, in your simplified problem, there was a column called order_nr, but I see now that's it's really called o.ordnum. Where the solution I posted earlier says "ORDER BY order_nr", you should say "ORDER BY o.ordnum".
    Here's a less obvious example: in your simplifed problem, there was a column called price, but I see now that it's really SUM (tc1.chrg_amt + tc2.chrg_amt + tc3.chrg_amt). Where the solution I posted earlier says "TO_CHAR (price)", you should say "TO_CHAR (SUM (tc1.chrg_amt + tc2.chrg_amt + tc3.chrg_amt))". (You can't use an alias, like "Total Price", in the same SELECT clasue where it is defined.)
    I removed some columns from the select as they are not relevant for the wanted action like 'adress details or other references'.
    Now here is the result:
    Shipment ID     Order Number     WMS Batch     Freight      Fuel Price Order Total Price
    SID0132408     MDK-000014-05602649     04641401     110     10 120
    SID0132408     MDK-000014-05602651     04641402     110     10 120
    SID0132408     MDK-000014-05602652     04641363     110     10 120
    as you can see, the 3 orders have the same shipment ID.
    The expected result should be shown under column 'Total Price' as follows:
    Shipment ID     Order Number     WMS Batch     Freight      Fuel Price Order Total Price
    SID0132408     MDK-000014-05602649     04641401     110     10 120
    SID0132408     MDK-000014-05602651     04641402     110     10 tog with 04641401
    SID0132408     MDK-000014-05602652     04641363     110     10 tog with 04641401Okay, so those are the correct results that I asked for, plus the incorrect results you're getting now. Thanks; extra information doesn't hurt.
    But where is the raw data that you're starting with?
    It looks like you tried to format the code (but not the results) by typing this 1 character:
    before the formatted section and this different character
    after the formatted section. To post formatted text on this site, type these 6 characters
    before the formatted section, and the exact same 6 characters again after the formatted section.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Refreshing the value of a field in a table and displaying it on the screen.

    how do i mimimize calls to the database in the following scenario?
    I need to show the latest value of a field in a table in a database through a java program. in a concurrent access environment, there are chances of multiple users getting stale values. how do I overcome this problem through code?
    please advise.

    There are many ways of doing this. However its worth noting that RDBMS database are not messaging, event driven systems and are not best suited to do what you want to do. You should only consider doing this if you have a low rate of changes.
    You can
    - Poll the database table and look for changes.
    - Add a trigger to the table to record the keys which have changed. The have a query to find just the key which have changed.
    - When a field changes, also send a broadcast/topic message.
    - Add a trigger which sends a JMS message when a change occurs. (This is entirely DB/JMS specific, you need to find if this is possible)
    Again, databases are not ideally suited to event driven, real time updates. There is no simple, clean solution.

  • How to get the current values of LINESIZE and WRAP in SQLplus ?

    How do I get the current values for the SQLplus environment variables
    e.g. LINESIZE, WRAP, PAGESIZE ?
    When I type
    SQL> show parameter LINESIZE
    nothing is displayed.
    Is there a command to show ALL existing current paramter values at once ?

    SQL> show linesize
    linesize 134
    SQL> show wrap
    wrap : regels zullen omgeslagen worden
    SQL> show pagesize
    pagesize 50000And you can issue a "show all" to see all settings at once.
    Regards,
    Rob.

  • How to display the current value selected in DDLB of another screen

    hi Experts
    I need some info regarding the dropdownlist in BSP.
    I have two screens . One screen contains the table view which contains a set of records.Each record has two columns.
    Second screen contains 2 drop down list.
    When i select one record and then press the submit button in the first screen .Then i want that the selected value of the selected record will display in the DDLB of the second screen. And then i can again select the value from the drop down list.
    For example:
    1st screen:
    record 1.
    col 1     col 2
    record 2
    col 1     col 2
    2nd screen
    ddlb1...........
    ddlb2...........
    So when i select the record1, then the current value of col1 and col2 should visible on the ddlbs of second screen first time. Then i choose other value from the ddlbs.....
    My Question is how to do the following
    "when i select the record1, then the current value of col1 and col2 should visible on the ddlbs of second screen".
    please provide some suggestions...
    Thanks.

    Hi,
    You can use form with post method
    like
    <htmlb:form method = "post"
                      action = "page2.htm"
                      target = "coding" >
    <htmlb:dropdownListBox id             = "labelAlignment"
                                               selection      = "<%= me->labelAlignment %>"
                                               onClientSelect = "document.forms[0].submit();" >
                          <htmlb:listBoxItem key   = "LEFT"
                                             value = "LEFT" />
                          <htmlb:listBoxItem key   = "RIGHT"
                                             value = "RIGHT" />
                        </htmlb:dropdownListBox>
    So once you select col1 and col2 in your case its value is in page attribute say hold, this attributes needs to be defined in page2.htm also with auto checked. You can get the val selected in page1.htm
    If helpful rewards point.
    Regards,
    Albert

  • How to make the LV front panel controls the current value through the program is set as the default value when the next time you open?

    How to make the LV front panel controls the current value through the programis set as the default value when the next time you open?
    1110340051 

    Try this: Re: How to make a VI remember the latest control value?
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • How to make the current value default programmatically

    How to make the current value default programmatically

    Open a VI reference to the desired VI and use invoke mode with method: "Make current values default".
    The VI cannot be running, so you need to set it from a different VI. (It also means, it cannot set itself.)
    LabVIEW Champion . Do more with less code and in less time .

  • Get the current value of a managed bean.

    Hi guys
    I have a register page which takes the Login ID and the password and retype password whose values are stored in the "Managed Beans" in registerServer.java.
    I have a (PwdValidator.java) Custom validator for Re-type Password which validates itself against the password.
    Now my problem is from the PwdValidator.java how can I access the value of the password which is stored in the managed bean in registerServer.java.
    here is a copy of my faces-config.xml
         <managed-bean>
              <managed-bean-name>registerServer</managed-bean-name>
              <managed-bean-class>com.sun.registerServer</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
    Help is really appreciated,
    Thanks,
    Chaprasi Baba

    Thanks for the reply but my question is how do I get
    the password value from the managed bean
    FacesContext context =
    FacesContext.getCurrentInstance();
    Application application = context.getApplication();
    CountryValueObject registerServer =
    (CountryValueObject)application.getVariableResolver().r
    solveVariable(context, "registerServer");
    String pwd = registerServer.password // So will this
    give me the current value for that session.You didn't go far enough in replacing the example code . Try this:
    FacesContext context = FacesContext.getCurrentInstance();
    Application application = context.getApplication();
    RegisterServer registerServer = (RegisterServer)application.getVariableResolver().resolveVariable(context, "registerServer");
    String pwd = registerServer.password // So will this give me the current value for that session.

  • Select List with the current value

    Hi,
    I have a Page suppose Page1 with 2 region.
    Region1 is having SEARCH button (target page 1 itself) and a SELECT LIST called Deptno (10,20,30,40)
    Region2 is just a simple employee report based on Deptno (where deptno = :p1_deptno)
    Now when I suppose select deptno 30 and press SEARCH button, report is not displayed and also Dept select list current value becomes the first one in the list i.e 10.
    My question is after submitting the same page 1 using SEARCH button, how can I display the selected value (dept 30) in the select list.
    Note:- If I am using Select List with Submit then it's working fine and also displaying the current value (30) in the list, But I am looking for using SEARCH button.
    Thanks,
    Deepak
    Edited by: Deepak_J on Aug 6, 2009 2:14 PM

    Hi,
    Then the value that is selected in the list will not be submitted, so it will not be saved. You need a button that submits the page.
    Andy

  • Comparing the current value with the previous one in Powershell

    Hi,
    New to scripting and i was wondering how can I compare the current value with the previous value?
    I am having trouble with the loop structure, and I am not sure I am on the right track...
    I am trying to compare the record to next record in the same csv file after import-csv... My code runs fine, but is not giving the right result.
    $FilePath = Get-FileName -initialDirectory "C:\"
    #Testing for null
    If($FilePath)
    $Data = Import-csv -Path $FilePath | Sort-Object BUYER, {[int] $_.PO_NBR}, {[int] $_.LINE_NBR}
    Foreach($fData in $Data)
    $i = $fData
    Foreach($i in $fData)
    if($fData.Buyer -eq $i.Buyer)
    #save all the same buyer name to a new variable
    Write-Host "Same as previous"
    Else
    Write-Host "Variable is null"
    Remove-Item function:\Get-FileName

    Thank you. The Foreach loop is now working properly.
    Can I ask what is the purpose of "-ea 0" in the import-csv? I can't seem to find "-ea" as a parameter for import-csv in help.
    -ea is short for -ErrorAction.
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • Updating a database value when you don't have the current value

    I need to write a query that updates the amount of points a
    user has, even though i don't know how many they have currently.
    This is part of a referal program. When a user gets another user to
    join, the original user gets 15 more points. The problem is I do
    not want to write a query that finds how many points the original
    user has because that seems wasteful. It should look something
    like..
    <cfquery datasource="users" name="givepoints">
    Update users
    set points = [whatever the current value is + 15]
    where userlogin = form.referer
    </cfquery>
    That line that has the value in the brackets is where i am
    confused. I don't know the current value so how can i add 15 to
    it?

    In some databases, oracle for example, the use of
    cfqueryparam speeds up your queries. It also has the potential to
    simplify your code in that it handles things like apostrophes, so
    you don't have to.
    On the other hand, if you want to cache your query, you can't
    use cfqueryparam. Also, if you are using some sort of logic to
    build an sql variable to use in your query, it takes a lot of
    effort (more than I'm prepared to give) to use cfqueryparam.
    Also, not every db supports it.
    cfqueryparam has it's place, but that place is not
    everywhere.

  • ExecuteWithParams, bindVariable don´t take the current value of textfield

    Hello,
    i use a bind variable to select only the rows with the same date. (ExecuteWithParams)
    Therefor i added the bind Variable as a JTextfield to my client.
    If i type the date to the textfield it works, but if i add current date by pressing a button, the filter ignores the value of the textfield.
    After a mouseklick into the textfield it works again.
    Thank you
    AK
    JDeveloper: 10.1.3.0.4.3673
    ADF BC: 10.1.3.36.73
    Java: 1.5.0_05

    Hi,
    how do you add the current date? You should set the date in the binding layer if you want it to also show in the textfield. The panelBining variable is a handle to the binding. From here you can cal get("name of the attribute"), cast it to control binding and cal setInputValue
    Frank

  • How does APEX check for null values in Text Fields on the forms?

    Hello all,
    How does APEX check for null values in Text Fields on the forms? This might sound trivial but I have a problem with a PL/SQL Validation that I have written.
    I have one select list (P108_CLUSTER_ID) and one Text field (P108_PRIVATE_IP). I made P108_CLUSTER_ID to return null value when nothing is selected and assumed P108_PRIVATE_IP to return null value too when nothign is entered in the text field.
    All that I need is to validate if P108_PRIVATE_IP is entered when a P108_CLUSTER_ID is selected. i.e it is mandatory to enter Private IP when a cluster is seelcted and following is my Pl/SQL code
    Declare
    v_valid boolean;
    Begin
    IF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := FALSE;
    ELSIF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := FALSE;
    END IF;
    return v_valid;
    END;
    My problem is it is returning FALSE for all the cases.It works fine in SQL Command though..When I tried to Debug and use Firebug, I found that Text fields are not stored a null by default but as empty strings "" . Now I tried modifying my PL/SQL to check Private_IP against an empty string. But doesn't help. Can someone please tell me how I need to proceed.
    Thanks

    See SQL report for LIKE SEARCH I have just explained how Select list return value works..
    Cheers,
    Hari

Maybe you are looking for

  • Howto import XML into Excel table ?

    Hi, I asked this before in the Excel forums but received the suggestion that I ask here instead.  The question precis : How to ungrey the "Append new data to existing XML lists" checkbox so I can select it when importing XML data into an Excel spread

  • Oracle AS control hangs after user login - AIX 5.3

    Hi, We are engaged with a customer who deploys OracleAS 10.1.2.0.2 on AIX 5.3. After installation, AS control hangs after user logins. This issue is addressed in release note and metalink doc365725.1. We followed the guide in metalink to do the modif

  • Why won't the fan on my MB Pro 13" speed up?

    Hi I run a MacBook Pro 13" with a 2.26 GHz Intel Core Duo 2, which i bought in autumn 2009. Since a while I have noticed that it sometimes get's pretty hot (you can feel it on the left side, just over the connections for usb, power and so on), and I'

  • Modeling dummy product and planned orders

    Hi SAP Gurus, I have requirement where i need to model particular business requirements on subcontracting and the same is resulting in need of modeling of dummy product and dummy planned orders. Please share your inputs on what would be impact of dum

  • UNIX Pipe(tail command) and java

    I want to read from a LOG file, which is being appended periodically. I have written a java program which can process on the addition made to the LOG file and display the result (as soon as something is added to the LOG file) My prgram works fine if