Problem in SORT statement

Hi Gurus,
I have this problem, I am trying to sort a internal table with the syntax after endselect statement and before read table statement
SORT ITAB_SBOOK BY NAME
name is a field in the table of type CHAR length 25 in actual table and here is how i am declaring name
in internal table
name LIKE stravelag-name
but the sort statement is not executing properly, names are being printed on the screen but they are not
being formated.
can some one tell me whare am i wrong ?
thanks.
Moderator Message: Please use more descriptive subject line in future post.
Edited by: Suhas Saha on Dec 25, 2011 7:55 PM

Hi
as per my knowledge there is slight diff between type and like keywords
type key refer the data type of a field where as like key refer the reference of existing  internal table in this just refer the data types not content(data)
example:
types:BEGIN OF ty_itab,
      matnr type mara-matnr,
      matkl type mara-matkl,
      mbrsh type mara-mbrsh,
      ersda type mara-ersda,
  END OF ty_itab.
  data:itab type STANDARD TABLE OF ty_itab.
  data:wa_itab type ty_itab.
we want to create one more internal table with the existing structure  at this time  we will go through the like keyword.
jtab like itab occurs 10.
and also check the following code.
REPORT  sort.
types:BEGIN OF ty_itab,
      matnr type mara-matnr,
      matkl type mara-matkl,
      mbrsh type mara-mbrsh,
      ersda type mara-ersda,
  END OF ty_itab.
data:itab type STANDARD TABLE OF ty_itab.
  data:wa_itab type ty_itab.
  select matnr matkl mbrsh ersda from mara into wa_itab.
    APPEND wa_itab to itab.
ENDSELECT.
SORT itab by mbrsh.
write:/ 'matno',' mat group','industry sector','created on'.
loop at itab into wa_itab.
  write:/ wa_itab-matnr,wa_itab-matkl,wa_itab-mbrsh,wa_itab-ersda.
  endloop.
best regards
sreenivas p

