How to create updateable resultset using sql with "order by"

Dear all,
I'm using the Derby database to hold a table of stock prices. After the table is populated, I want to do some calculations and store the result in a column.
I get the resultset using the following code
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); ResultSet rs = stmt.executeQuery(select history_id, value, days from history where ticker = '" + ticker + "' order by value_date"); {code} When I then try to update the "days" field, I get an SQLException telling me that the resultset is not updatable. However, if I remove the "order by" clause, I am able to update the data, but then my algorithm does not work as I need to traverse the data in a specific order. The quesion is: how do I create an updatable resultset using a sql-statement with an order by clause? Kind regards Karl Martin Lund                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

jschell wrote:
Seems rather obvious to me that the exception specifically tells you that you can't do that.OP: I would guess it's because ORDER BY forces the database to read all the result rows into a temporary area, sort them, and then return them from this temporary area, as opposed to streaming the results. The extra step probably makes updateable result sets more difficult (or maybe not possible), so they opted not to do it.

Similar Messages

  • How to create a queue using CVP with ICM script(Comprehensive mode)

    Hello Guys,
    I would like to know how can I configure a queue in a comprehensive mode using micro-app at CVP + ICM environment. I work with UCCE at least 2 years, so I know how to create a queue using UCCX and/or IPIVR (I do a queue application using UCCX Editor and at ICM I use the Run external Script component), but at CVP I don't know how to create a application at Call Studio and how to call this application at ICM Script Editor to run this queue if there aren't agents available.
    Can someone help me to understand how can I do that?
    I attached the ICM Script using micro-app. This script runs ok, I call to a Route pattern and CVP route request ICM, so ICM run the script, but if there are no agents available the call drops, so I would like to know how can I create a queue to hold the call and to come back to a available agent.
    Regards,
    Eric Zapparoli
    Unified Communications
    Wittel

    Out of the check mark in the queue to skill group node you go to another run external script node, then you loop into that over and over again until the call is answered.
    david

  • How to Create web service using JMS with PUB/SUB pattern.

    Hi All,
    I need to expose web service using JMS with PUB/SUB pattern.
    if you have any source for this.
    I tried to use @WLJmsTransport annotation but unable to get it done.
    I have configured all JMS server, topic, and connection factory.
    Thanks.

    Hi, I am having web sample web service program which is simple one.
    But I need to Modify this to JMS enable.
    Can any one help me?
    Thanks.

  • How to create a database using SQL Developer

    Hallo,
    I am a user of OpenSUSE 11.4 and have Oracle database install in my system. I was reading this page regarding on creating a database. But I don't know how to launch DBCA in my system. May I know how can I launch DBCA in OpenSUSE 11.4?
    THanks @!

    user4994079 wrote:
    Hallo,
    I am a user of OpenSUSE 11.4 and have Oracle database install in my system. I was reading this page regarding on creating a database. But I don't know how to launch DBCA in my system. May I know how can I launch DBCA in OpenSUSE 11.4?
    THanks @!You'd launch it in exactly the manner in which your cited reference says:
    --- begin quote ---
    by entering the following on the UNIX command line:
    dbca
    --- end quote ---
    Of course the documentation assumes you've completed the first five minutes of Computer Admin 101 and so realize you should include the directory that has the executabale file. In this case, your PATH should include $ORACLE_HOME/bin
    So, what have you tried? What result did you get?
    And why are you citing a reference for a old, unsupported version of Oracle?
    And why the reference to SQL Developer in your subject line? This has nothing to do with SQL Developer.
    Edited by: EdStevens on Apr 16, 2011 9:15 PM

  • How to create an object using sql*plus?

    Hi,
    I have tried to create an object , but after pressing enter key I could not get SQL command prompt or errors. How to come out from this? Could you help me to find what's wrong.
    SQL> create type course as object(
    2 course_no number(4),
    3 title varchar(35),
    4 credits number(1));
    5
    6
    7
    8
    Thanks.

    Put a slash "/" at the end of the command:
    CREATE TYPE course AS OBJECT (
       course_no   NUMBER (4),
       title       VARCHAR (35),
       credits     NUMBER (1)
    /

  • How to Create an Input Schedule Comparison with Data Using EVDRE

    Hello,
    I try implement the scenario described in "How to Create an Input Schedule Comparison with Data Using EVDRE".
    Once I am using the "Insert Function" from the panel and selecting the EVTIM function Excel crashes (see page 8 How to paper).
    Systems:
    BPC 7.0 NW SP02
    Office 2007
    BPCADminClient and BPCOfficeClient up to date
    Have anyone a solution?
    Thanks
    Oktay

    Hi Oktay -
    This function works in my BPC70NW SP02 system. Your issue might be that you are trying to access a TIME member that does not exist. Please make sure the offset value is a valid dimension member.
    I can confirm that EVTIM does allow the offset for base members (such as 2009.MAY) as well as parent nodes (such as 2009.Q1 or 2008.TOTAL)... BUT...the offset result of the EVTIM function needs to be a valid dimension member!
    Regards,
    Sheldon

  • Create statspack report using sql*developer

    Hello,
    While connecting with PERFSTAT user I can not create statspack report using SQL*Developer:
    @?/rdbms/admin/awrrpt
    Error starting at line 1 in command:
    @?/rdbms/admin/awrrpt
    Error report:
    Unable to open file: "?/rdbms/admin/awrrpt.sql"
    Actually, my problem or question is that how can PERFSTAT user can generate statspack reports from a Client side. What is the other way a non-dba can see the snapshots histroy and generate report (by using perfstat user ) while joing tables or using views?
    Thanks a lot.
    Best Regards

    Hi,
    for awr reports @?/rdbms/admin/awrrpt (you need EE+Diagnostic Pack) there is a solution.
    Grant execute dbms_workload_repository to <user>;
    Grant select_catalog_role to <user>;
    get all SNAP_IDs
    SELECT   TO_CHAR(s.startup_time,'YYYY.MM.DD HH24:MI:SS') INSTART_FMT,
             di.instance_name INST_NAME,
             di.db_name DB_NAME,
             s.snap_id SNAP_ID,
             TO_CHAR(s.end_interval_time,'YYYY.MM.DD HH24:MI:SS') SNAPDAT,
             s.snap_level LVL
    FROM    dba_hist_snapshot s,
             dba_hist_database_instance di
    WHERE   di.dbid = s.dbid
             AND di.instance_number = s.instance_number
             AND Di.Startup_Time = S.Startup_Time
    ORDER BY snap_id desc;
    Select * From Table(Sys.Dbms_Workload_Repository.Awr_Report_Html(DBID, 1, BEGIN_SNAP_ID, END_SNAP_ID));
    For statspack i don't know a solutuion. I think the best idea is, create a job to make the statspack report on the server side and access it via external tables or mail them forward to you.
    Best regards
    Thomas

  • How to create crystal reports using MSDE 2000?

    Post Author: S_Muhilan
    CA Forum: Deployment
    Hi,
    I am using Crystal report 8.5. My Database sqlserver 2000. I generated reports and are working fine.
    Now I want to use MSDE 2000 instead of Sqlserver 2000 due to license factor.
    My application is developed in VB 6. The all the parts of the application is working fine except the report.
    All reports produced Database DLL error.
    So I opened the report and try to verify the database. But it gives pdssql.dll not found. Database error.
    After this error, I tried to create a new report and found that there is no option for MSDE 2000 database selection under more database.
    I usually select Sql server 2000 database under More Database option of location wizard.
    How to create crystal reports using MSDE 2000?
    Is it due to crystal report 8.5 verison problem? I also have crystal report 11 licensed copy.
    Please give me the good solution as early as possible
    RegardsS. Muhilan

    To use the inproc RAS SDK with CR.NET, you'd have to purchase either (1) Crystal Reports XI Release 2 Developer edition, and apply Service Pack 2 or above, or (2) Crystal Reports 2008 (not Crystal Reports Basic that comes with Visual Studio 2008).
    Sincerely,
    Ted Ueda

  • How to create a ztable using program?

    Hi ,
    How to create a ztable using programs for SQL database?
    Can anyone plz explain it with a program!
    Thanks in advance.

    hi,
    Your purpose can be achieved through BDC programming too..
    data:
    t_bdcdata type table of bdcdata with header line.
    start-of-selection.
    perform bdc_dynpro      using 'SAPMSRD0' '0102'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ADD'.
    perform bdc_field       using 'RSRD1-TBMA'
                                  'X'.
    perform bdc_field       using 'RSRD1-TBMA_VAL'
                                  'ztable_demo'.
    perform bdc_dynpro      using 'SAPLSD41' '2200'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=CHANGE_MAINTFLAG'.
    perform bdc_field       using 'DD02D-DDTEXT'
                                  'Ztable'.
    perform bdc_field       using 'DD02D-CONTFLAG'
                                  'A'.
    perform bdc_field       using 'DD02D-MAINFLAG'
                                  'X'.
    perform bdc_dynpro      using 'SAPLSD41' '2200'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=DEF'.
    perform bdc_field       using 'DD02D-DDTEXT'
                                  'Ztable'.
    perform bdc_field       using 'DD02D-CONTFLAG'
                                  'A'.
    perform bdc_field       using 'DD02D-MAINFLAG'
                                  'X'.
    perform bdc_dynpro      using 'SAPLSD41' '2200'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'DD02D-DDTEXT'
                                  'Ztable'.
    perform bdc_field       using 'DD03D-ROLLNAME(01)'
                                  'mandt'.
    perform bdc_field       using 'DD03D-FIELDNAME(01)'
                                  'mandt'.
    perform bdc_field       using 'DD03P-KEYFLAG(01)'
                                  'X'.
    perform bdc_field       using 'DD03P-NOTNULL(01)'
                                  'X'.
    perform bdc_dynpro      using 'SAPLSD41' '2200'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'DD02D-DDTEXT'
                                  'Ztable'.
    perform bdc_field       using 'DD03D-ROLLNAME(02)'
                                  'S_CARR_ID'.
    perform bdc_field       using 'DD03D-FIELDNAME(02)'
                                  'carrid'.
    perform bdc_field       using 'DD03P-KEYFLAG(02)'
                                  'X'.
    perform bdc_field       using 'DD03P-NOTNULL(02)'
                                  'X'.
    perform bdc_dynpro      using 'SAPLSD41' '2200'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'DD02D-DDTEXT'
                                  'Ztable'.
    perform bdc_field       using 'DD03D-ROLLNAME(03)'
                                  'S_CONN_ID'.
    perform bdc_field       using 'DD03D-FIELDNAME(03)'
                                  'connid'.
    perform bdc_dynpro      using 'SAPLSD41' '2200'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SE13'.
    perform bdc_field       using 'DD02D-DDTEXT'
                                  'Ztable'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_dynpro      using 'SAPLSTRD' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'KO007-L_DEVCLASS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TEMP'.
    perform bdc_field       using 'KO007-L_AUTHOR'
                                  'SAPDEV02'.
    perform bdc_dynpro      using 'SAPMSEDS' '0050'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    perform bdc_field       using 'DD09V-TABART'
                                  'APPL0'.
    perform bdc_field       using 'DD09V-TABKAT'
                                  '0'.
    perform bdc_field       using 'ALLOWSTATE-NOT_ALLOWED'
                                  'X'.
    perform bdc_dynpro      using 'SAPMSEDS' '0050'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BACK'.
    perform bdc_field       using 'DD09V-TABART'
                                  'APPL0'.
    perform bdc_field       using 'DD09V-TABKAT'
                                  '0'.
    perform bdc_field       using 'ALLOWSTATE-NOT_ALLOWED'
                                  'X'.
    perform bdc_dynpro      using 'SAPLSD41' '2200'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=WB_ACTIVATE'.
    perform bdc_field       using 'DD02D-DDTEXT'
                                  'Ztable'.
    perform bdc_dynpro      using 'SAPLSEWORKINGAREA' '0205'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=WEIT'.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=NO'.
    perform bdc_dynpro      using 'SAPLSD41' '2200'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=WB_BACK'.
    perform bdc_field       using 'DD02D-DDTEXT'
                                  'Ztable'.
    perform bdc_dynpro      using 'SAPMSRD0' '0102'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BACK'.
    perform bdc_field       using 'RSRD1-TBMA'
                                  'X'.
    perform bdc_field       using 'RSRD1-TBMA_VAL'
                                  'ZTABLE_DEMO'.
    call transaction 'SE11' using t_bdcdata..
    form BDC_DYNPRO  using    value(p_program)
                              value(p_num).
    clear t_bdcdata.
    t_bdcdata-program = p_program.
    t_bdcdata-dynpro = p_num.
    append t_bdcdata.
    endform.                    " BDC_DYNPRO
    form BDC_FIELD  using    value(p_fnam)
                             value(p_fval).
    clear t_bdcdata.
    t_bdcdata-fnam = p_fnam.
    t_bdcdata-fval = p_fval.
    append t_bdcdata.
    endform.                    " BDC_FIELD
    Thanks
    Sharath

  • How to create a custom function module with the records in SAP R/3?

    Hi All,
    How to create a custom function module with the records in SAP R/3? Using RFC Adapter I have to fetch the custom function module records.
    Regards
    Sara

    Hi
    goto se37...here u need to create a function group... then u need to create a function module. inside assign import/export parameters. assign tables/exceptions. activate the same. now write ur code within the function module
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
    Look at the below SAP HELP links, These links will show you the way to create a Function Module
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm

  • How to create a database in sql?

    My question is how to create a database in sql?

    entrant wrote:
    My question is how to create a database in sql?
    as Iam a beginner
    =================================================
    Learning how to look things up in the documentation is time well spent investing in your career.  To that end, you should drop everything else you are doing and do the following:
    Go to  docs.oracle.com.
    Locate the link for your Oracle product and version, and click on it.
    You are now at the entire documentation set for your selected Oracle product and version.
    BOOKMARK THAT LOCATION
    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab (for 10.x) or the "Master Book List" link (for 11.x) you will find the complete documentation library.
    Spend a few minutes just getting familiar with what kind of documentation is available there by simply browsing the titles under the "Books" tab.
    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what kind of information is available there.
    Do the same with the SQL Reference Manual.
    Do the same with the Utilities manual.
    You don't have to read the above in depth.  They are reference manuals.  Just get familiar with what is there to be referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
    Then set yourself a plan to dig deeper.
    - *Read a chapter a day from the Concepts Manual*.
    - Take a look in your alert log.  One of the first things listed at startup is the initialization parms with non-default values. Read up on each one of them (listed in your alert log) in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - *When you have finished reading the Concepts Manual, do it again*.
    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.
    =================================

  • How to Create Shared Storage using VM-Server 2.1 Red Hat Enterprise Linux 5

    Thanks in advance.
    Describe in sequence how to create shared storage for a two guest/node Red Hat Linux Enterprise using Oracle 2.1 VM Server on Red Hat Linux Enterprise 5 using command line or appropriate interface.
    How to create Shared Storage using Oracle 2.1 VM Server?
    How to configure Network for two node cluster (oracle clusterware)?

    Hi Suresh Kumar,
    Oracle Application Server 10g Release 2, Patch Set 3 (10.1.2.3) is required to be fully certified on OEL 5.x or RHEL 5.x.
    Oracle Application Server 10g Release 2 10.1.2.0.0 or 10.1.2.0.1 versions are not supported with Oracle Enterprise Linux (OEL) 5.0 or Red Hat Enterprise Linux (RHEL) 5.0. It is recommended that version 10.1.2.0.2 be obtained and installed.
    Which implies Oracle AS 10.1.2.x is some what certified on RHEL 5.x
    I think it would be better if you get in touch with Oracle Support regarding this .
    Sorry , I am not aware of any document on migration from Sun Solaris to RH Linux 5.2 .
    Thanks,
    Sutirtha

  • How to create an array using reflection.

    How to create an array using reflection.
    I want to achive something like this,Object o;
    o = (Object)(new TestClass[10]);but by use of reflection.
    To create a single object is simple:Object o;
    o = Class.forName("TestClass").newInstance();But how do I create an array of objects, when the class of objects is known only by name? (Can't use Object[] because even though an Object[] array can be filled with "TestClass" elements only, it Cannot be casted to a TestClass[] array)
    Anybody knows?":-)
    Ragnvald Barth
    Software enigneer

    Found it!
    the java.lang.reflect.Array class solves it!
    Yes !!!

  • How to create Handling Unit using Process Order no. & Packing Instruction

    Hi experts,
    Please guide me how to create Handling Unit using Process Order number & Packing Instruction reference?Noramlly this is done using standard transaction 'COWBPACK'.
    ANY FUNCTION MODULE OR BAPI TO DO THIS.
    if any solution please explain with proper example..
    Thanks In advance
    Thanks,
    Yogesh

    Hi experts,
    Please guide me how to create Handling Unit using Process Order number & Packing Instruction reference?Noramlly this is done using standard transaction 'COWBPACK'.
    ANY FUNCTION MODULE OR BAPI TO DO THIS.
    if any solution please explain with proper example..
    Thanks In advance
    Thanks,
    Yogesh

  • How to create web site using STRUTS frame work

    Hi,
    I know how to create web pages using JSP & Servlets.But now i have to create Matrimonial web site using STRUTS frame work.Plz any one guide for me...
    Thank U....

    Struts is not to be confused with JSF.
    Start at their own homepage over there at apache.org.
    Good luck.

Maybe you are looking for

  • How can I download photos from Mac iPhoto? (Programme error)

    With five discs to choose from, and advice to use discs  3-5, I wonder whether I have made a mistake in installation - disc 4 didn't work so I installed 3 and 5, which seemed to be duplicated.  Has this caused the programme error?

  • Can't find the map Digital Editions

    I installed Adobe Digital Editions on mijn computer but I can't use it. When I open the program it says "Can't find the map Digital Editions". Can someone help me? I need this program for my epubs and my e-reader.

  • Run Photoshop script from Bridge

    Hi I have a modified version of Image Processor script in photoshop scripting folder (it saves RAW files as smart objects) and would like to run it from Bridge (apply to selected images). Right now I can run script from File > Scripts Photoshop menu

  • Bridge CS6 doesn't allow access to many of my folders on iMac

    iMac with OS X 10.8.2 and Photoshop & Bridge CS6 and Lightroom 4. When try and access photos via Bridge most of my folders have a little red circle with a minus inside, denying me access to the folders. However, if I use mini Bridge in PS I can acces

  • Stop an Application from Disabling my Screensaver?

    I have an 3rd party application running on my Mac which overrides my screensaver and Energy Saver Display Sleep settings, preventing my screen from ever sleeping or the screensaver from activating. Its a really good Application apart from this single