JSON - Map data Order issue

Hi,
I am creating a JSON Object from the following code...Code is creating JSON perfect but not prinitng in order in which i am entering the data see below the output
JSONArray product = new JSONArray();
JSONObject jsonObj = null;
while (iterator.hasNext())
                msg=(Product)iterator.next();
                map = new HashMap();
                         map.put("id", msg.getId());
                map.put("description", msg.getDescription());
                map.put("price", msg.getPrice());
                map.put("category", msg.getCategory());
                jsonObj= new JSONObject(map);
                jsonArray.put(jsonObj);
Actual Output
{"price":5.75,"description":"Lamp","category":"Accessories","id":"AA0079456BK"}
Expected Output
{"id":"AA0079456BK","description":"Lamp","price":5.75,"category":"Accessories"}
I have tried both Hashmap and TreeMap but same result....MAP is not returning the value in order in which i am entering the data..
I also tried LinkedHashMap() but same issue exist wheras if i try to print value using iterator it prints in correct order
for (Iterator it=map.keySet().iterator(); it.hasNext(); ) {
                  Object key = it.next();
                  Object value = map.get(key);
                  System.out.println(key +"="+value);
Output
id=AP98784511K
description=Sofa
price=22.79
category=Living
Please help..
Regards,
Edited by: bunty_india on Mar 26, 2008 2:29 PM
Edited by: bunty_india on Mar 26, 2008 2:31 PM

In all cases returning iterator is a bad way to get order of objects what You expected!
Try to store them into ArrayList<BaseObject> . The BaseObject would store title and obect pair(Ex "description" and msg.getDescription()).
And then simply call arraylist.add(BaseObject).
In second loop get your expected value as arraylist.get(i) .

Similar Messages

  • NSStream data order?

    Hello,
    I'm writing a server-client application. On the server side, I use low-level BSD-sockets and on the client side, I use NSStream. The server sends data in a loop as follows: int1, int2, ... intk, char( intk ).
    In the last two steps I send a file: first it's size and then the file. I use TCP connection on server side. Everything works fine for about 30-40 secs, but then the client throws an error. I debugged for the error and it turned out that the integers aren't always recieved in the order they were sent by the server. For example the server sends: 34, 58, 42, 230, char( 230 ) and the client receives 34, 42, 230, 58, char( 58 ). The error occurs in the last step, where the client expects a file with size of 58 instead of 230. My question is: NSStream cannot guarantee that the data is received in the order they were sent?
    Thanks,
    Pete
    Message was edited by: Peter Becker

    Peter Becker wrote:
    I send them like this from Windows:
    result = send( ClientSocket, ( const char * ) &int1, sizeof( int ), 0 );
    I don't make any conversion, I think it is handled automatically.
    It isn't.
    Why do you think the byte order is relevant for the data order issue?
    Because what you describe really sounds like a byte order issue.
    I got my ints correctly, the numbers I receive are the same that I send. They just don't come in the right order. Is this a wrong approach to pair a regular low-level TCP server with a high-level NSStream client?
    (FYI: I moved on to use CFSocket instead of NSStream and it works fine. My problem is solved, but I'm still courious what the problem could be with NSStream.)
    NSStream isn't very hight level at all. It is just an Objective-C wrapper around file descriptors and select. There is no problem with NSStream. If you posted more code, it might be possible to see where the error lies.
    The code that you have posted is wrong. You should always convert integers to network byte order before sending. Otherwise, your program will fail on a PPC machine regardless of whether you use CFSocket or NSStream.
    I understand what you are saying about the ints being correct, but in the wrong order. That, by itself, doesn't sound like a byte order issue, but there is no way to tell for certain. If you switch from one API to another and it starts working, it doesn't mean there is some problem with a 20-year old API like NSStream, it means there is a problem with your 2-week old code.

  • I recently synced some old photos onto my ipod touch and they briefly appeared on google maps in geographical/time date order. Couldnt bring it back up after Id logged out. id like to be able to do it again, any suggestions?

    I recently synced some old photos onto my ipod touch and they briefly appeared on google maps in geographical/time date order. Couldnt bring it back up after Id logged out. id like to be able to do it again, any suggestions?

    Have you tried the following document, kohida?
    [What to do when Windows displays a blue screen error message or restarts when syncing the iPhone or iPod touch|http://support.apple.com/kb/TS1502]

  • How to get material's last posting date of issuing to production order?

    Hi,
    In my scenario, I need to get material's last posting date of issuing to production order (e.g. mov. typ. 261).
    I tried to select the material documents whose movement type is 261, and restrict the posting date from month to month each time, until the first material document is selected.
    But this method seems quite inefficient.
    What kind of algorithm is more effient to do this?
    Thanks
    Wesley

    Hi,
    select max( budat )
      from mkpf
      into gv_budat
      where mblnr in ( select mblnr
                         from aufm
                        where aufnr = gv_aufnr "(Prod. Order)
                            and  matnr = gv_matnr "(Issued Material)
                            and bwart = '261' ).
    Edited by: Azeem Ahmed Matte on Mar 12, 2010 12:33 PM

  • Apple Watch Pre-Order Issues?

    Any one have any pre-order issues?

    Oh well,
    Apple knew by suggesting to favorite watches on folks online accounts that would give Apple a perspective of what to make more of and prepare for.
    Now Apple is making thousands of watches a day and thanks to pre-orders they have an even better idea of what watches to make more of, faster and where to send them. Or out of the watches already made they know where to send them and what type to send.
    This is a very personal item that required a special touch in manufacturing and then the matching up types and colors of bands to colors and types of metal that is not easy. The thought of the parameters of logistics all on it's own is a nightmare too. So if my delivery date says 4-6 weeks I consider myself to be lucky. 
    Just think some one at a manufacturing plant may be boxing your watch right now and placing it on a stack that is to be shipped to your point on a map.

  • In the last 36 hours my photos have jumbled within various albums. Random photos have attached at the end of an unrelated album, old photos have appeared again on Recently Added, some photos are missing but still on "collections". No date order

    Within the last 36 hours my photo albums have turned into a real jumbled mess. Random photos have appeared at the bottom of my Recently Added album. In most cases it's a copy of a photo that was taken months or years ago so now it appears twice.. 200 random photos have appeared in an unrelated album.  Some photos are missing completely. The date order is correct in some places and then it goes back and forth over the months and years. The "collections" appears to be okay.  This morning when I went into the photo app About 50 photos that were permanently deleted 3 months ago reappeared on the Recently Added Album which  I deleted again.  if  I delete these irreplaceable photos from the unwanted album it will delete the photo completely. Help please - this is so annoying and frustrating. I hate to think when I turn the iPad on tmoor row what else will have changed .

    Quick Update:
    I usually have my Mac laptop up with Messages running on it.  As you know, it will receive the same messages you send/receive on your iPhone.  I thought all my old photos would be there too, but they have all disappeared as well except for the last few.
    Messages is supposed to archive all old photos to  a directory called ~/Library/Messages/Attachments.  On my mac, this was a 0 byte file that was created back in Jan 2014.  As a result, none of the old photos got saved on my Messages app either.  I looked at a Time Machine Backup and it has been the case since September (no earlier backups available).  So, it's unclear how long this issue has been going on for my Messages app and how related it is to my iPhone problem.
    In any case, if any of you use Messages, you may be able to recover your photos in that directory provided it didn't get trashed like mine did.  I moved the file and created a new Attachments directory.  Upon relaunch, Messages started properly storing new photos in there again.
    Either there was a really terrible bug in the Apple software or something malicious has happened.
    P.S.  I'm running OS 10.9.5 Mavericks.   There is a thread of people with this problem on Yosemite here:
    No pictures are shown in Message om Mac
    This seems like a pretty seriously terrible bug.  I will be talking again to AppleCare on Wednesday and I hope they can escalate this.

  • List View Bound to XML Map Data

    HI Have a list view that is bound to xml mapped data.  It seems that on connection refresh that new data is not being updated into the SWF.  My Binding is directly onto the cell ranges that are mapped into excel, so on updates the size of the maped table changes/rewrites over the old data.
    When I refresh I am not picking up the newest data in the list view.  Any thoughts on this on how I can fix.
    Regards,
    Mark

    Thank you Ganesh, but I am not on Enterprise edition.  I am successfully bringing in live xml data, however mapping more than one Query result from one xml file is giving my project some problems.  Refreshing a list View I think is causing this issue.  From within my project in design view I can Refresh the data.
    When I publish the file to html/SWF when I refresh other components are refreshing but the list view and one other is not refreshing.....

  • ORA-01403 No Data Found Issue

    Hi,
    Im very new to streams and having a doubt regarding ORA-01403 issue happening while replication. Need you kind help on this regard. Thanks in advance.
    Oracle version : 10.0.3.0
    1.Suppose there are 10 LCRs in a Txn and one of the LCR caused ORA-01403 and none of the LCRs get executed.
    We can read the data of this LCR and manually update the record in the Destination database.
    Eventhough this is done, while re-executing the transaction, im getting the same ORA-01403 on the same LCR.
    What could be the possible reason.
    Since, this is a large scale system with thousands of transactions, it is not possible to handle the No data found issues occuring in the system.
    I have written a PL/SQL block which can generate Update statements with the old data available in LCR, so that i can re-execute the Transaction again.
    The PL/SQL block is given below. Could you please check if there are any issues in this while generating the UPDATE statements. Thank you
    /* Formatted on 2008/10/23 14:46 (Formatter Plus v4.8.7) */
    --Script for generating the Update scripts for the Message which caused the 'NO DATA FOUND' error.
    DECLARE
    RES NUMBER; --No:of errors to be resolved
    RET NUMBER; --A number variable to hold the return value from getObject
    I NUMBER; --Index for the loop
    J NUMBER; --Index for the loop
    K NUMBER; --Index for the loop
    PK_COUNT NUMBER; --To Hold the no:of PK columns for a Table
    LCR ANYDATA; --To Hold the Logical Change Record
    TYP VARCHAR2 (61); --To Hold the Type of a Column
    ROWLCR SYS.LCR$_ROW_RECORD; --To Hold the LCR caused the error in a Txn.
    OLDLIST SYS.LCR$_ROW_LIST; --To Hold the Old data of the Record which was tried to Update/Delete
    NEWLIST SYS.LCR$_ROW_LIST;
    UPD_QRY VARCHAR2 (5000);
    EQUALS VARCHAR2 (5) := ' = ';
    DATA1 VARCHAR2 (2000);
    NUM1 NUMBER;
    DATE1 TIMESTAMP ( 0 );
    TIMESTAMP1 TIMESTAMP ( 3 );
    ISCOMMA BOOLEAN;
    TYPE TAB_LCR IS TABLE OF ANYDATA
    INDEX BY BINARY_INTEGER;
    TYPE PK_COLS IS TABLE OF VARCHAR2 (50)
    INDEX BY BINARY_INTEGER;
    LCR_TABLE TAB_LCR;
    PK_TABLE PK_COLS;
    BEGIN
    I := 1;
    SELECT COUNT ( 1)
    INTO RES
    FROM DBA_APPLY_ERROR;
    FOR TXN_ID IN
    (SELECT MESSAGE_NUMBER,
    LOCAL_TRANSACTION_ID
    FROM DBA_APPLY_ERROR
    WHERE LOCAL_TRANSACTION_ID =
    '2.85.42516'
    ORDER BY ERROR_CREATION_TIME)
    LOOP
    SELECT DBMS_APPLY_ADM.GET_ERROR_MESSAGE
    (TXN_ID.MESSAGE_NUMBER,
    TXN_ID.LOCAL_TRANSACTION_ID
    INTO LCR
    FROM DUAL;
    LCR_TABLE (I) := LCR;
    I := I + 1;
    END LOOP;
    I := 0;
    K := 0;
    dbms_output.put_line('size >'||lcr_table.count);
    FOR K IN 1 .. RES
    LOOP
    ROWLCR := NULL;
    RET :=
    LCR_TABLE (K).GETOBJECT
    (ROWLCR);
    --dbms_output.put_line(rowlcr.GET_OBJECT_NAME);
    PK_COUNT := 0;
    --Finding the PK columns of the Table
    SELECT COUNT ( 1)
    INTO PK_COUNT
    FROM ALL_CONS_COLUMNS COL,
    ALL_CONSTRAINTS CON
    WHERE COL.TABLE_NAME =
    CON.TABLE_NAME
    AND COL.CONSTRAINT_NAME =
    CON.CONSTRAINT_NAME
    AND CON.CONSTRAINT_TYPE = 'P'
    AND CON.TABLE_NAME =
    ROWLCR.GET_OBJECT_NAME;
    dbms_output.put_line('Count of PK Columns >'||pk_count);
    DEL_QRY := NULL;
    DEL_QRY :=
    'DELETE FROM '
    || ROWLCR.GET_OBJECT_NAME
    || ' WHERE ';
    INS_QRY := NULL;
    INS_QRY :=
    'INSERT INTO '
    || ROWLCR.GET_OBJECT_NAME
    || ' ( ';
    UPD_QRY := NULL;
    UPD_QRY :=
    'UPDATE '
    || ROWLCR.GET_OBJECT_NAME
    || ' SET ';
    OLDLIST :=
    ROWLCR.GET_VALUES ('old');
    -- Generate Update Query
    NEWLIST :=
    ROWLCR.GET_VALUES ('old');
    ISCOMMA := FALSE;
    FOR J IN 1 .. NEWLIST.COUNT
    LOOP
    IF NEWLIST (J) IS NOT NULL
    THEN
    IF J <
    NEWLIST.COUNT
    THEN
    IF ISCOMMA =
    TRUE
    THEN
    UPD_QRY :=
    UPD_QRY
    || ',';
    END IF;
    END IF;
    ISCOMMA := FALSE;
    TYP :=
    NEWLIST
    (J).DATA.GETTYPENAME;
    IF (TYP =
    'SYS.VARCHAR2'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETVARCHAR2
    (DATA1
    IF DATA1 IS NOT NULL
    THEN
    UPD_QRY :=
    UPD_QRY
    || NEWLIST
    (J
    ).COLUMN_NAME;
    UPD_QRY :=
    UPD_QRY
    || EQUALS;
    UPD_QRY :=
    UPD_QRY
    || ' '
    || ''''
    || SUBSTR
    (DATA1,
    0,
    253
    || '''';
    ISCOMMA :=
    TRUE;
    END IF;
    ELSIF (TYP =
    'SYS.NUMBER'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETNUMBER
    (NUM1
    IF NUM1 IS NOT NULL
    THEN
    UPD_QRY :=
    UPD_QRY
    || NEWLIST
    (J
    ).COLUMN_NAME;
    UPD_QRY :=
    UPD_QRY
    || EQUALS;
    UPD_QRY :=
    UPD_QRY
    || ' '
    || NUM1;
    ISCOMMA :=
    TRUE;
    END IF;
    ELSIF (TYP =
    'SYS.DATE'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETDATE
    (DATE1
    IF DATE1 IS NOT NULL
    THEN
    UPD_QRY :=
    UPD_QRY
    || NEWLIST
    (J
    ).COLUMN_NAME;
    UPD_QRY :=
    UPD_QRY
    || EQUALS;
    UPD_QRY :=
    UPD_QRY
    || ' '
    || 'TO_Date( '
    || ''''
    || DATE1
    || ''''
    || ', '''
    || 'DD/MON/YYYY HH:MI:SS AM'')';
    ISCOMMA :=
    TRUE;
    END IF;
    ELSIF (TYP =
    'SYS.TIMESTAMP'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETTIMESTAMP
    (TIMESTAMP1
    IF TIMESTAMP1 IS NOT NULL
    THEN
    UPD_QRY :=
    UPD_QRY
    || ' '
    || ''''
    || TIMESTAMP1
    || '''';
    ISCOMMA :=
    TRUE;
    END IF;
    END IF;
    END IF;
    END LOOP;
    --Setting the where Condition
    UPD_QRY := UPD_QRY || ' WHERE ';
    FOR I IN 1 .. PK_COUNT
    LOOP
    SELECT COLUMN_NAME
    INTO PK_TABLE (I)
    FROM ALL_CONS_COLUMNS COL,
    ALL_CONSTRAINTS CON
    WHERE COL.TABLE_NAME =
    CON.TABLE_NAME
    AND COL.CONSTRAINT_NAME =
    CON.CONSTRAINT_NAME
    AND CON.CONSTRAINT_TYPE =
    'P'
    AND POSITION = I
    AND CON.TABLE_NAME =
    ROWLCR.GET_OBJECT_NAME;
    FOR J IN
    1 .. NEWLIST.COUNT
    LOOP
    IF NEWLIST (J) IS NOT NULL
    THEN
    IF NEWLIST
    (J
    ).COLUMN_NAME =
    PK_TABLE
    (I
    THEN
    UPD_QRY :=
    UPD_QRY
    || ' '
    || NEWLIST
    (J
    ).COLUMN_NAME;
    UPD_QRY :=
    UPD_QRY
    || ' '
    || EQUALS;
    TYP :=
    NEWLIST
    (J
    ).DATA.GETTYPENAME;
    IF (TYP =
    'SYS.VARCHAR2'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETVARCHAR2
    (DATA1
    UPD_QRY :=
    UPD_QRY
    || ' '
    || ''''
    || SUBSTR
    (DATA1,
    0,
    253
    || '''';
    ELSIF (TYP =
    'SYS.NUMBER'
    THEN
    RET :=
    NEWLIST
    (J
    ).DATA.GETNUMBER
    (NUM1
    UPD_QRY :=
    UPD_QRY
    || ' '
    || NUM1;
    END IF;
    IF I <
    PK_COUNT
    THEN
    UPD_QRY :=
    UPD_QRY
    || ' AND ';
    END IF;
    END IF;
    END IF;
    END LOOP;
    END LOOP;
    UPD_QRY := UPD_QRY || ';';
    DBMS_OUTPUT.PUT_LINE (UPD_QRY);
    --Generate Update Query - End
    END LOOP;
    END;

    Thanks for you replies HTH and Dipali.
    I would like to make some points clear from my side based on the issue i have raised.
    1.The No Data Found error is happening on a table for which supplemental logging is enabled.
    2.As per my understanding, the "Apply" process is comparing the existing data in the destination database with the "Old" data in the LCR.
    Once there is a mismatch between these 2, ORA-01403 is thrown. (Please tell me whether my understanding is correct or not)
    3.This mismatch can be on date field or even on the timestamp millisecond as well.
    Now, the point im really wondering about :
    Some how a mismatch got generated in the destination database (Not sure about the reason) and ORA-01403 is thrown.
    If we could update the Destination database with the "Old" data from LCR, this mismatch should be resolved isnt it?
    Reply to you Dipali :
    If nothing is working out, im planning to put a conflict handler for all tables with "OVERWRITE" option. With the following script
    --Generate script for applying Conflict Handler for the Tables for which Supplymentary Logging is enabled
    declare
    count1 number;
    query varchar2(500) := null;
    begin
    for tables in (
    select table_name from user_tables where table_name IN ("NAMES OF TABLES FOR WHICH SUPPLEMENTAL LOGGING IS ENABLED")
    loop
    count1 := 0;
    dbms_output.put_line('DECLARE');
    dbms_output.put_line('cols DBMS_UTILITY.NAME_ARRAY;');
    dbms_output.put_line('BEGIN');
    select max(position) into count1
    from all_cons_columns col, all_constraints con
    where col.table_name = con.table_name
    and col.constraint_name = con.constraint_name
    and con.constraint_type = 'P'
    and con.table_name = tables.table_name;
    for i in 1..count1
    loop
    query := null;
    select 'cols(' || position || ')' || ' := ' || '''' || column_name || ''';'
    into query
    from all_cons_columns col, all_constraints con
    where col.table_name = con.table_name
    and col.constraint_name = con.constraint_name
    and con.constraint_type = 'P'
    and con.table_name = tables.table_name
    and position = i;
    dbms_output.put_line(query);
    end loop;
    dbms_output.put_line('DBMS_APPLY_ADM.SET_UPDATE_CONFLICT_HANDLER(');
    dbms_output.put_line('object_name => ''ICOOWR.' || tables.table_name|| ''',');
    dbms_output.put_line('method_name => ''OVERWRITE'',');
    dbms_output.put_line('resolution_column => ''COLM_NAME'',');
    dbms_output.put_line('column_list => cols);');
    dbms_output.put_line('END;');
    dbms_output.put_line('/');
    dbms_output.put_line('');
    end loop;
    end;
    Reply to u HTH :
    Our Destination database is a replica of the source and no triggers are running on any of these tables.
    This is not the first time im facing this issue. Earlier, we had to take big outage times and clear the Replica database and apply the dump from the source...
    Now i cant think about that situation.

  • Nokia Maps not loading any new maps data on the fl...

    Hi,
    Just posted a thread on City lens not working properly with Maps, but now I notice that Maps seems to have problems of its own: without Wifi, I can't use satellite maps or indoors maps. As a matter of fact, even the plain vanilla street maps mode seems to work only because I've downloaded offline maps for my country. If try to zoom in on a neighbouring country without wifi, no detailed maps load.
    Nokia Drive doesn't seem to have this limitation, it will happily load detailed maps data over the air too. Using Lumia 920, original firmware, and Maps version 3.1.177.8.
    This can't be by design, or can it?

    Some more interesting symptoms from this issue:
    After restarting the phone, if I immediately launch Maps or City Lens, I can enjoy a short moment (maybe a minute or two) of having the features work over cellular data connection.
    The non-functionality of these features seems to correlate with how the Dialer tile on the start screen identifies my network (only medium-size or large tile will show the name). If the tile reads "Saunalahti" (the name of my operator), everything will work as it should. Some minutes after booting the id changes to "Oma verkko" (="Own network"), at which point cellular connection seems to stop working, but only for these very specific use cases. I can happily use IE10 or other apps which require data connection even with WiFi off.
    If I go to Settings / Network and choose my network manually from the list (i.e. I choose "Saunalahti"), the Dialer tile will for a short while again revert to showing "Saunalahti", and I get another 2 minutes of functionality.
    So yes, I guess it does look like a network issue, or perhaps an issue with how the device deals with roaming networks. My network provider told me it's probably something with the phone or its settings and suggested I contact Nokia. Nokia will probably tell me it's obviously something with the operator and direct me to them .

  • Date order in SSRS report

    Hi All;
    I am using below formula for date order in SSRS
    =Format( Fields!scheduledstartValue.Value,
    "MM yyyy")
    Date comes in teh order as below
    for teh year 2014 order is right but 2015 should be at the last
    Any much appreciated
    Thanks
    Pradnya07

    Thats because Format causes values to return as string type
    Use sort expression as 
    =Fields!scheduledstartValue.Value
    And use the format expression only for the display
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • SQL Query Sorting Order issue - Help needed

    Hi All,
    I am using the following query in my project to display the records in the grid.
    /* Formatted on 04-09-2013 PM 8:01:51 (QP5 v5.149.1003.31008) */
      SELECT eol,
             status_msg,
             relation,
             building_name,
             device_id id,
             CEIL (SYSDATE - updated_date) duration,
             lab_id,
             aisle_id,
             aisle_location_id,
             ip_address,
             port,
             slot_num,
             hostname,
             pid,
             description,
             sl_num,
             eitms_code,
             status,
             dnd_flag,
             aisle,
             aisle_location,
             spname,
             os_version,
             user_id,
             TO_CHAR (updated_date, 'YYYY-MM-DD HH24:MI:SS') updated_date,
             isterm_svr,
             net_type,
             DEVICE_GROUP_REF,
             cmd_id_ref,
             LISTAGG (TESTBED_ID, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
                AS testbeds_id_ref,
             LISTAGG (NAME, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
                AS testbeds_names,
             spname || '-' || ip_address || '-' || port AS child_asset_group
        FROM DEVICE_TESTBED_VW
       WHERE lab_id IN
                ('7099849',
                 '10769617',
                 '4258712',
                 '10513562',
                 '10515074',
                 '5882676',
                 '8330925')
    GROUP BY eol,
             status_msg,
             relation,
             device_id,
             lab_id,
             aisle_id,
             aisle_location_id,
             ip_address,
             port,
             slot_num,
             hostname,
             pid,
             description,
             sl_num,
             eitms_code,
             status,
             dnd_flag,
             aisle,
             aisle_location,
             spname,
             os_version,
             user_id,
             updated_date,
             isterm_svr,
             net_type,
             DEVICE_GROUP_REF,
             cmd_id_ref,
             building_name
    ORDER BY building_name ASC,
             LOWER (child_asset_group) ASC,
             LOWER (relation) DESC
    The problem is , if any one sorting with any column  , the order is not correct
    In this below code , i have done sorting by port . But the result data order is not correct .
    /* Formatted on 04-09-2013 PM 8:07:02 (QP5 v5.149.1003.31008) */
      SELECT eol,
             status_msg,
             relation,
             building_name,
             device_id id,
             CEIL (SYSDATE - updated_date) duration,
             lab_id,
             aisle_id,
             aisle_location_id,
             ip_address,
             port,
             slot_num,
             hostname,
             pid,
             description,
             sl_num,
             eitms_code,
             status,
             dnd_flag,
             aisle,
             aisle_location,
             spname,
             os_version,
             user_id,
             TO_CHAR (updated_date, 'YYYY-MM-DD HH24:MI:SS') updated_date,
             isterm_svr,
             net_type,
             DEVICE_GROUP_REF,
             cmd_id_ref,
             LISTAGG (TESTBED_ID, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
                AS testbeds_id_ref,
             LISTAGG (NAME, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
                AS testbeds_names,
             spname || '-' || ip_address || '-' || port AS child_asset_group
        FROM DEVICE_TESTBED_VW
       WHERE lab_id IN
                ('7099849',
                 '10769617',
                 '4258712',
                 '10513562',
                 '10515074',
                 '5882676',
                 '8330925')
    GROUP BY eol,
             status_msg,
             relation,
             device_id,
             lab_id,
             aisle_id,
             aisle_location_id,
             ip_address,
             port,
             slot_num,
             hostname,
             pid,
             description,
             sl_num,
             eitms_code,
             status,
             dnd_flag,
             aisle,
             aisle_location,
             spname,
             os_version,
             user_id,
             updated_date,
             isterm_svr,
             net_type,
             DEVICE_GROUP_REF,
             cmd_id_ref,
             building_name
    ORDER BY PORT ASC
    Can some one help me to fix this issue?

    Hi,
    Sorry, it's not clear what you want.
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved, so that the people who want to help you can re-create the problem and test their ideas.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Simplify the problem as much as possible. For example, if you really need to GROUP BY 28 columns, post a problem where you need to GROUP BY only 2 or 3 columns.  (Just explain that you really have 28, so people will give solutions that are sure to work for all 28).)
    Always say which version of Oracle you're using (for example, 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • IC_TRAN_PND의 TRANSACTION DATE가 ORDER의 SCHEDULED SHIP DATE와 불일치시 처리방법

    제품: MFG_GMI
    작성날짜 : 2005-11-29
    IC_TRAN_PND의 TRANSACTION DATE가 ORDER의 SCHEDULED SHIP DATE와 불일치시 처리방법
    ====================================================================
    PURPOSE
    IC_TRAN_PND의 Transaction Date이 잘못되어, Order의 Scheduled Ship Date와 match되지 않는 경우의 해결방법을 기술하고자 함.
    Problem Description
    OMSO order lines에 대한 pending default transaction에서 transaction date가 Order Line의 scheduled ship date와 일치하지 않는다.
    이것은 MRP를 통해, 잘못된 날짜의 Plan 정보를 발생시킨다.
    Instance: 11.5.8 patchet J
    Workaround
    Order Header level에서 Request_date를 Order line level의 schedule ship date로 변경시킨다. 이는 IC_TRAN_PND의 trans_date에 반영된다.
    Solution Description
    This issue has been fixed in the files:
    GMIURSVB.pls version 115.133.115100.9
    GMIURSVS.pls version 115.35.115100.1
    To implement the solution, please execute the following steps:
    1. Please download and review the readme and pre-requisites
    for Patch 4560700
    2. Please apply Patch 4560700 in a test environment.
    3. Please confirm the following file versions:
    GMIURSVB.pls version 115.133.115100.9
    GMIURSVS.pls version 115.35.115100.1
    You can use the commands like the following:
    strings -a $GMI_TOP/filename |grep '$Header'
    4. Please retest the issue.
    Reference Documents
    Bug 4560700

  • Setting up default Date Order

    Hello,
    We are trying to set date order(YMD,MDY or DMY) on date control. Customize (YMD,MDY) option is not suitable in this situation beacuse it needs individual upadate at each date control.
    So we tried to set it a base level so that one change reflects everywhere on all existing reports and new reports(new date controls added in future) created with this date order by default.
    We tried File>Options>Fields>Date>Customize
    It is not overriding the date field deafult settings on report.
    We also tried to use com.crystaldecisions.sdk.occa.report.definitionsdk. FieldObject to set dateformat/order on the reports. It did not worked out.
    Could you please help me with setting date control order at base level so taht it reflected everywhere else.
    Thanks,
    Arun

    Hi Arun,  
    Crystal get's it's default date formatting from the Window's Regional settings, same as Excel.  You can overwrite individual objects but you can't really change the default for the reports themselves. 
    The closet I've come to addressing this is to have your application check the user's Regional Settings and changing them.  The the reports will format the dates properly, unless someone has formatted the dates differently in the report. 
    This can cause issues if another program requires to display dates differently. 
    If you can identify a date field or formula, you can have your application loop through each field/formula, verify the type and conditionally format the object with the order  you want. 
    Good luck,
    Brian

  • Support for JSON type data in ADF URL data control

    Hi,
    We are trying to migrate from a bindows based UI to ADF.
    Our current architecture relies heavily on JSON type data for communication between products.
    Is there a way an URL Data control can handle JSON type data?
    Any help in this regard would be of great help.
    Cheers,
    Raj

    Hi all,
    Is there any news on this issue? I would also like to be able to call a REST web service (non-SOAP) and use the JSON formatted response in ADF. (The use case here is to call UCM services from WebCenter without the SOAP overhead).
    Regards, Stijn

Maybe you are looking for

  • Repeat Group Header On Each Page not working

    Hi, I have a report that have 3 subreport, and in the Subreport, there is Group Headers that enabled the option "Repeat Group Header On Each Page". It works fine in the CR10 preview. However, the header won't repeat in the PDF generated by JRC. Any I

  • How do i convert an object into a string?

    has said above, im trying to convert a object to a string. here is what i ahve so far: Object nodeInfo = node.getUserObject()

  • Forms 10.1.2.0.2 - Global Search

    Good day everyone, I've run into several situations with some larger forms where I have a custom procedure and I have no idea where to find the procedure in the form or attached libraries. Is there a way to do a global search in a form to search in e

  • T400 LED screen flickering​ly

    i bought T400 2764 CTO one year ago just because "thinkpad" name and it strong body and reliable quality; in the june, just pass one year warrantee period, it screen start flickeringly--i did change adapter, switch the graphical card to internal or A

  • Second thoughts about my pro "13

    I need to make up my mind by tomorrow!! ....Should I keep my "13 pro late 2011 or trade for an 13' air ??  Has people on here had a lot of trouble with their DVD drive. Will the DVD drive last a few years??... Other words do I have to worry about kee