How to get row number in the fetch row itself in Sql Query ?

Hi,
i am fetching some rows from a sql query . Is there any way to get row number as well in each row while all rows are fetched ?
like this :
RowNum data1 data2
1 abc ere
2 bnh ioi

Hello
Ofcourse you can get the rownum inside a query, just keep in mind that the rownum is the number of order in which the records were fetched from the table, so if you do an order by, the rownum will not be sequential, unless you query the information in a subquery first.
SELECT rown, col1, col1
FROM table
Or
SELECT rownum, col1, col2
FROM (SELECT col_1, col_2 FROM table ORDER BY col1)
Regards
Johan

Similar Messages

  • How to get page number from the PDF using Javascript

    Hi,
    We are having list of Single page PDF. The pdf are named in the order,
    ISBN_Author_01.PDF  (with real page number as i)
    ISBN_Author_02.PDF  (with real page number as ii)
    ISBN_Author_03.PDF  (with real page number as iii)
    ISBN_Author_04.PDF  (with real page number as 1)
    ISBN_Author_05.PDF  (with real page number as 2)
    ISBN_Author_06.PDF  (with real page number as 3)
    ISBN_Author_nn.PDF  (with real page number as 500)
    Here each pdf has a page number and in sequential order.
    The task is to check whether all the pdfs are in sequential order (i.e i, ii, iii, 1, 2, 3). If any page is missing, the script should throw an error report.
    To do this task, I am writing a Javascript to get the real page number from the PDF.
    Can anybody help me how to get the page number from the PDF using Javascript.
    Thanks,
    Gopal

    The "real" page number within a PDF is the count of the physical page starting at 0, zero.
    pageNum numPages
    The number printed on each page is the page label.
    setPageLabels  getPageLabel
    You will have to open each PDF and your script would need to know the page label for that file. I would expect you would need to build a 2 dimensional  array of the file names and the page label for the page within that array.

  • How to get personnel number of the user in the wd java code in Leave reques

    Hi all,
    we are using the standard Leave Request Applicatin ESS.
    can any one please tell me how to get the personnel number of the user in the WD java code?
    cause i have pass the pernr number to a bapi and get the details.
    please help me its urgent.
    thanks in advance.

    Hi Madhu,
    Create a model for the particular bapi in wd java and acess it in your component. Then pernr parameter will be available in the context and u can pass value for the parameter (pernr) to the model and get the output.
    If you hav any doubt, please let me know.
    Regards,
    Jithin

  • How to get check number for the employee's paycheck

    Hello
    Anyone can advise on how to get the check number for an employee's pacheck
    I got employee first name,last name,GROSS salary,Tax Info,and NET salary.I need the CHECK NUMBER.
    please advise
    thanks
    kp
    Edited by: user8612301 on Dec 16, 2010 1:26 PM

    Hi,
    Or are you looking for this:
    SELECT serial_number, paaf.assignment_number
    FROM pay_assignment_actions paa, per_all_assignments_f paaf
    WHERE action_status = 'C'
    AND paaf.assignment_id = paa.assignment_id
    AND serial_number IS NOT NULL
    AND SYSDATE BETWEEN paaf.effective_start_date AND paaf.effective_end_date;
    - Viky
    Edited by: Viky on Dec 17, 2010 11:42 AM

  • How to get requisiton number on the form after running requisition import

    Hi guys,
    My requirement is populated requisition number on custom form after requisition created.plz tell me link between concurrent request id and standard requisition tables
    where i can fetch requisition number after running requisition import program. plz give sql script.
    thanks.....

    Hi;
    Did you check etrm site?
    Regard
    Helios

  • How to get physical number of selected row on the screen.

    Hi,
    We have block defined with Numbers of Records Displayed = 3. In the same time the data set contains 10 records. We would like to know how to get a number of row selected on the screen. i.e. in our case that the number will be always between 1 and 3 independent of the current row position in the data set.
    Best regards,
    Constantin.

    You can calculate that number by subtracting :SYSTEM.CURSOR_RECORD and GET_BLOCK_PROPERTY('BLOCK', TOPMOST_RECORD)

  • How to get a question in the course placed anywhere in the course and does not appear in the quiz result or total number of questions. Pretest would work except it can't go anywhere in the course (at least for me it can't)

    How to get a question in the course placed anywhere in the course and does not appear in the quiz result or total number of questions. Pretest would work except it can't go anywhere in the course (at least for me it can't)

    Use a normal question, and do not add the score to the total score. That will give you a correct score at the end. But the total number of questions, that system variable will still take into account all questions. You'll need a user variable, and calculate its value by subtracting 1 from the system variable cpQuizInfoTotalQuestionsPerProject. Same for the progress indicator if you want to show it?
    Customized Progress Indicator - Captivate blog
    If you want to allow Review, you'll have to tweak as well. You didn't specify the version, and all those questions I now mentioned.
    And my approach, since you talk about only one question: create a custom question, because you'll have total control then.

  • How to get customer number and name from the SD document

    Hi All,
    Can you please let me know how to get Customer Number and Name from the SD Document?
    Thanks a lot....
    Anil

    Hi,
    It will be displayed in the SD (BIlling document) itself,  you clikc on the VF03. The customer name and number will also appear in the SO document also Tcode VA03
    regards,
    radhika
    Edited by: kolipara radhika on Jul 10, 2009 5:32 AM

  • TableView -- get the row number of the top most current visible row

    Is there any way to get the row number of the top most visible row, and or bottom most visible row in TableView?

    If you already know the document's name, the sheet's name and the table's name, the easy way is :
    --Here you may replace the three values by the current ones
    set dName to 1
    set sName to 1
    set tName to 1
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    tell first cell of the selection range to set {rowNum1, columnNum1} to {address of its row, address of its column}
    tell last cell of the selection range to set {rowNum2, columnNum2} to {address of its row, address of its column}
    end tell
    Yvan KOENIG (VALLAURIS, France) mercredi 9 février 2011 17:22:21

  • HT4061 how to get full info about the iphone by putting the imei number in pc

    how to get full info about the iphone by putting the imei number in pc

    https://discussions.apple.com/message/23921736#23921736

  • How to get thr number of rows of an SQL query in JSTL

    hi guys,
    can anyone please tell me how do i perform a function which finds out the particular rownumber of an sql query in JSTL.....
    the same code in jsp is:
    <% plateRSet.getRowNum() %>
    how do i do this given plateRset is the var for a given iteration
    thanks
    rahul

    make your result set scrollable...Not such a good idea. With Oracle, the JDBC driver will read and cache all the ResultSet in memory (with other DBMSs/drivers the behavior will probably be different, but you will still have some unnecessary overhead).
    You can do the caching yourself if you think it's worth it. If the piece of code you posted is why you need this for, then use a List or Vector and you won't need to know the size upfront.
    Alin,
    The jTDS Project.

  • Row number in the table.

    Hi:
    How can get the row number in its table?
    For example:
    I have table a:
    a1-a2
    5---a
    2---b
    7---c
    3---d
    I want for a1 value 7, I want to get 3 (the row number in the table).
    Regards
    Saad

    > You know there is ROWID, is there a way to know row number in the table by ROWID?
    No. ROWID is the physical address of the row. It specifies the location of the row on disk. Nothing more. There is no numbering involved.
    > Should there is a way, because there is some programs deal with the table row as it in
    the table.
    These programs are wrong.
    > Ok, I have a software (SmartCodeStudio) which deal with the database to print rows from
    a table but he deals with "record" which is row number in the table
    Wrong, wrong, wrong. A RDBMS is not a binary flat file. A row in a relational table is identified by its primary key. Period.
    There seems to be nothing smart about SmartCodeStudio if it is not capable of dealing with a relational design, and primary key identifiers.

  • How to get maximal value from the data/class for show in Map legend

    I make WAD report that using Map Web Item.
    I devide to four (4) classes for legend (Generate_Breaks).
    I want to change default value for the class by javascript and for this,
    I need to get maximal value from the class.
    How to get maximal value from the data/class.
    please give me solution for my problem.
    Many Thx
    Eddy Utomo

    use this to get the following End_date
    <?following-sibling::../END_DATE?>
    Try this
    <?for-each:/ROOT/ROW?>
    ==================
    Current StartDate <?START_DATE?>
    Current End Date <?END_DATE?>
    Next Start Date <?following-sibling::ROW/END_DATE?>
    Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
    ================
    <?end for-each?>
    o/p
    ==================
    Current StartDate 01-01-1980
    Current End Date 01-01-1988
    Next Start Date 01-01-1990
    Previous End Date
    ================
    ==================
    Current StartDate 01-01-1988
    Current End Date 01-01-1990
    Next Start Date 01-01-2005
    Previous End Date 01-01-1988
    ================
    ==================
    Current StartDate 01-01-2000
    Current End Date 01-01-2005
    Next Start Date
    Previous End Date 01

  • How to get paragraph number of selected text in ID CS4

    Hi,
    Can anybody help me how to get paragraph number of selected text in Indesign cs4.
    Thanks,
    Gopal

    Ah, I see -- thanks. Turns out that there's no difference in speed between texts.itemByRange(), characters.itemByRange(),and insertionPoints.itemByRange(). In a document with 170 pages of text, and with the cursor in the last paragraph, the second and third lines, below (and your function), give exactly the same result:
    t = app.selection[0];
    t.parentStory.texts.itemByRange (t.parentStory.insertionPoints[0], t).paragraphs.length;
    t.parentStory.characters.itemByRange (t.parentStory.characters[0], t).paragraphs.length;
    Peter

  • How to create new or delete the existing row in the grid....

    hi my friends...
    i am developing report using Reuse_alv_grid_display...
    my requirement is... At runtime
              1.  i may create new row on the grid (empty row inwhich  i may enter the data).
              2.  i may delete a existing row in the grid
              3.  i may edit the existing data...
    then i have to trace the modification in the grid in one internal table...
    how can i get into this.....
    note:
    i have some idea to edit the existing record in the grid and trace those modification,
    but i don't know abt how to create new or delete the existing row....
    can you give me some idea...

    Hi deva,
    write a class which implemets these methods
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
    To handle the toolbar on alv
         handle_toolbar
           FOR EVENT toolbar OF cl_gui_alv_grid
              IMPORTING e_object e_interactive,
    To handle the buttons on the alv grid
         handle_user_command
           FOR EVENT user_command OF cl_gui_alv_grid
           IMPORTING e_ucomm.
    endclass.
    Now Implement these methods.
    CLASS lcl_event_receiver IMPLEMENTATION.
    To handle the toolbar on alv
      METHOD handle_toolbar.
       DATA ls_toolbar  TYPE stb_button.
        CLEAR gs_toolbar.
        MOVE 3 TO gs_toolbar-butn_type.
        APPEND gs_toolbar TO e_object->mt_toolbar.
        CLEAR gs_toolbar.
        PERFORM icon_create USING 'ICON_INSERT_ROW' gs_toolbar-icon.
        MOVE text-010 TO gs_toolbar-function.
        MOVE text-012 TO gs_toolbar-quickinfo.
        MOVE ' ' TO gs_toolbar-disabled.
        APPEND gs_toolbar TO e_object->mt_toolbar.
        CLEAR gs_toolbar.
        PERFORM icon_create USING 'ICON_DELETE_ROW' gs_toolbar-icon.
        MOVE text-011 TO gs_toolbar-function.
        MOVE text-013 TO gs_toolbar-quickinfo.
        MOVE ' ' TO gs_toolbar-disabled.
        APPEND gs_toolbar TO e_object->mt_toolbar.
      ENDMETHOD.
       METHOD handle_user_command.
    In this form, check the function code(e_ucomm has the function code), based on that do the required action.
    as i said yesterday(i.e for appending a row, deleting a row, modifying a row)
        PERFORM user_command USING e_ucomm.
      ENDMETHOD
    endclass.
    Before calling the alv method, create a object of this class.
    DATA :
          gref_event_receiver  TYPE REF TO lcl_event_receiver,
          gv_tables_alv          TYPE REF TO cl_gui_alv_grid.
          CREATE OBJECT gref_event_receiver.
          SET HANDLER   gref_event_receiver->handle_user_command
                        FOR gv_tables_alv.
          SET HANDLER   gref_event_receiver->handle_toolbar
                        FOR gv_tables_alv.
    check this program for event handling, it is the similar way
    demo_abap_objects_events
    Hope u understood this.
    Regards,
    Prasant
    reward if helpful