Similar Messages

  • Facing Problem in SORT statement

    Hi All,
    I have Five fields in my internal table.
    Say FIELD1, FIELD2, FIELD3, FIELD4, FIELD5.
    I wan to display FIELD1 and FIELD3 in ascending order. Fields are Cobination of Text and Numerals.
    Both should be displayed in ascending order. Is it possible? How can I achieve it.
    Points Assured.
    Regards,
    Suresh

    hi,
    U CAN WRITE THE LIKE THIS.
    DATA: BEGIN OF ITAB occurs 0,
            MATNR TYPE MARA-MATNR,
            ERSDA TYPE MARA-ERSDA,
            ERNAM TYPE MARA-ERNAM,
            VPSTA TYPE MARA-VPSTA,
            PSTAT TYPE MARA-PSTAT,
          END OF ITAB.
    select * from mara into CORRESPONDING FIELDS OF TABLE itab.
    sort itab DESCENDING by VPSTA MATNR.
    loop at itab.
      write: / itab.
    endloop.
    RGDS,
    bharat.

  • Problem with READ Statement in the field routine of the Transformation

    Hi,
    I have problem with read statement with binary search in the field routine of the transformation.
    read statement is working well when i was checked in the debugging mode, it's not working properly for the bulk load in the background. below are the steps i have implemented in my requirement.
    1. I selected the record from the lookuo DSO into one internal table for all entried in source_packeage.
    2.i have read same internal table in the field routine for each source_package entry and i am setting the flag for that field .
    Code in the start routine
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
         and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp <> 3.
    delete it_zcam where end_dt initial.
    sort it_zcam by surce accno.
    endif.
    field routine code:
    read table it_zcam with key source = source_package-source
                                                 accno  = source_package-accno
                                                 binary search
                                                 transportin no fields.
    if sy-subrc = 0.
    RESULT  = 'Y'.
    else.
    RESULT = 'N'.
    endif.
    this piece of code exist in the other model there its working fine.when comes to my code it's not working properly, but when i debug the transformation it's working fine for those accno.
    the problem is when i do full load the code is not working properly and populating the wrong value in the RESULT field.
    this field i am using in the report filter.
    please let me know if anybody has the soluton or reason for this strage behaviour.
    thanks,
    Rahim.

    i suppose the below is not the actual code. active table of dso would be /bic/azcam_o1100...
    1. is the key of zcam_o11 source and accno ?
    2. you need to get the sortout of if endif (see code below)
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
    and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp 3.
    delete it_zcam where end_dt initial.
    endif.
    sort it_zcam by surce accno.
    field routine code:
    read table it_zcam with key source = source_package-source
    accno = source_package-accno
    binary search
    transportin no fields.
    if sy-subrc = 0.
    RESULT = 'Y'.
    else.
    RESULT = 'N'.
    endif.

  • Does not retain sort state

    App Store does not retain sort state when returning from viewing an individual app to the full list of apps. If the full list spans more than one page, the page you were on is also not retained.
    I have no idea if this is a bug, a feature (or lack thereof), or an oddity on my computer. Since I can't find any other way to request a feature or post feedback to Apple, I'm putting this here.
    If by some chance this is an issue with my computer only or I'm missing some preference somewhere (ha!) I'd appreciate any help provided by the community.
    -s

    Yes, it is indeed VERY frustrating that the App Stores don't return you to where you left off browsing if you stop to click on an app to read more about it. Once you're done reading about an app that interests you, you're dumped right back at the beginning. So, just to get back where you were, you may have to plow through ten pages of apps. I get so fed up with being whisked back to page 1 all the time that I just give up and leave the App Store in disgust. I hate wasting my time paging backnthrough all the apps I've alread covered. ALSO, when looking over GENIUS recommendations on the App Store, why is it that even when I click on NOT INTERESTED for a given app, the app just stays there? It's like my clicking NOT INTERESTED has no effect whatsover. What's the problem with the App Store?

  • Problem in Update Statement

    I got some problem in update statement.Can anybody discuss with me regarding my problem? Below is the occured problem.
    //all the declaration like Connection, ResultSet are declared, setting the ODBC path and so on steps have been set up before this method. When compile it, no error, when I start to run my program, the program�s interface is shown, but the following error was appearred and data cannot be updated, can anybody tell me where is my mistake?
    //ERROR:SQL Error in update statement:java.sql.SQLException [Microsoft][ODBC][ODBC Microsoft Access Driver] Syntax Error in UPDATE statement.
    //emp_overview is the table name
    // last_name, first_name, office_phone�.is the attributes of the table
    //this method had declare in the interface class already
    public String updateData (String idd, String ln, String fn, String op,
                   String oe, String hp, String ps, String ss)
                   throws java.rmi.RemoteException
         {//begin of this method
              String result ="";
              try
              Statement statement = connection.createStatement();
              String sql = "UPDATE emp_overview SET" +
              "last_name=' "+ln+
              " ', first_name=' "+fn+
              " ', office_phone=' "+op+
              " ', office_ext=' "+oe+
              " ', home_phone=' "+hp+
              " ', primary_skill=' "+ps+
              " ', secondary_skill=' "+ss+
              " ' WHERE id="+idd;
              statement.executeUpdate(sql);
              statement.close();
              catch (java.sql.SQLException e)
         System.out.println("SQL Error in update statement: "+e);
              //throw a RemoteException with the exception
              //embedded for the client to receive
         throw new java.rmi.RemoteException("Error in Updating exist row into DB", e);
              return result;
         }//end of this method

    Hi Kevin,
    According to the code you have posted, it looks like you are missing a space between "SET" and "last_name". I suggest you add the following line of code:
    System.out.println(sql);
    before the invocation of "executeUpdate()".
    I also suggest you add the following line of code:
    e.printStackTrace();in your "catch" block.
    Hope this helps.
    Good Luck,
    Avi.

  • SORT statement is not working!

    Hi frdz,
    Below SORT statement is not working. Can any one explain me why this is happening.
    SORT i_bseg ASCENDING BY belnr bukrs
                        DESCENDING kunnr.
    I have table content as below.
    BELNR      BUKRS KUNNR   
    0016000000|CROP |         
    0016000000|CROP |0008910168
    Before and after the sort content order is same.
    I want to sort the content like below.
    0016000000|CROP |0008910168
    0016000000|CROP |       
    Is there any thing wrong with the sort statement???
    i_bseg is defined as TYPE STANDARD TABLE OF
    Sort criteria must not change i. e ascending by belnr and bukrs and descending by kunnr.
    Thanks,
    Vinod.

    hi vinod,
    this is because on your statement, you are sorting BUKRS in descending order and KUNNR in ASCENDING order.
    please take note that the sort order should come after the sorted field. if no order is given, the default which is ASCENDING will be used.
    do your sorting like this
    SORT i_bseg BY belnr bukrs kunnr DESCENDING.
    regards,
    Peter

  • Problem in Update statement using Execute Immediate

    Hi All,
    I am facing problem in update statement.
    I am creating dynamic sql and use "execute immediate" statement to execute a update statement.
    But it is not updating any thing there in the table.
    I have created a query like :
    update_query='Update '|| Table_Name ||' t set t.process_status =''Y'' where t.tid=:A';
    Execute immediate update_query using V_Id;
    commit;
    But it is not updating the table.
    I have a question , is execute immediate only does insert and delete?
    Thanks
    Ashok

    SQL> select * from t;
                     TID P
                     101 N
    SQL> declare
      2     V_Id          number := 101;
      3     Table_Name    varchar2(30) := 'T';
      4     update_query  varchar2(1000);
      5  begin
      6     update_query := 'Update '|| Table_Name ||' t set t.process_status =''Y'' where t.tid=:A';
      7     Execute immediate update_query using V_Id;
      8     commit;
      9  end;
    10  /
    PL/SQL procedure successfully completed.
    SQL> select * from t;
                     TID P
                     101 Y                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem in UPDATE statement In Multiple Record Block

    Hi Friends,
    I have problem in update Statement for updating the record in multiple record data Block.
    I have two data Block the master block is single Record block and the 2nd data block is Multiple Record data Block.
    I am inserting the fields like category,and post_no for partiular job in single data block
    Now in second Multiple Record Data Block,i am inserting the multiple record for above fileds like no. of employees work in the position
    There is no problem in INSERT Statement as it is inerting all record But whenever i want to update particular Record (in Multiple Block) of employee for that category and Post_no
    then its updating all the record.
    my code is Bellow,
    IF v_count 0 THEN
    LOOP
    IF :SYSTEM.last_record 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
    VALUES(g_post_no, g_roster_no, g_category, :POST_HISTORY_MULTIPLE.idcode, :POST_HISTORY_MULTIPLE.joining_post_dt,
    :POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    next_record;
    ELSIF :SYSTEM.last_record = 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
    VALUES (g_post_no,g_roster_no,g_category,:POST_HISTORY_MULTIPLE.idcode,
    :POST_HISTORY_MULTIPLE.joining_post_dt,:POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    EXIT;
    END IF;
    END LOOP;
    SET_ALERT_PROPERTY('user_alert',ALERT_MESSAGE_TEXT, 'Record Updated successfuly' );
    v_button_no := SHOW_ALERT('user_alert');
    FORMS_DDL('COMMIT');
    CLEAR_FORM(no_validate);
    Please Guide me
    Thanks in advence

    As you do a loop over all the records in the block, of course every record is updated.
    Also, what you do is not the way is intended to be used. In general, you base a block on a table,then there is no need at all for writing INSERT's or UPDATE's. Forms also know's then, which records to be updated and which not.

  • Problem In Update Statement In Multiple Record Data Block

    Hi Friends,
    I have problem in update Statement for updating the record in multiple record data Block.
    I have two data Block the master block is single Record block and the 2nd data block is Multiple Record data Block.
    I am inserting the fields like category,and post_no for partiular job in single data block
    Now in second Multiple Record Data Block,i am inserting the multiple record for above fileds like no. of employees work in the position
    There is no problem in INSERT Statement as it is inerting all record But whenever i want to update particular Record (in Multiple Block) of employee for that category and Post_no
    then its updating all the record.
    my code is Bellow,
    IF v_count <> 0 THEN
    LOOP
    IF :SYSTEM.last_record <> 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
    VALUES(g_post_no, g_roster_no, g_category, :POST_HISTORY_MULTIPLE.idcode, :POST_HISTORY_MULTIPLE.joining_post_dt,
    :POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    next_record;
    ELSIF :SYSTEM.last_record = 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
         VALUES (g_post_no,g_roster_no,g_category,:POST_HISTORY_MULTIPLE.idcode,
              :POST_HISTORY_MULTIPLE.joining_post_dt,:POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    EXIT;
    END IF;
    END LOOP;
    SET_ALERT_PROPERTY('user_alert',ALERT_MESSAGE_TEXT, 'Record Updated successfuly' );
    v_button_no := SHOW_ALERT('user_alert');
    FORMS_DDL('COMMIT');
    CLEAR_FORM(no_validate);
    Please Guide me
    Thanks in advence

    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;These update statements are without where clause, so it will update all records.
    If it is specific to oracle forms then u may get better help at Forms section.

  • Problem with Decode statement

    Hi
    I am trying to achieve the following in my report:
    If an employee has a surname of . (dot) or a first name of . (dot), the report should not display a dot. An employee's name is made up of surname, first name and middle name which should all be concatenated together. To try to achieve this, I have the following statement in my report:
    decode(e.Surname, '.', ( LTRIM(RTRIM((INITCAP(e.FIRST_NAME)))||' '||INITCAP(e.MIDDLE_NAME)) ) ,
    e.FIRST_NAME, '.', ( LTRIM(RTRIM((INITCAP(e.Surname)))||' '||INITCAP(e.MIDDLE_NAME)) ) ,
    ( LTRIM(RTRIM((INITCAP(e.SURNAME )))||', '||INITCAP(e.FIRST_NAME)||' '||INITCAP(e.MIDDLE_NAME)) ) ) as emp_name
    FROM Employee e
    Problem: The above statement is only working for those employees with surname of . (dot). It's not working for first names of dot. How can I use the decode statement OR is there any other way of doing it without using the CASE statement?
    It seems my decode statement doesn't work with 2 different fields (surname, firstname) being tested within one decode statement.Thanks.

    Thank you so much InoL . I have used the ltrim with Replace but now have a new problem.
    Because I am joining Surname, First name and middle name together and put a comma after the Surname, the name now appears as follows:
    , Maria Ane (if Surname is a dot)
    Boiler, (if first name is a dot)
    I would like to get rid of a comma and only have comma when surname or first name does not have a dot, i.e. for those people with full names e.g. Blake, Anna Marie.
    InoL, how can I achieve this? Thanks.

  • About sort statement

    hello friends
    please tell me if i apply sort condition in sorted table what will happen
    whether it show some kind of error or it run or anything else.
    thanks...

    nothing happens but the code gets executed...
    unnecessarily sort statement should not be used in programs if there is no read of data...

  • Sort Statement

    Hi,
    In my custom program, I have issued a SORT command on my internal table.
    SORT it_itab by hkont prctr gsber waers.
    After the SORT command, the relative sequence of entries in the internal table having the same set of values for the fields mentioned in the SORT command, is different in ECC 6.0 when compared with 4.6C results.
    Has anybody faced a similar situation?
    Is there a functionality difference in SORT in ECC 6.0?
    Any inputs on this will be highly appreciated.
    Thanks,
    Binu

    Hi,
    For sort statement, there is no difference between 4.6C and ECC6.0.
    You can debug your program, before and after sorting the internal table, you can check whether the internal table changes the sequence.
    Or you can put your code here to make us more clear what happened.
    Thanks and regards,
    Chris Gu

  • Problem In Session State

    Hai, I'm Using VS2010 and SQL Server 2005.
    I have a problem in Session state;
    //View.aspx.cs
    // In this page just I store a textbox into a session variable.
    protected void btnEdit_Click(object sender, EventArgs e)
            Session["rollno"] = txtRollNo.Text;
                Response.Redirect("Edit.aspx");
    //Edit.aspx.cs
    //In this page I retrieve the session value which is stored in previous page
           protected void Page_Load(object sender, EventArgs e)
            txtRollNo.Enabled = false;
            if (!IsPostBack)
                txtRollNo.Text = Session["rollno"].ToString();
                getdata();
     public void getdata()
            SqlConnection con = new SqlConnection("Data Source=SERVICETEAM-PC;Initial Catalog=csc;User ID=sa;Password=kavi");
            con.Open();
            SqlCommand cmd = new SqlCommand("Select * from Csc where Roll_No='" + txtRollNo.Text + "'", con);
            SqlDataReader dr = cmd.ExecuteReader();
            if (dr.Read())
                txtName.Text = dr.GetString(1).ToString();
                txtAddress.Text = dr.GetString(2).ToString();
                txtMobileNo.Text = dr.GetString(3).ToString();
                txtYesNo.Text = dr.GetString(4).ToString();
    From the above code, I got an error when I press Edit button in View.aspx page.
    The Error is
    Description: An unhandled
    exception occurred during the execution of the current web
    request. Please review the stack trace for more information about the error and where it originated in the code. 
    Exception Details: System.Web.HttpException: A page can have only one server-side Form
    tag.
    Source Error: 
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack
    trace below.
    Help Me.....

    Hai,
    I'm using VS2010 and SQL Server 2005.
    I have a problem in Session state.
    See below is my code,
    //View.aspx.cs
    //Here I assign a textbox value to session
    protected void btnEdit_Click(object sender, EventArgs e)
            Session["rollno"] = txtRollNo.Text;
                Response.Redirect("Edit.aspx");
    //Edit.aspx.cs
    //Here I assign a session value to textbox, which is stored in last page.
    protected void Page_Load(object sender, EventArgs e)
            txtRollNo.Enabled = false;
            txtRollNo.Text = Session["rollno"].ToString();
            getdata();
    public void getdata()
            SqlConnection con = new SqlConnection("Data Source=SERVICETEAM-PC;Initial Catalog=csc;User ID=sa;Password=kavi");
            con.Open();
            SqlCommand cmd = new SqlCommand("Select * from Csc where Roll_No='" + txtRollNo.Text + "'", con);
            SqlDataReader dr = cmd.ExecuteReader();
            if (dr.Read())
                txtName.Text = dr.GetString(1).ToString();
                txtAddress.Text = dr.GetString(2).ToString();
                txtMobileNo.Text = dr.GetString(3).ToString();
                txtYesNo.Text = dr.GetString(4).ToString();
    From the above code If I the Edit button, It will show an error like 
           

  • Problem with sorting involving user defined types and reports

    Hello!
    I have a problem with sorting involving Reports and user defined objet types.
    I have created the following object types
    CREATE TYPE type_balance_compte AS OBJECT
    NUM_CPT_SEQ NUMBER(8)
    ,NUM_CPT VARCHAR2(35)
    CREATE TYPE TB_type_balance_compte IS TABLE OF type_balance_compte
    At the reports query I use:
    SELECT ...
    FROM table(cast(test_pkg.balance_comptes(:P_num_soc) as TB_type_balance_compte)) c
    The procedure balance_comptes will retrieve data from various tables into the type.
    The report is ordered by a certain string field that usually contains characters and numbers.
    I need to have numbers always before characters, meaning the data should come in this order in the report for example:
    0
    1
    A
    B
    So, before the report query, I have placed a call to DBMS_SESSION.SET_NLS( 'nls_sort', 'binary' ) to guarantee NLS_SORT in case it is originally set to FRENCH.
    The problem here is that even after this call, I have the report ordered like this
    A
    B
    0
    1
    And not the numbers before as it should be.
    To try and find out where the problem was, I have created a table to use instead of the object type described above. In this case, it worked correctly. So all I know by now is that is has something to do with the type or cast, but what exactly? Does anybody now how to solve this without using a table?
    Many thanks
    Ariadne

    I have placed a call to DBMS_SESSION.SET_NLS( 'nls_sort', 'binary' ) why not order directly then:
    SQL> select *
          from table (sys.dbms_debug_vc2coll ('A', 1, '5', 'C', 'a'))
    order by nlssort (column_value, 'NLS_SORT = binary')
    COLUMN_VALUE                                                                   
    1                                                                              
    5                                                                              
    A                                                                              
    C                                                                              
    a                                                                              
    5 rows selected.?

  • How to persist af:table column sort state within a session?

    Hi,
    I have an af:table in my page with the columns sortable="true".  So when click on the header of any column, we can sort the column.  Our users have a requirement that after they do the sort by clicking one of the column headers in the af:table, then they navigate to another page in our application and then come back to this page, they want to see the same sort order of data.  How can we persist the sorting state in af:table?
    Any comments are appreciated.
    Thanks
    -Mina

    Hi,
    I am not sure this is doable because the underling data collection may be changed on other views. You can use a sort listener and intercept the sort order selected by a user to persist it in the session or else where (keep in mind that using the panelCollection component you could also have a sort order that spans multiple columns). When you navigate back to the view you then have the information to order the data accordingly.
    Frank

Maybe you are looking for

  • Problems with enabling commenting toolbar on Reader 7

    I have extended the commenting rights for a pdf with extensions server. I am running the evaluation version of extensions server. When I open the reader extended pdf inside the browser, it doesn't show up the commenting toolbar only in Reader 7. But

  • FCP5 and Kona 3 Card

    I am working on a FCP5 system with a Kona 3 card installed. The company has used this card for some time with great success for SD projects. They are making the tranfer to HD projects. They are shooting HDCAM. I have been able to get the video signal

  • Loading flash drives and CDs

    I have mobile users whose use mobile accounts that do not have syncing capabilities, everything is running well apart from loading flash drives, the flash drives cannot open nor can content be saved on the flash drives. But when you restart the machi

  • Oracle.exe keeps locking a file after connection has been closed.

    Hi, I've written a windows service in .net that monitors a directory for new uploaded files that need to be synchronized with the database. When it detects a new file it moves the file to a another directory from which oracle can reach the file. When

  • Using AIR SDK To Package Apps

    Hi Guys, I'm using the command line, air sdk tools to package my air app. I can do everything except select the destination where the packaged app should be placed. I have read the documentation; http://help.adobe.com/en_US/AIR/1.1/devappshtml/WS5b3c