Group by position

Does Oracle support group by position. I am receiving an error. I read somewhere that Oracle does not support but I just want to confirm.
For example select empid, empname from employee group by 1
Thanks,

Hi,
877365 wrote:
Does Oracle support group by position. No, sorry. "ORDER BY 1" works, but nothing besides ORDER BY does that. Outside of the ORDER BY clause, 1 just means the number 1.

Similar Messages

  • Group vs Position Look and Feel

    Greetings
    Is it possible for a field (eg: Position) on the assignment form to be configure so that it can behave with the same "pop open" personality as the Group field (PGKFF) - what would be required to get to this level?
    Regards
    Craig

    This will be hard to accomplish, since the positions are already defined (hence a flat lov), while the people group segments are set only at assignment level.
    Forms Configurator is maybe a workaround, or Forms personalizations. But never tried it for this kind of functionality.

  • P&L Report-Account Group Hierarchy -Position of lower nodes above

    I define P&L Statement hierarchy in ERP using  T Code: KDH2 (account group). The reason why  I don't use standard financial statement version is because it can't include cost object /cost element in the hierarchy.
    Then I designed a query using Bex Query designer. In row item "account number", I tagged the accoung group as hierarchy and select "position of Lower-level Nodes": above
    However, in crystal report, when I recall the database, it is displayed as "higher nodes above." e.g. cost of sales include lower nodes of Material cost and labor cost, it display in Crystal report as:
    Cost of Sales                                5000
                  Material Cost                        3000
                  Labor Cost                           2000
    I want it to display as "lower nodes above":
                 Material Cost                        3000
                 Labor Cost                           2000
    Cost of Sales                                5000
    I have tried in crystal report desinger- -change group option- sort in original order, in asending, in desending , it doesn't work as "lower node above". (i have to group the account ID)
    I don't want to use "sort in specific order" in group option because if it is hard coded, it doesnt faciliate future changes if user changes account group hierarchy in SAP ERP KDH2 (account group).
    To sum up, is there anyone can tell me how to show the hierarchy in Crystal Report as "lower node above"?
    Regards,
    Frances

    I find the solution by myselr: just put the account code in crystal report group footer rather than the group header, it will show lower nodes above as
    Material cost 2000
    Labor cost 3000
    Cost of Sales 5000
    Edited by: Jixiang Fan on May 14, 2011 12:12 PM

  • Getting Group/Node position &orientation after a Transformation(s)

    I have a set of objects in a scene that are grouped in various ways with controls to rotate these groups around each axis. After a rotation I'd like to be able to re-group the objects in the scene in a different way and then do other transformations from this new state. When I un-group the original grouping I lose the transformation information that was applied to that group (as I expect).
    My question is: at the point where the first grouping has been transformed is there a way to apply the sum of the transformations to the individual objects being transformed within JavaFX? It seems that JavaFX knows this information as it has the object at that location and orientation in the scene - I just do not see any way to get it.
    Currently I am having to do this transformation outside of JavaFX and then apply it to each object in the group. I've looked through all of the java docs but cannot seem to find anything that does this.
    Thanks,
    Gene

    There are a couple of (unresolved) Jira issues related to this =>
    http://javafx-jira.kenai.com/browse/RT-520 (Add "localToParentTransform" and "localToSceneTransform" .. to Node)
    http://javafx-jira.kenai.com/browse/RT-17943 (Add getWorldTransform to public API)

  • How to tag grouped and position locked images

    Hey, found that script does not work when the image is being grouped and locked..
      I tried to unlock it's parent first then tag the image.
    but...
    There's a problem here, if the image was grouped many times..
    how to unlock ALL it's ancestors??
    What shld be the correct script here... HELP...someone
    I'm beginning to hate CS3 and CS4... so many restrictions here and there.

    It would help if you identified the scripting language you're using and if you provided some indication of your current attempt to solve the problem at hand. Are you speaking of xml tagging?
    [eboda_snaf] yes
    To unlock all the items in a group, starting with an image in that group, is an interesting little project. I'd tackle it along these lines:
    1. Look up the parental hierarchy until to get to a group whose parent is a page or a spread. [If you're allowing for the possibility that the original image is anchored to some text in a text frame that is part of a group, things get a little more complicated because then you'll need the parentTextFrame of character -- and you have to allow for the possibility that the text is overset.]
    [eboda_snaf] will try that, btw you have any samples?
    2. Using the allPageItems property of the group, iterate through each member of the group and make sure its locked property is false.
    I don't see how CS3/CS4 is any more restrictive in this regard than was CS2. Do you have a CS2 solution to this issue that doesn't work in CS3? If so, please post it.
    [eboda_snaf]
    In CS2, using the direct selection tool, I'm able to select and tag the image even if it's grouped and locked, no script needed at all, no sweat and fast!
    In fact we are doing that currently.
    In CS3 and CS4, I can't do that. It will give a stupid warning message "Cannot modify elements that contain locked content, or are contained by locked content. Please unlock or check out the content and try again."
    So need to unlock the parent first. To make matter worse, grouped objects will need to unlock all the great great great grandparents first!
    Such a hassle, just doing a simple xml tagging task.
    Dave

  • Template for Position Based Role Generation - Grouping of Transaction

    Hi
    We have almost 3500 Roles. They are all Role based / Transaction Based. We would like to shift it to Position Based Roles.
    Is there any template or high level document which can give you the information regarding the grouping of transaction with respect to module vise like HR, SD, MM, PP etc..
    It should narrow down further to give you info regarding the transactions with respect to the the standard postions provided by SAP which we can use it as a baseline and develop on that.
    Any help would be appreciated.
    Thanks and Regards
    Arun

    Hi,
    please have a look at the standard SAP* roles. They are grouped by applicaiton and alos some are grouped by position. So this may be an entry point for you.
    b.rgds, Bernhard

  • How to setup grow/shrink behavior on a moving group?

    SD project. Group consists of 18 evenly spaced SD video clips each individually sized to 40%. The group is positioned near the top of the screen at 100% size.
    The group then marches smoothly across the screen by transforming position X over 36 seconds using linear interpolation.
    I am trying to cause the group (10 seconds into the timeline) to smoothly increase in size by applying a grow/shrink behavior over 3 seconds while continuing the X transform.
    Position Y is changed to keep the location of the top of the group the same while the group grows.
    Starts OK and ends OK. Works fine all the way to the end once the behavior finishes. Using the same X transform.
    The problem is that during the grow behavior the apparent X and Y axis motion behaves incorrectly. The motion appears to change speed and even briefly reverses direction.
    I understand why this is happening but I don't know how to fix it.
    I have tried every combination of interpolation for the transforms along with every variation of the grow behavior parameters I can think of.
    Everything I have tried makes things worse and/or introduces unwanted side effects.
    Any thoughts?

    I tried to implement what you were talking about. Just to make it easier on myself, I did use a 18 piece replicator instead of 18 individual files...so hopefully that doesn't change things. I did not get any reverse or weird X,Y behaviors acting incorrectly. It started at timeline 10:00 and ended at timeline 13:00, grew 120%, and the group had an anchor point set to the top of the group so it would only grow bottom and to the sides. Stuck with the same interpolation and everything. The only thing that looked weird was that the boxes pop back in place after the grow/shrink is done. Which is just because the behavior ends. Now! something that was odd was that I couldn't keyframe any parameters in the behavior?

  • Position key flex filed not populating in Position Flexfiled Structure

    I have created a Position Key Flex field. While Creating Business Group Organization, Position key Flex Field is not populating in Position Flexfiled Structure Field.
    Work Structure > Organization > Description
    Org Classification : Business Group

    check below -
    Unable to Select new Flexfield Structure for the Business Group [ID 390314.1]
    Also, did you check if your Position flexfield is compiled saved properly ?

  • Finance Position at Genentech.  Company contact email listed at bottom of description.

    Genentech is the founder of the biotechnology industry and is instrumental in all areas of drug development from research to manufacturing and commercialization. The company has over $3 billion in revenues and over 6,000 employees, most of which are based in or near the Bay Area. Our corporate headquarters is located on a beautiful campus, which overlooks the San Francisco Bay in convenient South San Francisco. The Company ranks 15 on Fortune?s 100 Best Companies to work for in 2004. Please visit our website to learn more about our Company: www.genentech.com.We are currently looking for a Business Systems Analyst to function as an Essbase Administrator. This position rolls up in Finance and is considered a key point of contact for the entire company?s budgeting process. This role is ideal for someone with a solid mix of finance experience and systems savvy. This role can lead to advancement within the Finance organization or as a transition point into a more systems-focused role.TITLE: Business Systems Analyst IIREQUIREMENTS:This position requires a solid understanding of financial accounting activities and business cycles. The successful candidate must demonstrate strong analytical skills with respect to accounting data and systems-related issues. Effective and timely communications with Corporate customers is required for this position.RESPONSIBILITIES:This position will collaboratively interact with Corporate Finance customers and Corporate Information Technology (CIT). The Candidate?s primary role is to manage and administer the systems for the Corporate Budget and Rolling Forecast processes in a tight timeline environment. Other responsibilities include customer software installation and support, systems security maintenance, and liaison with CIT to troubleshoot server issues and optimize hardware performance.PURPOSE:As part of the Financial Systems Group, this position will provide systems administration support to Corporate Finance customers (i.e., Financial Planning & Analysis, Collaborations Finance, Corporate Financial Services, and Corporate Treasury)EDUCATION:BS/BA in Finance/Accounting. An MBA is a plus.EXPERIENCE:3 or more years of finance and/or systems analysis experience. Working knowledge of financial data retrieval, reporting and analysis tools in a PC environment is preferred. Working experience with any of the following applications is highly desired: Hyperion Essbase or Planning, Cognos PowerPlay, Adaytum Analyst/Cognos Planning, and/or Lawson Financial.SKILLS:Requires excellent interpersonal and communication skills as well as strong analytic problem solving abilities. Requires ability to use Microsoft Office?s suite of products.Please note that Genentech is not working with agencies on this position. Please email your resume to [email protected] as a Word attachment. Please include ?Business Systems Analyst II? in the subject line of the email.

    Keep in mind, each source that you are importing contact information from has its own platform and technology being used which can be different than the platform on the device. Based on the multiple topics that you bring up, and to ensure that I address your concerns fully, please send me a private message with your Verizon Wireless cell phone number, a callback number where I can reach you, and the best time to contact you.  You will want to provide a call back number since you will need to be off of your device when we talk.  
    In the meantime, you can view some general information at the link provided below:
    http://support.vzw.com/swf/droid2/simulator.html
    KellyW@VZW

  • Finance Position at Genentech.  Company contact email listed below.

    Genentech is the founder of the biotechnology industry and is instrumental in all areas of drug development from research to manufacturing and commercialization. The company has over $3 billion in revenues and over 6,000 employees, most of which are based in or near the Bay Area. Our corporate headquarters is located on a beautiful campus, which overlooks the San Francisco Bay in convenient South San Francisco. The Company ranks 15 on Fortune?s 100 Best Companies to work for in 2004. Please visit our website to learn more about our Company: www.genentech.com.We are currently looking for a Business Systems Analyst to function as an Essbase Administrator. This position rolls up in Finance and is considered a key point of contact for the entire company?s budgeting process. This role is ideal for someone with a solid mix of finance experience and systems savvy. This role can lead to advancement within the Finance organization or as a transition point into a more systems-focused role.TITLE: Business Systems Analyst IIREQUIREMENTS:This position requires a solid understanding of financial accounting activities and business cycles. The successful candidate must demonstrate strong analytical skills with respect to accounting data and systems-related issues. Effective and timely communications with Corporate customers is required for this position.RESPONSIBILITIES:This position will collaboratively interact with Corporate Finance customers and Corporate Information Technology (CIT). The Candidate?s primary role is to manage and administer the systems for the Corporate Budget and Rolling Forecast processes in a tight timeline environment. Other responsibilities include customer software installation and support, systems security maintenance, and liaison with CIT to troubleshoot server issues and optimize hardware performance.PURPOSE:As part of the Financial Systems Group, this position will provide systems administration support to Corporate Finance customers (i.e., Financial Planning & Analysis, Collaborations Finance, Corporate Financial Services, and Corporate Treasury)EDUCATION:BS/BA in Finance/Accounting. An MBA is a plus.EXPERIENCE:3 or more years of finance and/or systems analysis experience. Working knowledge of financial data retrieval, reporting and analysis tools in a PC environment is preferred. Working experience with any of the following applications is highly desired: Hyperion Essbase or Planning, Cognos PowerPlay, Adaytum Analyst/Cognos Planning, and/or Lawson Financial.SKILLS:Requires excellent interpersonal and communication skills as well as strong analytic problem solving abilities. Requires ability to use Microsoft Office?s suite of products.Please note that Genentech is not working with agencies on this position. Please email your resume to [email protected] as a Word attachment. Please include ?Business Systems Analyst II? in the subject line of the email.

    Hi Lazar,
    We have a blog post that covers this topic : Eloqua REST API - How to update a Contact's Email Address. Please let me know if you need any more information.
    Hope you find this helpful.
    Thanks,
    Fred

  • Control Append KM, Group by clause

    Hi All,
    I am trying to use max function in interface (KM: IKM control append), in the mapping apart from the columns from source data store i am using few ODI variables (say LD_ID=200). Somehow LD_ID variable is being picked up by the KM in the group clause, because of this the job is failing with the error
    GROUP BY position 200 is not in target list. I understand the error but not sure why this variable is picked up in the grop by clause. The substituition method i see in the KM is odiRef.getGrpBy()
    Can someone please help me with this?
    Thanks,
    Ashok

    Thanks for your Response Bhabani, Jerome.
    Group by Substitution method in ODI normally picks up only columns that are referred from source. In this case LD_ID is a variable and it shouldnt be taken into consideration.
    This was working fine in 10G, the error is specific to 11G.
    Thanks,
    Ashok

  • How do I resize a div/element that's position fixed with css ?

    Supper,
    I set up a fixed element using this code in stage/ composition ready :
    sym.$("body").append(sym.$("Group").css({"position":"fixed"}));
    The element does "position:fixed" but its size has changed.
    How do I resize it to its previous size?
    I tried the same css insertion method with size properties as I used in "fixed"( example above) .
    It Failed.
    So second question is based on that it also loses its "responsive scaling" properties
    (just the "fixed" element not the rest of the project)
    and no longer zooms in scale.
    Can I fix an elements position and maintain scaling with the rest of the project at 100% width?
    My objective is to scroll under a fixed element scaled to fit browser.
    Thank You,
    Henry

    According to the InDesign Help file:
    Do one of the following:
    (Windows) Start InDesign, and then press Shift+Ctrl+Alt. Click Yes when asked if you want to delete preference files.
    (Mac OS) While pressing Shift+Option+Command+Control, start InDesign. Click Yes when asked if you want to delete preference files.

  • Assign a user ID (purchaser) to multiple position in org structure

    Hello,
    We have SRM ECS 5.0.
    We would like that the buyers can be assigned to multiple purchasing groups in order they can view all the SC related to those purchasing groups in the Worklist of the sourcing cockpit.
    Is it possible ?
    I'm able to assign the user ID to several position created under the purchasing groups in the organizational structure, but then when I log on to the webUI, in the sourcing cockpit I can only see the SC from 1 purchasing group in the Worklist tab.
    For example:
    user buyer1 is assigned to position "purchasing group 1 position" and to "purchasing group 2 position" in the org structure.
    First he was created under "purchasing group 1 position", then I added the user to the position "purchasing group 2 position".
    When I log on to the system with this user, in the sourcing cockpit, in the worklist tab, I can only see SC for purchasing group 1.
    Thanks for your help.
    Marc

    Hi Marc,
    SRM does not allow one particular purchaser assigned to multiple purchasing groups at the same time. It is like you cannot ride two horses at the same time.
    However, you can follow the below workaround if you want a particular purchaser to do buying for multiple purchase organizations.
    first, let assign the buyer 1 to purchasing group 1 (which is inturn assigned to purchase organization 1). Now, in order to enable the buyer to do purchasing for purchasing group 2 (which is inturn assigned to Purchasing organization 2) and purchasing group 3 (which is in turn assigned to Purchasing Orgaization 3), you can follow the below steps:
    1. Go to the responsibilities tab of the purchasing group 1.
    2. Assign the purchasing organization 1 first in the org unit table.
    3. Then, assign the purchasing orgaization 2 and and 3 in the org unit tab.
    Now, the purchaser will be able to see  shopping cart or purchase order for his own Purchase organization as well as purchase org 2 and 3.
    I hope, it helps you to meet the requirement.
    Thanks and regards,
    Ranjan

  • Query for Finding the Date History

    Hi Geeks,
    My Table looks like this
    Employee Assignment Position     Job     Grade     Start_date     End_date
    101 132 2055 Clerk C01 10-Mar-00 11-Feb-01
    101 132 2055 Clerk C02 12-Feb-01 15-Dec-01
    101 132 2056 Clerk C02 16-Dec-01 22-Jul-03
    101 132 2055 Clerk C03 23-Jul-03 31-Dec-4000 --(unassigned)
    Now I need output like
    Employee Assignment Position Start_date End_date
    101 132 2055 10-Mar-2000 15-Dec-2001
    101 132 2056 16-Dec-2001 22-Jul-2003
    101 132 2055 23-Jul-2003 31-Dec-4000 --(unassigned)
    The following important things are to be considered
    1. Rows to be grouped by position
    2. Each row much have the start date and end date of the employee position. If the employee is the same postion and different grade or job that doesnt matter. But if the employee jumps from his position (2055) to 2056 and after sometime he comes to the same position (i.e. 2055) the date history should be separate.
    I am unable to derive the logic also. I think we need to create a function for this.
    Kindly help me out.
    Thanks in Advance
    Punithavel
    Message was edited by:
    Punithavel
    Message was edited by:
    Punithavel

    Too difficult to read. I have no database access to test (usually I use a step by step approach, proceeding with the next step when the current one is OK).
    I can describe a general idea (may post something afterwards with no promise it will work)
    step 1: mark the position changes
    step 2: retain only mark 1 and mark max(mark) of each group
    step 3: make a single row from the two rows of each group
    Regards
    Etbin
    with
    marking as
    (select employee,assignment,position,start_date,end_date,
            row_number() over (partition by employee,assignment,position order by start_date) the_mark
       from the_table
    collecting as
    (select employee,assignment,position,start_date,end_date,the_mark
       from marking m
      where the_mark = 1
         or the_mark = (select max(the_mark)
                          from marking
                         where employee = m.employee
                           and assignment = m.assignment
                           and position = m.position
                         group by employee,assignment,position
                         having count(*) > 1
    combining as
    (select employee,assignment,position,
            case when the_mark = 1 then start_date end start_date,
            case when the_mark = 1
                 then case when lead(position,1) over (partition by employee,assignment,position order by start_date) = position
                           then lead(end_date,1) over (partition by employee,assignment,position order by start_date)
                           else end_date
                      end
            end end_date
       from collecting
    select employee,assignment,position,start_date,end_date
      from combining
    where start_date is not null
    order by employee,assignment,position,start_date*** not tested ***
    Message was edited by: Etbin
    user596003
    on a lazy afternoon I took a look at your friend's solution too and I like it.
    It's more concise than mine (defining starts and ends).
    Not being able to test it the only problem in his solution might be the absence of order by clauses to assign correct rownums
    WITH lag_and_lead AS
    (SELECT employee,assignment,position,start_date,end_date,
            LAG (position) OVER (PARTITION BY employee,assignment ORDER BY start_date) AS lag_position,
            LEAD (position) OVER (PARTITION BY employee,assignment ORDER BY start_date) AS lead_position
       FROM your_table
      ORDER BY employee,assignment,start_date
    starts AS
    (SELECT employee,assignment,position,start_date,ROWNUM rn
       FROM lag_and_lead
      WHERE position <> lag_position
         OR lag_position IS NULL
      order by employee,assignment,start_date
    ends AS
    (SELECT employee,assignment,position,end_date,ROWNUM rn
       FROM lag_and_lead
      WHERE position <> lead_position
         OR lead_position IS NULL
      order by employee,assignment,start_date
    SELECT starts.employee,starts.assignment,starts.position,starts.start_date,ends.end_date
      FROM starts,ends
    WHERE starts.employee = ends.employee
       AND starts.assignment = ends.assignment
       AND starts.position = ends.position
       AND starts.rn = ends.rn
    EMPLOYEE ASSIGNMENT POSITION JOB   GRADE START_DATE  END_DATE
         101        132     2055 Clerk C01   10-Mar-2000 11-Feb-2001
         101        132     2055 Clerk C02   12-Feb-2001 15-Dec-2001
         101        132     2056 Clerk C02   16-Dec-2001 22-Jul-2003
         101        132     2055 Clerk C03   23-Jul-2003 31-Dec-4000
    lag_and_lead
    EMPLOYEE ASSIGNMENT POSITION START_DATE  END_DATE    lag_position lead_position
         101        132     2055 10-Mar-2000 11-Feb-2001         null          2055
         101        132     2055 12-Feb-2001 15-Dec-2001         2055          2056
         101        132     2056 16-Dec-2001 22-Jul-2003         2055          2055
         101        132     2055 23-Jul-2003 31-Dec-4000         2056          null
    starts
    EMPLOYEE ASSIGNMENT POSITION START_DATE  rn
         101        132     2055 10-Mar-2000  1
         101        132     2056 16-Dec-2001  2
         101        132     2055 23-Jul-2003  3
    ends
    EMPLOYEE ASSIGNMENT POSITION END_DATE    rn
         101        132     2055 15-Dec-2001  1
         101        132     2056 22-Jul-2003  2
         101        132     2055 31-Dec-4000  3
    EMPLOYEE ASSIGNMENT POSITION START_DATE  END_DATE
         101        132     2055 10-Mar-2000 15-Dec-2001
         101        132     2056 16-Dec-2001 22-Jul-2003
         101        132     2055 23-Jul-2003 31-Dec-4000Regards
    Etbin
    Message was edited by: Etbin
    user596003

  • Pagination example 1 ... | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17

    Hello there. As I have sought out a reasonable solution for paging nagivation and compared designs such as Google's search result paging to designs such as this forum's paging navigation, I have decided to go with this forum's design which I found somewhat better and more of a challenge. I did however, step it up a notch and attempt to improve it by acheiving a constant page group return size (with the exception of undersized page group lists and end groups that don't span the default page group size). This is one behaviour I noticed this forum's paging lacking. You can notice it when you are first starting your paging through the forum, the number of pages listed varies each time you page forward/backward until you reach a stable point deeper into the pages.
    This paging utility, however, maintains a constant page group list size which may be preferred when looking to fit the navigator into a constrained area.
    Anyhow, the following is a complete working example:
    package web.util;
    import java.util.ArrayList;
    import java.util.List;
    * @author javious
    public class Pagination {
        /** Creates a new instance of Pagination */
        public Pagination() {
         * @param totalItems is the total of all items to be paged.
         * @param currentPage is a page from the returning list to be currently displayed.
         * @param defaultCursorPosition (zero based) is the usual position within the
         *        returning list in which
         *        we want to display the current page. Should the current page be less than
         *        this position, then this parameter gets overridden with the page's position.
         *        Should the current page be greater than the final(of the last page group)
         *        page position minus the preferred page position, then this
         *        parameter gets overridden with the page's position.
         * @return List of page numbers in relation to the supplied parameters.
        public static List<Integer> getList(int totalItems,
                                            int currentPage,
                                            int resultPageSize,
                                            int pageGroupSize,
                                            int defaultCursorPosition)
            List<Integer> pageList = new ArrayList<Integer>();
            // first obtain the first item index of the absolute last page of
            // all known records.
            int finalPageItemStartIndex = (totalItems - totalItems % resultPageSize);
            if(totalItems % resultPageSize == 0)
                finalPageItemStartIndex-=resultPageSize;
            // Now obtain the final page index
            int finalPage = 0;
            if(finalPageItemStartIndex > 0)
                finalPage = 1+(int)Math.ceil((double)finalPageItemStartIndex/resultPageSize);
            int offset = pageGroupSize;
            if(currentPage > defaultCursorPosition)
                offset -= defaultCursorPosition;
            else
                offset -= (int)Math.min(pageGroupSize, currentPage);
            int endPage = Math.min(finalPage, currentPage + offset);
            int startPage = 0;
            if(currentPage > defaultCursorPosition && finalPage >= endPage)
                startPage = Math.max(1,endPage - pageGroupSize + 1);
                pageList.add(0);
            for(int i=startPage;i<endPage;i++)
                pageList.add(i);
            return pageList;
    }and the initial servlet
    package web;
    import java.io.*;
    import java.net.*;
    import java.util.ArrayList;
    import java.util.List;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import web.util.Pagination;
    * @author javious
    * @version
    public class PaginationTest extends HttpServlet {
        private static final int testItems[][] = {new int[210],
                                            new int[133],
                                            new int[7], // good test for within boundaries
                                            new int[111],
                                            new int[10], // good test of matching group size.
                                            new int[20] // good test of divisible
        static {
            for(int i=0;i<testItems.length;i++)
                for(int j=0;j<testItems.length;j++){
    testItems[i][j] = (int)Math.ceil(Math.random()*10000);
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    int resultPageSize = 10;
    int pageGroupSize = 10;
    int defaultPageCursorPosition = 3;
    response.setContentType("text/html;charset=UTF-8");
    // add parent total so jsp can list links for them.
    request.setAttribute("parentTotal", testItems.length);
    String sParentIndx = request.getParameter("parentId");
    String sCurrentPage = request.getParameter("itemPg");
    int parentIndex = (sParentIndx != null ? Integer.parseInt(sParentIndx) : 0);
    int currentPage = (sCurrentPage != null ? Integer.parseInt(sCurrentPage) : 0);
    request.setAttribute("parentId", parentIndex);
    request.setAttribute("itemPg", currentPage);
    int targetItems[] = testItems[parentIndex];
    int totalItems = targetItems.length;
    int startIndex = currentPage*resultPageSize;
    request.setAttribute("pageStart", startIndex+1);
    int maxResultIndex = Math.min(totalItems, startIndex + resultPageSize);
    List pageItems = new ArrayList();
    for(int i=currentPage*resultPageSize;i<maxResultIndex;i++)
    pageItems.add(targetItems[i]);
    request.setAttribute("pageItems", pageItems);
    // add totalPages so jsp can determine whether or not
    // to show "previous" link
    int totalPages = totalItems/resultPageSize; // 2 pages = 0 to 1
    if(totalItems % resultPageSize > 0)
    totalPages++;
    request.setAttribute("totalPages", totalPages);
    // add this so jsp can tell when to add "..."
    request.setAttribute("defaultPageCursorPosition", defaultPageCursorPosition);
    List pageList = Pagination.getList(totalItems, currentPage,
    resultPageSize, pageGroupSize, defaultPageCursorPosition);
    request.setAttribute("pageList", pageList);
    request.getRequestDispatcher("pagination_test.jsp").forward(request,response);
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    public String getServletInfo() {
    return "Short description";
    and now for the nagivator portion of your JSP/JSTL
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%--
    The taglib directive below imports the JSTL library. If you uncomment it,
        you must also add the JSTL library to the project. The Add Library... action
        on Libraries node in Projects view can be used to add the JSTL 1.1 library.
        --%>
        <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
           "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    <STYLE type="text/css">
    .pagingLink {text-decoration: none}
    </STYLE>
    </head>
    <body>
    <h1>Parent Lists</h1>
    <c:forEach begin="0" end="${parentTotal-1}" var="indx" varStatus="loopStat">
    <c:choose>
    <c:when test="${parentId == indx}">
    <b>${loopStat.count}</b>
    </c:when>
    <c:otherwise>
    <a href="PaginationTest?parentId=${indx}">${loopStat.count}</a>
    </c:otherwise>
    </c:choose>
    </c:forEach>
    <h1>Items</h1>
    <ol start="${pageStart}">
    <c:forEach var="item" items="${pageItems}" varStatus="loopStat">
    <li>${item}
    </c:forEach>
    </ol>
    <table border="0" cellpadding="2" cellspacing="1">
    <tr>
    <c:if test="${itemPg-1 >= 0}">
    <td><a class="pagingLink" href="PaginationTest?parentId=${parentId}&itemPg=${itemPg-1}"><<</a>
    </td>
    </c:if>
    <%-- Loop through paging numbers list --%>
    <c:forEach var="pg" items="${pageList}" varStatus="loopStat">
    <c:if test="${!(loopStat.index eq 0 and loopStat.last)}">
    <td>
    <c:if test="${loopStat.count > 1}">
    |
    </c:if>
    <c:choose>
    <c:when test="${itemPg == pg}">
    <b>${pg+1}</b>
    </c:when>
    <c:otherwise>
    <a class="pagingLink" href="PaginationTest?parentId=${parentId}&itemPg=${pg}">${pg+1}</a>
    <c:if test="${loopStat.count == 1 && itemPg > defaultPageCursorPosition}">...</c:if>
    </c:otherwise>
    </c:choose>
    </td>
    </c:if>
    </c:forEach>
    <c:if test="${itemPg+1 < totalPages}">
    <td><a class="pagingLink" href="PaginationTest?parentId=${parentId}&itemPg=${itemPg+1}">>></a>
    </td>
    </c:if>
    </tr>
    </table>
    </body>
    </html>

    hi
    I m giving a code for pagination. this is for displaying 5 records per page i think it may help ful to you
    <html>
    <body>
    <link href="Stylesheet/style.css" rel="stylesheet" type="text/css">
    <script language="javascript" src="TableSort.js">
    </script>
    <br>
    <br>
    <center><H2> Student Details </H2></center>
    <%
                   int loop_var=Integer.parseInt(request.getParameter("i"));
                   Vector vecResults=new Vector();
    // store the records in vector
                   vecResults=dataAccessLayer.readObjects("QueryToAllStudents");
                   String strSortable="sortable";
                   int rec=vecResults.size();
                   int i=0,roll_number;
                   HashMap hmRecord;
                   if (rec==0)
                        roll_number=1;
                   else
                        hmRecord = (HashMap)vecResults.elementAt(rec-1);
                        roll_number=Integer.parseInt((String )hmRecord.get("std_rno"))+1;
                   session.setAttribute("roll_number",roll_number+"");
                   if (rec==0)
                        out.println("There are no records in database please enter");
    %>
                        <br>
                        Add &nbsp
    <%
                   else
    %>
                             <table border="1" width="70%" align="center" id="studentdetails" class=<%=strSortable%>>
                                       <tr>
                                       <th bgcolor="PINK" sort="true" align=center>Roll No</th>
                                       <th bgcolor="PINK" sort="true" align=center>Name </th>
                                       <th bgcolor="PINK" sort="true" align=center>Date Of Birth </th>
                                       <th bgcolor="PINK" sort="true" align=center>Subject1 </th>
                                       <th bgcolor="PINK" sort="true" align=center>Subject2 </th>
                                       <th bgcolor="PINK" sort="true" align=center>Subject3 </th>
                                       <th bgcolor="PINK" sort="true" align=center>Total </th>
                                       <th bgcolor="PINK" sort="true" align=center>Modby </th>
                                       </tr>
    <%
                             String s;
                             while (i<5 && loop_var<rec)
                                       hmRecord = (HashMap)vecResults.elementAt(loop_var);
                                       s=((String )hmRecord.get("std_dob")).substring(1,10);
    %>
                                       <tr>
                                       <td><center><%=hmRecord.get("std_rno")%></center></td>
                                       <td><center><%=hmRecord.get("std_name")%></center></td>
                                       <td><center><%=s%></center></td>
                                       <td><center><%=hmRecord.get("std_sub1")%></center></td>
                                       <td><center><%=hmRecord.get("std_sub2")%></center></td>
                                       <td><center><%=hmRecord.get("std_sub3")%></center></td>
                                       <td><center><%=hmRecord.get("std_tot")%></center></td>
                                       <td><center><%=hmRecord.get("std_modby")%></center></td>
                                       </tr>
    <%
                                       loop_var++;
                                       i++;
    %>
                             </table>
                             <center>
                             <br>
                             <br>
    <%
                             if (loop_var>=11)
    %>
                                  <a href="List.jsp?i=<%=(((loop_var/5)*5)-5)%>">Prev &nbsp|</a>
    <%                    }
                             else
    %>
                                  <a href="List.jsp?i=<%=0%>">Prev &nbsp|</a>
    <%                    }
                             int j=1;
                             for (i=0;i<rec/5;i++,j++)
    %>
                                       <a href="List.jsp?i=<%=(i*5)%>"><%=j%>&nbsp|</a>
    <%
                             if (rec%5!=0)
    %>
                                       <a href="List.jsp?i=<%=(i*5)%>"><%=j%></a>
    <%
                             if (loop_var<rec)
    %>
                                  <a href="List.jsp?i=<%=loop_var%>">| &nbsp Next</a>
    <%                    }
                             else
                             if (rec%5==0)
    %>
                                  <a href="List.jsp?i=<%=(loop_var-5)%>">| &nbsp Next</a>
    <%                    }
                             else
    %>
                                  <a href="List.jsp?i=<%=(loop_var-rec%5)%>">| &nbsp Next</a>
    <%
    %>
                             </center>
                             <br>
                             <br>
                             Add &nbsp
                             Edit / Delete &nbsp
                             List
    <%
    %>
         </body>
         </html>

Maybe you are looking for

  • Microphone on iPad 3 stopped working.reset doesn't work

    HEllo, Can anyone help me in regards to the microphone on ipad3? It was working fine yesterday but today it doesn't work. I tried resetting by holding the home and power button, restored original settings and nothing. Anyone had this problem? What do

  • T-code FB08

    Can anyone tell me about the user exits in T-code FB08. Can we reverse the one line item in one doc. corresponding to the other open line item in other document of same amount.

  • How to sort as per variant

    Dear All, Can I sort an internal table in a report, according to the variant of the report. The report gives the production figures of different materials. The user wants the order of material same as in his variant. How can I achieve this. {ls sugge

  • All icons and pictures are negative like.  How do I fix?

    How do I fix iPad when all my pictures And icons look like negatives?  Colors that do show are opposites ex. Green is orange .

  • Clipping path edge

    I'm doing some clipping paths on images where the client also wants the background removed. If I place an image with a path into ID with the background still there, the edge is fine. If I place the same image with the same path but with the backgroun