Maybe you are looking for

  • Personas 2 SP2: field values disappear after entry?

    Hi Folks - we made a couple of changes to our Personas 2.0 flavors for IMA1N and IMA2N. The flavors work fine in our development system. After transporting the flavors to our QA system we now see a problem with data entry. When data is entered into c

  • Bulk phone import and export CUCM 8.5

    In preparation for a migration to CUCM 9.1.2 we need to update the owner ID field on around 7000 phones. The only way to do this through the bulk admin tool is to export phone all details, update the field and then re import all the phones. The expor

  • MBA 11" backlit keyboard no longer lighting automatically

    The backlit keyboard on my MBA 11" is no longer responding to the "automatically illuminate keyboard in low light" option in System Preferences. I can control the backlights manually with F5 and F6, but they don't come on automatically in the dark (e

  • What happens if i change some data in delvery after it is totally completed

    Hi all ,             I have a small question . I have sales order which completed its cycle. I mean delivery completed and accounting documents cleared. Now can I change the delivery just to updating the serial numbers in it ? what could be the resul

  • Add field of database to a list

    Hello: I have three fields in a table (database) with the following data: Name-> "John"  LastName-> "Wilson" Id -> 18 Name-> "Andrew" LastName-> "Spielberg" Id->: 21 etc, etc... I need these data in a property list like this: [Name: "John" , LastName