Query JSON array does not

No idea how to get the following to work?

Thank you

Phil

drop table json;


create table json)

clob json_attr

CONSTRAINT ensure_json_attr CHECK (json_attr IS JSON));


insert into json (json_attr) values

("{'EMPNO': 7369, 7499 (7521) AND}")

"DEPTNO": [20, 30, 30].

"COMM": [0, 300, 500].

'JOB': ['CLERK', 'SELLER', 'SELLER'],

"MGR": 7902, 7698 (7698) AND

'ENAME': ['SMITH', 'ALLEN', 'QUARTER'],

"HIREDATE": ["17 DECEMBER 80", "20 FEBRUARY 81", "22 FEBRUARY 81" "" "],

{"SAL": [800, 1600, 1250]} ");"

SELECT jt.*

JSON,.

JSON_TABLE (json_attr, ' $' [*])

COLUMNS)

EMPNO number PATH ' $. EMPNO',.

ENAME VARCHAR2 PATH ' $. ENAME'

)

) AS jt;

I want him to give:

EMPNO, ENAME

---------- ----------

7369 SMITH

7499 ALLEN

7521 WARD


But she does not return anything.

But she does not return anything.

Obviously

The path expression "$" [*] does not target anything in the document, which has a rather unusual btw.

Is it really the kind of structure, with what you have to deal with?

If so, I think that there is no other way but to use separate JSON_TABLEs to extract each of the array elements and join their return to form columns and relational lines:

SQL> select jt1.empno, jt2.ename
  2  from json t
  3     , json_table(t.json_attr, '$.EMPNO[*]' COLUMNS rid for ordinality, empno number path '$') jt1
  4     , json_table(t.json_attr, '$.ENAME[*]' COLUMNS rid for ordinality, ename varchar2(30) path '$') jt2
  5  where jt1.rid = jt2.rid ;

     EMPNO ENAME
---------- ------------------------------
      7369 SMITH
      7499 ALLEN
      7521 WARD

(Note that the above only works if the table contains a single row, but could be adapted to the condition that the table has some kind of identity)

As said, the following would be much more sympathetic to manage:

[
 {"EMPNO":7369,"DEPTNO":20,"COMM":0,"JOB":"CLERK","MGR":7902,"ENAME":"SMITH","HIREDATE":"17-DEC-80","SAL":800},
 {"EMPNO":7499,"DEPTNO":30,"COMM":300,"JOB":"SALESMAN","MGR":7698,"ENAME":"ALLEN","HIREDATE":"20-FEB-81","SAL":1600},
 {"EMPNO":7521,"DEPTNO":30,"COMM":500,"JOB":"SALESMAN","MGR":7698,"ENAME":"WARD","HIREDATE":"22-FEB-81","SAL":1250}
]

Tags: Database

