Sort Rowset field values without using rowset.sort or sortscroll

Hi dudes,
any one tell me the different ways to sort a rowset values ie, single field or more than one field without using Rowset.sort or Sortscroll() method. i tried some ways but not get the optimum solution.

My first question to you would be why you want alternatives for Rowset.sort or Sortscroll.
Your question doesn't describe your true issue or motive to search for alternatives for delivered PeopleTools Apis & Buildin Functions.

Similar Messages

  • Display the 3rd hieghest value without using rowid

    HI All,
    Can any one help me how to display the 3rd hieghest valuer without using a ROWID..
    Thanks
    Basava

    Frank, using ROWNUM = 1 instead of DISTINCT could be a bit faster:
    SQL> SET LINESIZE 132
    SQL> EXPLAIN PLAN FOR
      2  WITH got_r_num AS (
      3                     SELECT  DISTINCT sal,
      4                                      DENSE_RANK() OVER(ORDER BY sal DESC NULLS LAST) AS r_num
      5                       FROM  scott.emp
      6                    )
      7  SELECT  sal
      8    FROM  got_r_num
      9    WHERE r_num = 3
    10  /
    Explained.
    SQL> @?\RDBMS\ADMIN\UTLXPLS
    PLAN_TABLE_OUTPUT
    Plan hash value: 436395657
    | Id  | Operation                 | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT          |      |     9 |   234 |     5  (40)| 00:00:01 |
    |*  1 |  VIEW                     |      |     9 |   234 |     5  (40)| 00:00:01 |
    |   2 |   HASH UNIQUE             |      |     9 |    36 |     5  (40)| 00:00:01 |
    |*  3 |    WINDOW SORT PUSHED RANK|      |     9 |    36 |     5  (40)| 00:00:01 |
    |   4 |     TABLE ACCESS FULL     | EMP  |    14 |    56 |     3   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
       1 - filter("R_NUM"=3)
       3 - filter(DENSE_RANK() OVER ( ORDER BY INTERNAL_FUNCTION("SAL") DESC
                  NULLS LAST)<=3)
    18 rows selected.
    SQL> EXPLAIN PLAN FOR
      2  WITH got_r_num AS (
      3                     SELECT  sal,
      4                             DENSE_RANK() OVER(ORDER BY sal DESC NULLS LAST) AS r_num
      5                       FROM  scott.emp
      6                    )
      7  SELECT  sal
      8    FROM  got_r_num
      9    WHERE r_num = 3
    10      AND ROWNUM = 1
    11  /
    Explained.
    SQL> @?\RDBMS\ADMIN\UTLXPLS
    PLAN_TABLE_OUTPUT
    Plan hash value: 21859616
    | Id  | Operation                 | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT          |      |     1 |    26 |     4  (25)| 00:00:01 |
    |*  1 |  COUNT STOPKEY            |      |       |       |            |          |
    |*  2 |   VIEW                    |      |    14 |   364 |     4  (25)| 00:00:01 |
    |*  3 |    WINDOW SORT PUSHED RANK|      |    14 |    56 |     4  (25)| 00:00:01 |
    |   4 |     TABLE ACCESS FULL     | EMP  |    14 |    56 |     3   (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
       1 - filter(ROWNUM=1)
       2 - filter("R_NUM"=3)
       3 - filter(DENSE_RANK() OVER ( ORDER BY INTERNAL_FUNCTION("SAL") DESC
                  NULLS LAST)<=3)
    19 rows selected.
    SQL> SY.

  • How can you trim the contact field value without cloudconnector?

    How can you trim the contact field value without cloudconnector?

    You can add your contacts to segments, while right-clicking on the criteria you have added in segments, you will see the option for Merge, Intersect & Trim.
    See the attached URL, it might help you .
    Merge, Intersect, Trim

  • How to set item values without using fields in branch's ACTION block?

    Okay, I will try to say this in a easy way so it is not weird.
    I have created a button, SAVE, that has a Branch of branch type: Branch To Function Returning A Page. This is my code for the branch:
    if :P2008_NAP_SUPPORTING_MATERIALS = 'Yes' then
    return '2092';
    else
    return '2040';
    end if;
    The code for this type of branch is stored in the ACTION block of the Branch page. The ACTION block for a Branch of branch type: Branch To Function Returning A Page is different than the ACTION block for a Branch of branch type: Branch To Page Or URL.
    I need to set some item values with some specific values, which I can do with a branch type: Branch To Page Or URL. This is not possible with the branch type: Branch To Function Returning A Page. The ACTION block is totally different.
    How can I set some values on say Page 2040 from Page 2008 without using fields in the branch's ACTION block?
    Thank you in advance,
    Maggie

    Andy and Scott,
    I love seeing different perspectives in solving problems, it opens my eyes to new ways of looking at/using the tools (reserved words and 'Function returning a Page', etc.).
    One of my pet peeves has been that on branches I was limited to only 10 variables to be passed (I know, who would want more - but there was an instance where I had to pass more), and an even more frustrating time when using report Column Linking, which limits me to 3 variables.
    At least with the Branch linking I can use your suggestion Andy and add the variable setting statements into the function. I am assuming of course (and I should be able to) that I will be able to set more that 10 variables in a IF condition prior to the RETURN statement. This method will be much more understandable, for me, when looking through the branch at a later time to see what is happening, than an URL link where all the variable are strung out 'in a line' so to speak.
    I will still need to use URL Target branching on Links contained within a Column Attribute when I need to pass more than 3 variables, of which I have several places where I do this.
    Thomas

  • Control an Integer field Length without using Validation ??

    Hi,
    I have Couple of fields where I need to configure them as Integers.
    Now each one has a fixed length that i need to limit to.
    But when i create a field of type: integer, i cannot select teh length!!!
    To achive this the idea i have is to write a validation which checks length..
    But can i achive it without going for a validation on each field???
    PS: I am aware that TEXT field can limit the length But it also allows me to enter text values, my requirement clearly says that to allow users to only enter Numeric values..
    Did anyone face a similar Case?
    Kind Regards
    Eva

    Hi Eva,
    I didn't try in the system, but I feel there are two solutions to achieve your requirement (*of course in both cases you will need to write a simple validation)
    Solution 1 : When field is defined as "Integer" in Console.
    lets take an example, you want to restrict an integer field with a limit of max 4 characters.
    Maximum value of a 4 character integer can be "9999". So, you can put a simple validation to compare the field value with 9999. if the value is less then this means fields values is less than 4 characters, else more than 5 characters.
    In this case Your validation expression in expression editor will be:
    FIELD NAME<= "9999"
    Solution 2 : When field is defined as "Text" in Console.
    In this case you can restrict the maximum field length through Console. But you will also need to write a validation to ensure that user is not entering any alphabets or special characters in this field.
    In this Case you can use below validation:
    HAS_ALL_CHARS(FIELD NAME, "0","9")
    This will ensure that field has all characters between 0 and 9 and doesn't hold any special character or alphabets.
    In Both cases you will need to set  "Automatic Execution" property as "Error". Also please do not manually type any function or value in expression editor. use drop down for fields, operators, functions etc.  and enter numeric values using the first blank box before dimension list.
    Kindly revert if you face any issues.
    -Shiv

  • Max value without using max() function

    Hi
    Is there any way to get the max value from a table without using MAX() function
    Thanks

    well if you think about it i'm sure you'll find a solution
    what does max(field) means, it simply is the value of the field where no other value of the same field that is > than this value exists.
    consider the following :
    table TAB(
    fld NUMBER(5));
    translate the logic and you'll have
    select a.fld from TAB a where NOT EXISTS(select b.fld from TAB b where b.fld>a.fld) and rownum=1;
    of course there are better ways i'm sure, you'll just have to figure'em out.

  • Function that returns N values, without using a string

    Hi, how can i make a function that returns several valures (that hasn't a exact number of returned values, it could return 3 values, or 7) without using a string?
    When i need to return several values from a function, i put the values inside a varchar like thus 'XXX,YYY,ZZZ' and so on. Don't know if this has a poor performance.
    If you can supply simple examples for what im asking, i would be nice.
    (without using a string)

    Can i create the type objects inside a package? If i
    can, they will be local to the package, right?Yes, you're right.
    Pipeline returns a row or several?You can use pipelined function in the same way you use table:
    SELECT * FROM TABLE(pipelined_funct(agr1, agr2));
    It returns results as separate rows.

  • Need to take rownum highest value without using grouping functions

    Hi
    I want to display highest value in the rownum column and customer details without using grouping functions like max or count
    this below query gives me all rownum values and customer details
    SELECT ROWNUM ROWNUM_1, CUSTOMER_NO, CUSTOMER_NAME, CUSTOMER_DOJ, CUSTOMER_MOBILENO FROM CUSTOMER;
    can any one help me.

    The above query won't work as it's missing "from" cluase in the inner select statement.
    And even if corrected it willl print rownum values thrice: value "1",max_rownum, max_rownum followed by customer details.
    Below is the simple query to retrieve max row_num along with the corresponding customer details.
    select * from (SELECT ROWNUM ROWNUM_1, CUSTOMER_NO, CUSTOMER_NAME, CUSTOMER_DOJ, CUSTOMER_MOBILENO FROM CUSTOMER order by rownum_1 desc) where rownum<=1 ;

  • Is there any way to wait for a value without using JDialog or JOptionPane?

    I am implementing a dictionary program by detecting word in a JTextPane and asking a user to choose one of available meanings from JOptionPane or JDialog. The program runs under a while-loop until all dictionary words are detected or a user clicks cancel.
    However, I don't want to use JDialog or JOptionPane because it is sometimes annoying to have a popup window on every detected dictionary word.
    So, I use JList with Buttons on the same Frame as the JTextPane. However, now, the program does not stop when it detects a dictionary word. It just uses a default value of the JList for translating word to meaning.
    Is there any way I can simulate the JDialog or JOptionPane without using it?
    I mean I'd like to stopp the program temporary, wait for an answer from other components, and then continue to detect the next dictionary word.
    Thank you.

    I'm probably reading this all wrong, but instead of the while loop,
    the method just looked for a dictionary word from a particular caretPosition,
    so, to start, it would be findWord(0)
    when found, add whatever to wherever, note the caretPostion at the end of the 'found' word, and method returns.
    when the user selects whatever button, the button's actionListener also calls the method again, using the noted caretPosition
    findWord(42);
    so, it starts searching from 42 (instead of the start)
    basically it is event driven
    findWord sets the button/s
    click a button starts findWord

  • Adding field values together using Advanced Field Management

    Hi All
    I have 5 currency fields on the Revenue page, that I need to add together into one field, Total Amount (currency field also). I have made Total Amount field read only, and using adv field mgt set the following default and ticked post default:
    [<Revenue>]=[<cCorporate_Income_ITAG>]+[<cDonation_Income_ITAG>]+[<cFlower_Income_ITAG>]+[<cHost_ITAG>]+[<cMerchandise_Income_ITAG>]
    It does not seem to work, is this possible at all or am I not doing something right.
    Help....

    I'm having a very similar issue. I'm trying to do the calculation as a default field value and receive the following error:
    [1] An error occurred calculating the default value for field 'ZCur_5' in business component 'Revenue'.(SBL-DAT-00412) [2] Could not evaluate expression 'Expr: '=[<cMetal_Rate_ITAG>]*[<nQuoted_Weight_ITAG>]*[<nDross_Factor_ITAG>]'' for field 'ZCur_5' in business component 'Revenue'.(SBL-DAT-00394) [3] Generic SSA NOTOK error message.(SBL-DAT-00472)
    I can make the update work via workflow, but this does not help during the initial creation of the record.
    Any ideas?

  • How to update session state from form field values without submitting page?

    Hi,
    I am new to Oracle APEX. I am using Oracle Apex 4.2 on Oracle 11g release 2. The problem is that when I am entering data on a form, when I enter a value in one field and move to the next field, how can I use the value of first field in the validation procedure of next field? I know that when we enter data in fields, the session state is not updated with these values until we submit the page... right... but I have seen that if there is a control of List box type, then Apex gives an option "Action When List changes" where we can choose option to update corresponding session state field with the value of list box item, without submitting the page.
    Now my questions is why this option is only available for List box items? why not for other item types like Text box, Check box,... ? can someone please help me with this?
    (the issue with update of session state depending on page submitting, is that we need a complete network round trip from client to server in order for it. However if we can update session state variables without submitting page, then we can avoid this network traffic).
    Any help will be greatly appreciated. Thanks in advance.

    Create a dynamic action on change and run a PL/SQL process there with the following code:
    BEGIN
       NULL;
    END;Page items to submit > your item.
    This will set the session state without submitting the form.
    Further examples here:
    http://apex.oracle.com/pls/apex/f?p=31517:229
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How to sort the data in JSP using stylesheet sorting?

    Hi, i extracted data out in and display them <%=data%> in the jsp, but how to sort? do i have to provide a drop down list that gives different sorting options, and when user clicks on one option, say sort by title, the collection of results are sorted out on the same jsp page? so all in all, only one jsp page is needed or do i need to create xml files, etc?
    i have no idea how to integrate the xml sorting into the jsp page, even after seeing online help, cos there is no example of a jsp page with sorting to refer to. PLease help, thanks alot!

    im getting the data from beans, but one of the requirements was that i cant use the database to sort and display but i have to use xslt to do the sorting in the jsps, so i have no idea how to do so. possible to give an example? thanks

  • GetTreeCellRendererComponent(): get path to value without using row-arg?

    I'm using a JTree to display hierarchical data which include cyclic dependencies (i.e. an item may be its own ancestor).
    If a node shows up for the second time in a hierarchical tree path, I put a stop to further expansion (using the getPath() of a TreeExpansionEvent in a TreeWillExpandListener), and I give the node a special display (using a tree-cell renderer with a custom implementation of getTreeCellRendererComponent()). The implementation uses tree.getPathForRow(row) to get the path by which can be detected if a node is cyclic, but this does not always work: sometimes tree.getPathForRow(row).getLastPathComponent() corresponds to the value-object given as argument to getTreeCellRendererComponent(), but sometimes it does not.
    The example below shows the difference (switch the lines marked "Not OK" by the line marked "OK"; to keep it simple, I left the cyclic dependencies out).
    Checking the swing source files reveals that if getTreeCellRendererComponent() is called by paintRow() in BasicTreeUI, value and row correspond. But if getTreeCellRendererComponent() is called by getNodeDimensions() in one of the LayoutCache-classes, the given value-object does not correspond to the object at the given tree-row. Somewhere I read that getNodeDimensions() is called to determine preferred sizes of nodes before they are shown for the first time. If that's the case, it is logical that value and row do not correspond, although I would have liked to get a hint, e.g. a row value of -1.
    To detect a cyclic node, I need a treepath, but the row-argument is unreliable. Is there another way to determine the path corresponding to the value-object passed to getTreeCellRendererComponent(), so without having to use the row-argument?
    * treeUpdate.java
    package treeupdate;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.util.ArrayList;
    import java.util.List;
    import javax.swing.JLabel;
    import javax.swing.JTree;
    import javax.swing.event.EventListenerList;
    import javax.swing.event.TreeModelListener;
    import javax.swing.tree.TreeCellRenderer;
    import javax.swing.tree.TreeModel;
    import javax.swing.tree.TreePath;
    public class treeUpdate extends javax.swing.JFrame {
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JTree jTree1;
        private ItemInHierarchy root = null;
        private SimpleTreeModel htm = new SimpleTreeModel();
        private SimpleTreeCellRenderer htcr = new SimpleTreeCellRenderer();
        public treeUpdate() {
            initComponents();
            generateHierarchy();
            jTree1.setModel(htm);
            jTree1.setCellRenderer(htcr);
        // init
        private void initComponents() {
            setTitle("row-value correspondence");
            setSize(new Dimension(300,500));
            jScrollPane1 = new javax.swing.JScrollPane();
            jTree1 = new javax.swing.JTree();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jScrollPane1.setViewportView(jTree1);
            add(jScrollPane1);
        // generate data
        private void generateHierarchy() {
            root = new ItemInHierarchy("Joverra");
            ItemInHierarchy c1 = new ItemInHierarchy("Kondat Kalbendate");
            c1.children.add(new ItemInHierarchy("Linovar Welchessante Somtanessia"));
            c1.children.add(new ItemInHierarchy("Muzarra Frontiminoi Wioppallae"));
            c1.children.add(new ItemInHierarchy("Niobitia Fyttichiokla Quantianou"));
            root.children.add(c1);
            ItemInHierarchy c2 = new ItemInHierarchy("Orud Kalbene");
            c2.children.add(new ItemInHierarchy("Pascalite Welchessante Somtanessia"));
            c2.children.add(new ItemInHierarchy("Quinnime Frontiminoi Wioppallae"));
            c2.children.add(new ItemInHierarchy("Ruttinovi Fyttichiokla Quantianou"));
            root.children.add(c2);
            ItemInHierarchy c3 = new ItemInHierarchy("Si Kae");
            c3.children.add(new ItemInHierarchy("Tonniate Welchessante Somtanessia"));
            c3.children.add(new ItemInHierarchy("Uvverten Frontiminoi Wioppallae"));
            c3.children.add(new ItemInHierarchy("Vlioppala Fyttichiokla Quantianou"));
            root.children.add(c3);
         * Tree model
        private class SimpleTreeModel implements TreeModel {
            protected EventListenerList listenerList = new EventListenerList();
            public Object getRoot() {
                return root;
            public Object getChild(Object parent, int index) {
                ItemInHierarchy i = (ItemInHierarchy)parent;
                return i.children.get(index);
            public int getChildCount(Object parent) {
                ItemInHierarchy i = (ItemInHierarchy)parent;
                return i.children.size();
            public boolean isLeaf(Object node) {
                ItemInHierarchy i = (ItemInHierarchy)node;
                return i.children.size()==0;
            public void valueForPathChanged(TreePath path, Object newValue) {
                // do nothing
            public int getIndexOfChild(Object parent, Object child) {
                ItemInHierarchy i = (ItemInHierarchy)parent;
                for (int k = 0; k < i.children.size(); k++) {
                    if (i.children.get(k).equals((ItemInHierarchy)child)) {
                        return k;
                return -1;
            public void addTreeModelListener(TreeModelListener l) {
                listenerList.add(TreeModelListener.class, l);
            public void removeTreeModelListener(TreeModelListener l) {
                listenerList.remove(TreeModelListener.class, l);
         * Cell renderer
        private class SimpleTreeCellRenderer extends JLabel implements TreeCellRenderer {
            public SimpleTreeCellRenderer() {
                setOpaque(true);
            public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
                // OK
                // setText(value.toString());
                // Not OK
                TreePath tp = tree.getPathForRow(row);
                if (tp!=null) {
                    setText(tp.getLastPathComponent().toString());
                } else {
                    setText("?");
                return this;
         * Item in hierarchy
        public class ItemInHierarchy {
            public List<ItemInHierarchy> children = new ArrayList<ItemInHierarchy>();
            public String name;
            public ItemInHierarchy() {
            public ItemInHierarchy(String name) {
                this.name = name;
            @Override
            public String toString() {
                return name;
        // main
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new treeUpdate().setVisible(true);
    }

    Kleopatra wrote:
    The only general way to hack-around, as far as I remember, is to force the VariableSomething out of the way and make a FixedSomething takes it place. No api, but you can reach that by doing both:
    - tree.setLargeModel(true)
    - tree.setRowHeight(somevalueabovezero)
    Your memory's fine. I ran a short test, this seems to make row- and value-arguments correspond to each other consistently.
    Kleopatra wrote:
    ... before expanding a node it calls the renderer with the row set to the the row following the row of the node to expand (same for all children)...I suspected something like this, and it opens up a way to solve my question, but it seemed like a too shallow basis for coding. I'm satisfied with fixed row heights, so I'll stick to your suggestion above, and I'll include a short equality test in getTreeCellRendererComponent(), just to make sure:
    value.equals(tree.getPathForRow(row).getLastPathComponent())Thanks for the help - Jan

  • Powershell update Field Value without changing version number

    I want to update a value in a field in a list for a lot of list items.
    However, this list has major and minor versioning turned on, and an approval process.
    When I update the field's value for all the required list items, I don't want the approval process to start and I don't want the version number to change.
    How can I do this?
    This is my code so far:
    $siteUrl = "http://portal"
    $listName = "list name"
    $field1_Name = "category"
    $web = Get-SPWeb -Identity $siteUrl
    $list = $web.Lists[$listName]
    $items = $list.Items
    ForEach ($item in $items)
        if ($item[$field1_Name].ToString() -eq "testing") 
     $url = [String]::Format("{0}/{1}",$web.Url, $item.File.URl)
         $file = $web.GetFile($url)
     $file.CheckOut()
     write-host $item.name
           $item[$field1_Name] = "testing again"
           $item.Update()
     $file.CheckIn("updated category name", [Microsoft.Sharepoint.SPCheckinType]::MajorCheckIn))
    $web.Dispose()

    Instead of calling $item.Update() call $item.SystemUpdate($false);  That will update the fields without incrementing he version number of the listitem.  Read about it here:
    http://msdn.microsoft.com/EN-US/library/office/ms481195(v=office.14).aspx
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Query using field MWSKZ without using BSEG

    Hi,
    I'm trying to create an Infoset (t-code SQ02) that will contain the field MWSKZ (Tax on sales/purchases code).
    This field is located in the table BSEG and I get the message: «Table BSEG cannot be used in a join» when I try to create an infoset using BSEG.
    Is MWSKZ (Tax on sales/purchases code) located in any other table?
    Thanks,
    Julien

    BSIK, BSAK, BSID, BSAD.
    But I'm not sure how useful these tables will be in a JOIN.
    Rob
    Edited by: Rob Burbank on Apr 23, 2009 2:53 PM

Maybe you are looking for

  • Return Delivery of Material Document as in MIGO.

    Hi  guys, Is there any bapi or function  module that  simulates the Return Delivery of Material Document as done in MIGO transaction. I have checked BAPI_GOODSMVT_CREATE but, this is not exactly matching the Return Delivery process(i.e, therez no fie

  • Please help me. Can't install Oracle 9i on linux

    Hi, I have download all three filez and gunzip and cpio all the filez and put them under my /home/daniel/Disk(1,2,3) And afterwards, I go into the /Disk1/install/linux and run the runInstaller.sh script....or runInstaller. nothing happen. Could anyon

  • Four finger swipe not working

    It worked fine til I updated iPhoto earlier today. Anyone have suggestions on how to get it working again? TIA

  • Error in Database Load (post processing)

    Hi, i have a problem when install the Database Instance. In the step "Database Load (post processing)". Error: ERROR 2007-01-16 18:33:23 MSC-01015 Process finished with error(s), check log file D:\users\bpmadmin\install/SAPVIEW.log ERROR 2007-01-16 1

  • My Mac Mini doesnt appear on my list of devices

    I see 6 devices. I just brought my MM in to the Apple store for work . It is under apple care yet it doesnt appear in my devices so I cant schedulae a genius bar appt. what a hassle...