Similar Questions

  • String in JSON format does not correctly... sometimes

    I use the following (in collaboration with HttpConnectionFactory) to retrieve an our API JSON array:

    public class LocationAPI {
        public static String getHttpResponse(String url){
            HttpConnectionFactory connfac = null;
            HttpConnection conn = null;
            DataInputStream ds = null;
            String response = null;
            try {
                connfac = new HttpConnectionFactory(url);
                conn = connfac.getNextConnection();
    
                if(conn.getResponseCode() == HttpConnection.HTTP_OK){
                    ds = conn.openDataInputStream();
                    byte[] data = new byte[ds.available()];
                    ds.read(data);
                    response = new String(data);
                }else{
                    //http error response code handling
                }
    
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
    
            return response;
        }
    }
    

    The API returns something in the sense of the following:

    {
        "data": [
            {
                "city": "Des Moines",
                "business_logo_url": null,
                "name": "LOUIES FLOOR COVERING INC",
                "phone": "515-243-8608",
                "icon_url": "/site_media/categoryicons/Shopping.png",
                "zipcode": "50312",
                "special_id": null,
                "state": "IA",
                "street": "2709 Ingersoll Ave",
                "special": null,
                "lat": 41.585709999999999,
                "lng": -93.653125000000003,
                "id": 136982,
                "website_url": null
            }
        ],
        "pages": 1,
        "page": 1
    }
    

    Depending on the situation, the query could return to what any one place 50 locations. Then I am parsing out them with the following:

    try {
                JSONObject responseObject = new JSONObject(response);
                JSONArray responseArray = responseObject.getJSONArray("data");
                JSONObject itemObject = responseArray.getJSONObject(0);
    
                responseCity = itemObject.optString("city");
            } catch (JSONException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
    

    If the answer is short enough (I tested it with one place, still trying to find a query which returns both), it works fine. If he shoots Max (50 places), it-error "org.json.me.JSONException: missing value.» 829 character of ".". When I walked through it, I took a glance at the string and it seems to download the part of the answer. Any suggestions as to what I'm missing here?

    Have you tried to hit the API in a browser to see if your server is truncating the answer? In addition, you can try to use

    response = new String(IOUtilities.streamToBytes(ds);
    

    in case the length of the response of statement is not ds.available (), but everything that is currently available for reading (probably the case).

  • [AIR 3.0] New JSON feature does not work in Flashpromanager.new: Error #1065: Variable JSON is not defined

    After the upgrade of the AIR SDK 3.0 in Flash Professional CS5.5, I found a few problems.

    First of all, the JSON class in the library of as3corelib.swc get now a few compile errors:

    1061: call to a possibly undefined method decode a reference of static type Class.

    1172: definition com.adobe.serialization.json:JSON could not be found.

    At first, I was completely puzzled, because I had the good ' import com.adobe.serialization.json.JSON; ' reference.

    and I got the "as3corelib.swc" referenced in my ActionScript properties, so how that was not found?

    Then, I discovered that it is because it is in conflict with the new internal JSON class included in AIR 3.0

    (perhaps it should have been called something else, to avoid conflicts with the own Adobe as3corelib library).

    The new native JSON class's decode() method. It is now called parse()

    OK, so I tried to use the new class JSON, but after changing the decode() with parse() and removing

    the "import com.adobe.serialization.json.JSON; ' reference, Flash tells me that"Variable JSON is not defined.

    Really? The JSON class is displayed in the window pop-up Flash Builder code completion,

    complete with its all new parse() and stringify() methods! So why it say it is not defined?

    Also, my SWF file gets compiled without error at all, so that checks that the new 3.0 libraries are in place.

    I get the error "JSON is not defined" when running in ADL, not at compile time. Why?

    In order to spend in the AIR SDK 3.0, I've followed this guide:

    http://kb2.Adobe.com/CPS/908/cpsid_90810.html

    I know that this is on the upgrade to AIR 2.7, but I guess the steps to switch to AIR 3.0 would be very similar.

    only with the AIR3.0 SDK package, instead of 2.7.

    I also took care of type version = '13' in all the XMLs, instead of version = "12" as indicated in this guide, which is intended to 2.7.

    Also, I followed this advice on the addition of -swf-version = 13 in the properties of the project in Flash Builder window:

    http://blogs.Adobe.com/Cantrell/archives/2011/08/how-to-use-the-air-3-Beta-SDK.html

    But this does not seem to make a difference, because, even if I use Flash Builder for editing code (which is usually used for Flex).

    my project is a Flash Professional project, not a Flex, and when you test the project, Flash Builder works Flash Professional

    to compile, then run adl.exe (it's the same thing that if you click on the option "control / essay film / in the AIR Debug Launcher (Mobile)" within Flash Pro).

    In the window 'settings of ActionScript"in Flash Professional, I also have the good airglobal.swc referenced (from the AIR SDK 3.0).

    and the same airglobal.swc is referenced in Flash Builder as well (in 'referenced libraries') in order to get the correct code completion.

    I tried all sorts of things to try to make it work, but no luck. Still getting the error "JSON is not defined" when running.

    I'm getting desperate in this regard. I'll have to return to AIR 2.7.1 to stop wasting time on this issue.

    BTW, I also have another problem unrelated (though maybe it happens for the same reason as the other problem).

    Now Flash Builder says the method getTime() in my code, as if it was no longer a method of an instance of class Date.

    I have a line where I ask the timestamp like this:

    TS = new Date () .getTime ();

    Worked perfectly well until now with AIR 3.0.

    Now, when hovering the mouse cursor over the orange icon "(?)" appearing to the left, Flash Builder says

    "Access of undefined property getTime. Why?

    Documentation AS3 says nothing about getTime() get depreciated any thing of the kind:

    http://help.Adobe.com/en_US/FlashPlatform/reference/ActionScript/3/date.html

    In fact, in the completion popup code to watch as Flash Builder, now, it is not any mention

    set or get methods, as you can see here:

    http://img836.imageshack.us/img836/4793/dateinstancepopup.png

    I guess I can use property hung up instead of . getTime() but I don't know why I'm getting all the methods I had before.

    Any ideas why this is happenning? Especially the dreaded error 'JSON is not set.

    Well, after a lot of tinkering, I think I've finally found a way to finally make it work!

    I created XML files modified with the profiles required for AIR 3.0 and after many tries, it finally works!

    I downloaded here: http://www.mediafire.com/?d5e761frl5px4

    Here are the steps needed to get AIR 3.0 works correctly:

    1. Place the three files in the folder "c:\Program Files (x 86) \Adobe\Adobe Flash CS5.5\Common\Configuration\Players.
    2. Then, make sure that you have unpacked the AIR SDK 3.0 in the folder "c:\Program Files (x 86) \Adobe\Adobe Flash CS5.5\AIR3.0" do not crush the contents of the folder "AIR2.6", as suggested by the "Overlay AIR SDK" article (linked in the post above). He gave me problems. It is preferable to use another separate folder. My XML files are pointing to this new folder "AIR3.0".
    3. In the folder "c:\Program Files (x 86) \Adobe\Adobe Flash CS5.5\Common\Configuration\ActionScript 3.0 ' create a new folder named"AIR3.0 ". Inside this folder, copy the "airglobal.swc" file located in "c:\Program Files (x 86) \Adobe\Adobe Flash CS5.5\AIR3.0\frameworks\libs\air.
    4. Finally, you will need to keep the file "sample.xml - descriptor ' the ' c:\Program Files (x 86) \Adobe\Adobe Flash CS5.5\AIR2.6\samples" folder, but change the attribute xmlns to 'http://ns.adobe.com/air/application/3.0'.

    Yes, you must change this in the AIR2.6 folder, even if the SDK has been in AIR3.0. It's because of the way the publication settings work in Adobe Flash. It is hardcoded in a DLL, so that cannot be changed. Is not very intuitive.

    I think the AIR SDK installation should be much simpler than that! I know that Adobe AIR is intended for developers, not for end-users, but yet, all these procedures upgrade not well documented are a pain in the *. I lost a LOT of hours in this (more than half a day), with what should be a simple update!

    Adobe should make an SDK installation if we do not have to be tinkering with all these procedures errors whenever a new update is released!

    Well, I hope that these XML files are useful to someone and avoid more frustration.

    Kind regards

    OMA2k

    PD: BTW, I still have the problem of. getTime() described in my post above, but it is not very important.

    because I can still use the property hung up. Yet, it puzzles me why this is happening.

  • Why all the elements of the array does not appear?

    Hello

    I'm learning about the handling of tables.  The example finder includes this one, 'build array_forum.vi', which shows the two modes, concatenate and adding, I understand, HOWEVER, I can't understand how they built this vi.  For example, I can find the Array function to build, but I do not understand how they created the "digital data table 1" "data table 2" digital... etc, and I can't find the functions on the pallets that cause display "build the CONCATENATE entries table". ".  Where are these blue functions?

    Where these functions are found in the palette, and how we build them like that?

    The other vi indicated here, 'for loop array_forum.vi' is my attempt to reproduce, but it doesn't show all the elements of the array; However, it only displays a SINGLE element, the last element of the array.  How can I view all the items in the table I am creating using the FOR LOOP?  I am doing something wrong with the LOOP FOR?

    Thank you

    Dave

    Right-click your scoreboard, uncheck the "Display as icon" and see what happens.  There are two ways of viewing terminals, most of us like the simple point of view, the default value is the display of the icon.

  • dynamic query for package does not work

    Dear members,

    I have problems with a package in the creation and analysis of a dynamic query in the WHERE clause. Here is an example of what I'm trying to do:

    PROCEDURE test_status_proc)
    wtd_cursor ON cur_type
    date_1 IN date
    date_2 IN DATE
    status in VARCHAR2,
    flag in VARCHAR2)

    IS

    status_sql VARCHAR2 (250): = NULL;
    flag_sql Varchar2 (100): = NULL;

    BEGIN


    Status of the IF = 'A' THEN
    lv_status_sql: = 'A ';
    lv_flag_sql: = 'Y ';
    END IF;
    Status of the 'I' = IF THEN
    lv_status_sql: = 'A ';
    lv_flag_sql: = 'n';
    END IF;

    Status of the 'R' = IF THEN
    lv_status_sql: = "R";
    lv_flag_sql: ='* ';
    END IF;

    Status of the IF = n THEN
    lv_status_sql: = 'n';
    lv_flag_sql: ='* ';
    END IF;

    IF status_code = 'IRN' THEN
    "lv_status_sql: = '('' N'','' R'');
    lv_status_sql: = lv_status_sql | ' OR (s.status = s.flag = "A" AND "N")';
    lv_usecalc_sql: ='* ';
    END IF;

    Status of the = IF'* ' THEN
    lv_status_sql: ='* ';
    lv_flag_sql: ='* ';
    END IF;

    OPEN FOR Test_cursor

    SELECT * from test_status s
    WHERE
    s.Daytime BETWEEN date_1 AND date_2
    S.status AND decode (lv_status_sql,'* ', s.status, lv_status_sql)
    S.flag AND decode (lv_flag_sql,'* ', s.flag, lv_flag_sql);

    The problem I have is especially with the condition 'IRN '. The suite WHERE the part of the clause looks like the following in the lv_status_sql, but the query returns all the values:

    -(', 'R') OR (s.status = 'A' AND s.flag =' only)

    Any help would be much appreciated.

    Kind regards

    dreporter wrote:

    Thanks for your reply and I completely understand your frustration. The problem is sometimes it is very difficult to describe all of the problem due to several reasons. Please take a look at my last post to see if that makes sense.

    If you really need SQL dynamic - true dynamic SQL which includes dealing with dynamic number of bind variables - then DBMS_SQL are an excellent interface to use.

    You can generate the dynamic SQL statement based on the question of whether the filter criteria is null (do not use) or not null (use as a predicate). For example

    if someParam10 is not null then
      // someParam10 needs to be used as a filter predicate
      dynamicSQL := dynamicSQL || ' and some_col_10 = :someParam10 ';
    end if;
    

    This statement can then be analyzed using the DBMS_SQL interface. The binding of values uses the same logic that was used to create predicates. For example

    if someParam10 is not null then
      // someParam10 is used and needs to be bound
      DBMS_SQL.Bind( myCursor, 'someParam10', someParam10 );
    end if;
    

    So, with this approach simplistic, you can easily create a dynamic SQL with variable predicates, dynamically bind these and run the slider.

    Bind variables are used in the dynamic SQL statements, as there are very few threats of SQL injection. And the basic principles observed for shareable SQL creation - the same set of parameters not null to filter, will result in the same SQL statement, which allows the cursor within the Pool shared for this SQL statement to be reused.

    So, technically, dynamic SQL is not a major problem (if used correctly). The major problem is that if really necessary to address the requirements of the business at hand.

    The problem I have with many comments here want to use dynamic SQL statements, is that it is used as one would use a file i/o interface.

    For file IO you want standard Open(), Read(), Write() and Close() calls. And you, the appellant, simply pass the name of the file and the data to write or to receive the data read.

    Similarly, these posters want to use SQL to open a table and read and write the data column - and do it by calling simply (and dynamically) by specifying the name of the table and column. Approaches to dynamic SQL based on one such concept is wrong. And shows that much of the ignorance of what a RDBMS is and how to use an RDBMS.

  • JSON.decode does not

    I use the corelib 0.9 version to use JSON.

    It's the chain, I'm trying to decode: {xaxis: ["test1", "test2", "test3", "test4", "test5"]}

    The chain is called strColumns and I use this command: JSON.decode (strColumns)

    This is the full command line: columns: Array = (JSON.decode (strColumns) in the table);

    I want to be able to do this: columns.xaxis [0]; which must be equal to "test1".

    And I get this error:
    Quote:
    Error: Encountered unexpected X
    at com.adobe.serialization.json::JSONTokenizer/parseError()
  • What is the problem with this query? exception does not work.

    DECLARE
    v_employee_id EMPLOYEES. EMPLOYEE_ID % TYPE;
    v_last_name EMPLOYEES. LAST_NAME % TYPE;
    v_salary EMPLOYEES. % SALARY TYPE.
    e_invalid_emp EXCEPTION;
    BEGIN
    SELECT last_name, salary v_employee_id, v_last_name, v_salary, employe_id
    EMPLOYEES where employee_id = & employee_id;

    IF SQL % NOTFOUND THEN
    RAISE e_invalid_emp;
    END IF;

    DBMS_OUTPUT. Put_line(v_employee_id||) e '|| v_last_name | » '|| v_salary);

    EXCEPTION
    WHEN e_invalid_emp THEN
    DBMS_OUTPUT. Put_line ("' employee not found...");
    END;
    /
  • A PL/SQL query among many does not work

    I have a report with search filters and search fields are text fields. I have no problem until I have add in a select list to search by looking for these fields. Once I applied the filter(:P21_COUNTY) to the selection list, it displays the correct information but then all text fields ceases to display the correct information. It works differently if you use a list of selection vs other types of fields? Thank you, Deanna

    There is a sample application on apex.oracle.com
    Workspace: DEANNA2
    Username:DDOVE@KHP. KS.GOV
    Password: Dclipse03

    Page 21

    Login:[email protected]
    Password: Dclipse03

    Deanna:

    This change was made by me. I pulled myself into another thing until I could test the change. Sorry about that.

    CITY

  • Get all the different values in a table - 'or array elements' does not work with I32

    Hello

    I just found out that "array elements or" does not work with a table 1 d of integer values. I didn't expect that.

    I did a semi quick forum search and did not find a pointer to an effective solution. Can someone give me a hint?

    Do not back my initial intention is to list all the values that appear in an array of integers.

    I thought that if I converted the figures for powers of 2 and or I had solved the problem at hand - only to discover that the elements of array does not.

    If someone could propose a different approach, I'd be happy too.

    I should mention that the execution time is a factor here - I need a fast code, but any suggestions are welcome because they could help me get started.

    Best regards Florian

    Hi Florian.

    try this:

    "Function, it seems, the table of GOLD ' is polymorphic (as written in the context-sensitive help), but does not support arrays of I32. At least the error message means just that...

  • Visual Studio Professional 2015, Intellisense in bower.json and package.json does not work.

    I installed VS-2015 professional of the MSDN subscription site. When I tried to create a blank site ASP.NET 5, bower and NPM has failed. The survey, I discovered that there wasn't any NodeJS installed on my system in "C:\Program Files (x 86) \nodejs" (even if I chose NodeJS Joyent characteristic during the installation, but the node, NPM and everything has been installed in C:\Program Files (x 86) \Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External). So I installed on the site of NodeJS NodeJS and NPM has started working.

    But in bower.json and package.json intellisense does not work.

    In field, intellisense for the name of the package is now working but for version it still does not. that is, to say I type the name of the package and there is no intellisense when you type the name of the package, if release version inteliisense say the latest stable version.

    Bower.JSON package name intellisense or release version intellisense is available. I have to type the package name and version it displays ' *' only.

    Other people in my team also faced with the same question. Would anyone please be able to help me solve this problem of intellisense for the name of the package as well as regards the final version?

    ------------------------------------------------------------------------------------------------------------------------------------------------------

    Note: after installation of NodeJS NodeJS site, restoration of package started working; only intellisense in file json does not work.

    I tried to install Git for windows as well (bower for troubleshooting site they say to install mysysgit and add it to the path variable) so I install the Git and added the location in the path variable. But still, intellisense did not.

    So, I did the following:

    1 set up Git to use http instead of git: / / with Git Bash

    git config--global url. ' http://".insteadOf git: / /.

    VS configured to use the new Git installed on VS Git

    Right click on folder Bower (under dependencies), and then select "Configure external tools", Unchecked "$(PublicAssemblies%) \Extensions\Microsoft\Web Tools\External\git" and adds a new node with "C:\Program Files (x 86) \Git\bin.

    Restarted the VS and intellisense worked still do not.

    Update 1: I installed Bower with the MUSEUM and after restarting VS several times, release version intellisense started working for bower.json! Then I uninstalled the Arbour (which I installed via NGP) and version intellisese version still works... It's a cause strange scenario now we can't say for certainty that Bower via NGP installation solved the problem like after UN-installing intellisense works always. Although I still do not get the package named by Intellisense. !!!

    ------------------------------------------------------------------------------------------------------------------------------------------------------

    It has become a real nightmare in collaboration with Arbor and NPM in Visual Studio 2015. Help, please!

    Thanks and greetings

    Arun Kumar Dubey

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)
    *
  • "Error running query: the real member does not exist in the application.

    Hi all

    I have a HFM EN users need to run, but somehow they started getting this error "error running query: real member does not exist in the application". I traced their levels of access to mine, and I am able to run the same report without any problem but the user still getting the same error. what may be the possible cause. Please help me so that I can ensure the debugging.

    Thank you

    Zitouni

    I was able to solve this problem by checking the user of security principals class was trying to run the report for. The user did not have acesss on the class of the said security and change all, solve the problem.

    Thanks, Sattu

  • Query based ViewObject does pull not all attributes, when the query has 'WITH' clause

    Hello

    12.1.2 and 12.1.3 JDeveloper

    When we try to create a custom query based ViewObject, and the query clause of "with."

    So not all the columns selected in the query are appearing as attributes of the View object in the wizard.

    This is the query. And it performs very well in Toad.

    WITH dept_count AS)

    SELECT department_id, COUNT (*) AS dept_count

    Employees

    GROUP BY department_id)

    SELECT e.first_name AS employee_name,

    DC1.dept_count AS emp_dept_count,

    m.first_name AS manager_name,

    DC2.dept_count AS mgr_dept_count

    E employees,

    dept_count dc1,

    m employees,

    dept_count dc2

    WHERE e.department_id = dc1.department_id

    AND e.manager_id = m.employee_id

    AND m.department_id = dc2.department_id;

    Only the EmployeeName attribute is extracted from the query. It does not show the rest of the attributes in the VO Wizard.

    VO.png

    (I also tried to create a VO from the EntityObject class and make it editable as false, even in this case all attributes are not displayed.)

    I was wondering if something changed in 12 c?

    It works in 11.1.1.7

    (A friend of mine just asked me this).

    Thanks for any help.

    Sameer

    Jdev dislikes the syntax

    You can rewrite as

    SELECT e.first_name AS employee_name,

    DC1.dept_count AS emp_dept_count,

    m.first_name AS manager_name,

    DC2.dept_count AS mgr_dept_count

    E employees,

    (

    SELECT department_id, COUNT (*) AS dept_count

    Employees

    GROUP BY department_id) dc1,.

    m employees,

    (

    SELECT department_id, COUNT (*) AS dept_count

    Employees

    GROUP BY department_id) dc2

    WHERE e.department_id = dc1.department_id

    AND e.manager_id = m.employee_id

    AND m.department_id = dc2.department_id

    who must work and give you the same result.

    Timo

  • Search does not work after inserting

    Hi there again.

    Now, I have a new problem.

    I have a button which allows me to add that a new record that works correctly, the bug I have is that once I have create a new record and save, when I try to change any record I entered previously, don't see the info on the screen, but the query is running and it does not return the info.

    How to create the new line with a method something like this:

        solicitudVOImpl vo = getsolicitudVO1();
                    vo.initQuery();
                                  
                    OAViewObject voh = (OAViewObject)getsolicitudVO1();
                    Row row = null;
                      if (vo.getRowCount() == 0) {
                            System.out.println("Creo header");
                            voh.setMaxFetchSize(0);
                           row = voh.createRow();
                           //insert row into view object
                           voh.insertRow(row);
                           //in order to keep row state, set it as initialized.
                           row.setNewRowState(Row.STATUS_INITIALIZED);
                           row.setAttribute("PersonIdColaborador", Integer.parseInt(PersonIdColaborador)); 
                           row.setAttribute("TipoSolicitud", tipoSolicitud);
                           row.setAttribute("Estado","ING");
                       }else{
                            row = voh.first();
                       }
    

    And when it's done and registration information has been captured, I press another button called save witch calls the method to apply.

      public void apply()
        {
          getTransaction().commit();
        }
    

    So when I do the research I do the following:

    public void search(String idSolicitudDetalle){
                System.out.println("Revisa el info detalle");
                solicitudDVOImpl voh = getsolicitudDVO1();
                voh.initQuery(idSolicitudDetalle);
                if(voh == null){
                    throw new OAException("Error: La implementacion es vacia");
                }
            }
    

    It runs the query, but it does not show in the area, just with the news since the last record, I created.

    Thanks to advce to all help. !

    Hi, after 2 days of trying, testing and research I found the AJ solution!
    The solution is here in this tutorial: Java Based Technology Sushant Blog: 7 Simple in the OPS Search Page

    If the search method has ended looking for something like this:

    public void search(String idSolicitudDetalle){
                System.out.println("Revisa el info detalle");
                solicitudDVOImpl voh = getsolicitudDVO1();
                voh.setMaxFetchSize(-1);//Added this line
                voh.initQuery(idSolicitudDetalle);
                if(voh == null){
                    throw new OAException("Error: La implementacion es vacia");
                }
    }
    

    For one reason or another when I created a new record for the time when I did the search, he maintained the last value and was not running the query, so it looked like it wasn't working, and when I cleared the cache gave me and a null pointer exception. What was weird.

    If it works right away and the explanation for this was and I quote:

    As we find on all VO operation, we mainly use the vo.setMaxFetchSize(-1) before running the query. This means that retrieves all the records for this query. Sushant-

    The source is here: you please explain this! - technology - OA Framework

    I still haven't entirely understad why you can't just run the query and change it, but I guess that is something related to the freamework.

    Any ways thanks AJ for the time, and also Sushant explain why we use the setMaxFetchSize (0) in the same answer, and I quote:

    While creating a new line, we use vo.setMaxFetchSize (0). This means we do not want to pick up documents instead, we want to create a new line. Sushant-

    So I hope this can help someone with the same situation I was.

    Thank AJ, and I want to say =)!

  • order by desc or ASC does not work with rownum

    SQL> desc offer
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     OFFER_ID                                  NOT NULL NUMBER(14)
     DOMAIN_ID                                          NUMBER(14)
     OFFERDATE                                          TIMESTAMP(0)
     CONTACTPERSON                                      VARCHAR2(36)
     EMAIL                                              VARCHAR2(50)
     TEL                                                VARCHAR2(23)
     CATEGORY                                           NUMBER(2)
     AMOUNT                                             NUMBER(5)
     STATUS                                             NUMBER(2)
    
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  select to_char(offerdate,'dd-Mon-yyyy'),
      2     offer_id,
      3     amount
      4  from
      5     offer
      6  where
      7     domain_id=1
      8     and amount is not null
      9* order by offerdate desc
    SQL> /
    
    TO_CHAR(OFF   OFFER_ID     AMOUNT
    ----------- ---------- ----------
    27-Apr-2010          4         55
    26-Apr-2010          5         45
    26-Apr-2010          3         50
    26-Apr-2010          2         45
    
    /*****These may be Ten thousand rows*****/
    When you add a'm rownum < 2 order by asc or desc in my query, then it does not work.
    SQL> ed
    Wrote file afiedt.buf
    
      1  select to_char(offerdate,'dd-Mon-yyyy'),
      2     offer_id,
      3     amount
      4  from
      5     offer
      6  where
      7     domain_id=1
      8     and amount is not null
      9  and
     10     rownum<2
     11* order by offerdate desc
    SQL> /
    
    TO_CHAR(OFF   OFFER_ID     AMOUNT
    ----------- ---------- ----------
    26-Apr-2010          5         45
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  select to_char(offerdate,'dd-Mon-yyyy'),
      2     offer_id,
      3     amount
      4  from
      5     offer
      6  where
      7     domain_id=1
      8     and amount is not null
      9  and
     10     rownum<2
     11* order by offerdate asc
    SQL> /
    
    TO_CHAR(OFF   OFFER_ID     AMOUNT
    ----------- ---------- ----------
    26-Apr-2010          5         45
    I just want to display a disc of DB offerDate wise

    Thank you in anticipation

    Try this

    select to_char(offerdate,'dd-Mon-yyyy'),
           offer_id,
           amount
        from(
        select to_char(offerdate,'dd-Mon-yyyy'),
           offer_id,
           amount
        from
    
           offer
        where
           domain_id=1
           and amount is not null
    
           order by offerdate asc)
    where  rownum<2
    

    Published by: user12984479 on April 27, 2010 04:34

  • Web service JSON data do not return does not

    I created an application with a test sample local (active forlder) json file called "contacts.json" as below, just to test if I have any return data. The data returned in a listview without problem.

    [{ "id":1, "firstname": "Mike", "lastname": "Chepesky", "title": "Sr. Editor",
      "image": "images/data/mike_chepesky.png", "active": true, "gender": "m" },
    { "id":2, "firstname": "Westlee", "lastname": "Barichak", "title": "Talent Scout",
      "image": "images/data/westlee_barichak.png", "active": true, "gender": "m" }]
    

    I then changed the source for 'http://... '. "a link is valid and I checked, and it returns the data in a classic web browser (firefox). But he won't be in my application.

    What I noticed, is that the difference between the local json file and the return of web service, the web service does not return the square brackets "[...]" the json... I suspect that maybe that's the problem? If so, how do I manipulate the data source in my application to incorporate media? Is the returned data (without brackets) real...

    {"status":"successful","current_version":"1.1.1","latest_version":"1.2.0.0","details":"1. Item A 2. Item B 3. Item C","type":"Force update"}
    

    Thank you.

    If I'm not wrong, your local file json contains an array of objects, and that you load from your server contains a single object.
    If so, you can not call insertList (data), use insert (data)

Maybe you are looking for

  • update of the iOS 10.0.2 - 0 Bars No. Service

    I have an iPhone running iOS 10.0.2 5. Since I've upgraded to iOS 10.0.2 I got 0 carrier bar in the upper left to left of my carrier (Verizon), which means that I can't send or receive phone calls. I tried restarting the phone, reset my network setti

  • For Macbook Pro 15-R screen cleaner

    Any who do not recommend a good cleaner course or way own macbook pro screen, that is for sure. Thanks for your help

  • How to separate data in 'several Information.vi tone "?

    NOTE: I have another post on this subject. Here is the link.----------------------------------------------------------------------------------- My ultimate goal is to get/display of the frequency at which the peaks that passes. I've used different me

  • Why I get no internet on my Windows RT Touchcover Surface

    "tHi." I just got this laptop touchcover and my router has got me hooked with the internet, but I can't access my email addresses. I then try and click Open a Microsoft account and nothing happens.  Very frustrating. Concerning Bill

  • BI Publisher report dissemination outside the office network (10g)

    Hi allI have a report that must be mailed to customers on an ad hoc basis (for example, statement of account). Mail server details have been entered and I am able to send a mail to my ID with the address of the sender as: ' bipublisher-report@oracle.