I want to get the current Cursor row number

Hello!
Is it possible to get the current row number of a cursor in a cursor loop?
for c_1 in cursor_1
loop
dbms_output.put_line(c_1. ???) --> this should show: 1 in the first loop ,2,3,...
endloop
best regards,
wolf

SQL> declare
  2  cursor c is
  3  select * from emp;
  4  begin
  5  for r in c loop
  6    dbms_output.put_line(c%rowcount);
  7  end loop;
  8  end;
  9  /
1
2
3
4
5
6
7
8
9
10
11
12
13
14
PL/SQL procedure successfully completed.Max
[My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/02/07/aggiornare-una-tabella-con-listruzione-merge/]

Similar Messages

  • How the get the current dataTable row

    I have a dataTable with the value from List in the BackingBean.
    The script is printing the list elements, and I want to get the number of each row. I don't have any enumaration in for the records. Can it be done simply?
    Thanks for answer.

    You can use HtmlDataTable#getRowData() to retrieve the current row object in the iteration.
    But you just want to retrieve row numbers? Then rather use HtmlDataTable#getRowIndex().
    Also see http://balusc.xs4all.nl/srv/dev-jep-dat.html for several datatable use examples.

  • How to get the current cursor position in word report?

    I am generating a word report. But I would like to keep the table in one page. However, I did not find the way to do it in labview. Somebody would give me some suggestions? I appreciate a lot.
    One way I think I can do is to find the current cursor position. Since I know the table size so I can figure out if the left space in the current page is enough to hold the table. But I do not know how to locate the curent cursor position in word document in labview programmatically. I appreciate any suggestions on this question.
    Thanks.

    Hi,
    when you insert data in a word document you have to refer to bookmarks rather than cursor position.
    If you are using the Report Generation Toolkit for Office it is explained in the manual chapter 3-1.
    See also the example: Generate Report From Template (Word).vi included in the toolkit.
    If you aren't using the toolkit, you still have to refer to bookmark as reference points to insert and/or fetch data.
    The principle is:
    - First create a document in which you insert bookmarks where you wish and save it as a template
    - In LV open your template document and insert in it your data referring to bookmarks as insertion points
    - At the end save your report with another name, so you still have the template
    I hope I have been clear enough, if not just as
    k!
    Good luck,
    Alberto

  • Re: Getting the current selected Row & column in adf table

    Hi,
    Our requirement is we have to retrieve both the current row and column in adf table.
    We can retrieve the current row in the backing bean like
    ViewObject view = getViewObject();
    view.getCurrentRow();
    Is it possible to retrieve selected column id or column header text as we are getting for row?
    please give some sample.
    Thanks,
    Vijay.
    Edited by: Vijayakumar Palanisamy on Jun 23, 2011 2:23 AM

    Hi John
    My exact requirement,
    1.     We have collection of records in adf table
    2.     Each cell in the row has commandImageLink (Like adding approver, edit approver, delete etc)
    Currently it’s working fine for me in the commandImageLink listener, but the problem is table is refreshed 2 time,
    while selecting a record and commandImageLink is clicked, I have to avoid 2 times refreshing,
    If it’s possible to identify a particular cell in the row selection, I can avoid the image link listener.
    we are using Jdeveloper11.1.1.4.0
    Please suggest.
    Thanks,
    Vijay

  • How to get the Current User on the UI page?

    All,
    Could you please let me know how to get the Current user on the UI input page , i need to display the current user ID when some one clicks the submit button, i want o get the current user to display in the javascript alert box.
    Edited by: 951930 on Oct 24, 2012 12:21 PM

    lucky,
    my schema has already defined for
    <user mapField="USER_ID" default="%CurrentUser"/>
    and in my UI page
    <td oraLabel="user"></td><td oraField="user" id="userId" ></td>
    and my javascript
    function showUserId () {                        
    var curUser = document.getElementById('userId').value;
    alert(curUser);
    and i have called this function on my submit button, but i am not able to get Current Logged User ID value to show in the alert nor able to show the current logged user on the UI page.
    my requirement is on custom UI page i need to show Current Logged User in one corner of the page and also need to show the same user in alert when he submits the button.
    Appreciate for the help.
    Edited by: 951930 on Oct 25, 2012 8:42 AM
    Edited by: 951930 on Oct 25, 2012 9:06 AM

  • How to get the current FILE PATH?

    I want to get the File Path on my Java Programming, which class / method can get a File Path on the windows?
    thanks!

    I want to get the current working directory(e.g.
    c:\Tomcat5.0\webapps\)
    If this is a web application you're talking about and you want the directory where that application is installed, that's almost certainly not the CWD. It might be one of the context or whatever variables that's available to servlets. Look in the servlet API and see what's there.

  • Get the Current Quarter  and Current Week from date

    Hi,
    I want to get the Current quarter and Current week from a given date, which function modules should i use?
    I tried using function module - 'HR_99S_GET_QUARTER' for getting the quarter but it is throwing an error while loading data. Moreover it doesnt exist in BI7.
    Similarly for current week.
    Please help. Sample code snippets would be appreciated.
    Thanks
    Jaya

    You can use FORM time_conversion wich is the one used by standard in Update Rules:
    You can select whether convert 0CALDAY to 0CALWEEK or whatever infobject formats you prefer...
      perform time_conversion
                using  '0CALDAY'
                       '0CALMONTH'
                        p_input_date
                        l_fscvtval
                changing RESULT
                         c_t_idocstate
                         c_subrc
                         c_abort.
      if c_subrc <> 0 or c_abort <> 0.
        exit.
      endif.
    form time_conversion
                   using i_timnm_from type rsiobjnm
                         i_timnm_to   type rsiobjnm
                         i_timvl
                         i_fiscvarnt  type t009b-periv
                   changing e_timvl
                            c_t_idocstate  type rsarr_t_idocstate
                            c_subrc   like sy-subrc
                            c_abort   like sy-subrc. "#EC *
    data: l_timvl  type rsd_chavl,
          l_result type rsd_chavl.
      IF i_timvl CO ' 0'.
        CLEAR e_timvl.
        EXIT.
      ENDIF.
      l_timvl = i_timvl.
      CALL FUNCTION 'RST_TOBJ_TO_DERIVED_TOBJ'
        EXPORTING
          i_timnm_from             = i_timnm_from
          i_timnm_to               = i_timnm_to
          i_timvl                  = l_timvl
          I_FISCVARNT              = i_fiscvarnt
          I_BUFFER                 = rs_c_true
        IMPORTING
          E_TIMVL                  = l_result
        EXCEPTIONS
          INCOMPATIBLE_TOBJS       = 1
          NO_INPUT_VALUE           = 2
          FISCVARNT_MISSING        = 3
          INPUT_NOT_NUMERIC        = 4
          WRONG_DATE               = 5
          WRONG_FISCPER            = 6
          X_MESSAGE                = 7
          OTHERS                   = 8
      e_timvl = l_result.
    ENDFORM.                  "TIME_CONVERSION

  • How to get the current location text in JTextPane

    hi
    i want to get the current location text in JTextPane ...iam useing
    caretPos = jtpMain.getCaretPosition();
    iam geting the current Locations at the same time i want to read the entery current line
    i used like this
    StartPos=jtpMain.getText();
    but iam geting entry data in JTextPane ... how can get current Locatin data ...
    pls help me

    If I understood your request, what you would like to do is to be able to retrieve Start and End Positions of a given line (a line and NOT the whole content of the JTextPane).
    JTextPane is a graphical component that is bound to a logical document. Documents are structured in elements. What defines an element is up to you to decide if you extend your own document but elements are by default paragraphs (runs of text ended by a carriage return '\n' character). So, I think that what you want to do is to retrieve the Start and End positions of the
    paragraph over which the caret is currently positionned. Then I think you have got to do the following :
    int intStartPos;
    int intEndPos;
    int intCaretPos;
    javax.swing.text.StyledDocument docStyledDoc;
    javax.wing.text.Element eleParagraph;
    intCaretPos = jtpMain.getCaretPosition( );
    //Get a reference to the default styled document bound to the JTextPane component
    docStyledDoc = jtpMain.getStyledDocument( );
    //Get the paragraph element from the document over which the caret is positionned
    eleParagraph = docStyledDoc.getParagraphElement(intCaretPos);
    //Get paragraph's offsets
    intStartPos = eleParagraph.getStartOffset( );
    intEndPos = eleParagraph.getEndOffset( );
    hi
    i want to get the current location text in JTextPane
    ...iam useing
    caretPos = jtpMain.getCaretPosition();
    iam geting the current Locations at the same time i
    want to read the entery current line
    i used like this
    StartPos=jtpMain.getText();
    but iam geting entry data in JTextPane ... how can
    get current Locatin data ...
    pls help me

  • How to get the current directory as File object

    Hi guys,
    i want to get the current working directory as a file object.
    plz help me on that if there are any standard methods present for this.

    new File(".");

  • How to get the current user name in Provider hosted app using appOnlyAccessToken

    Hi, 
    Please help me, how to get the HostWeb UserName in Provider Hosted App
    i have Provider hosted App, and Anonymous Authentication is enabled on AppWeb, using appOnlyAccessToken
    Below code does not return current user who Log in in hostweb, it is returning
    SharePoint App (app@sharepoint)
    Web web = clientContext.Web;
    clientContext.Load(web);
    clientContext.ExecuteQuery();
    clientContext.Load(web.CurrentUser);
    clientContext.ExecuteQuery();
    clientContext.Web.CurrentUser.LoginName;
    Below code gives a blank name when Anonymous Authentication is enabled, if Anonymous Authentication is disabled
    app prompts for credentials 
    HttpContext.Current.User.Identity.Name
    Thanks
    Ram

    Hi,
    Since you are using a provider Hosted app if you want to get the current logged in name than do not use AppOnlyAccessToken else use AccessToken which is App + user Context AccessToken.
    then 
    Web web = clientContext.Web;
    clientContext.Load(web);
    clientContext.ExecuteQuery();
    clientContext.Load(web.CurrentUser);
    clientContext.ExecuteQuery();
    clientContext.Web.CurrentUser.LoginName;will return proper user Name.
    HttpContext.Current.User.Identity.Name will never return the user as this object is related to IIS server of your App Server not sharepoint.you should set this as Anonymous in case of provider hosted app.you can download the below sample which uses the AccessToken which has user name in it.https://code.msdn.microsoft.com/Working-provider-hosted-8fdf2d95
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

  • Accessing the current SIM card number

    Hi,
    I am trying the get the current sim card number using NSUserDefault with the following codeline :
    NSString *num = [[NSUserDefaults standardUserDefaults] stringForKey:@"SBFormattedPhoneNumber"];
    Now, I need to know if their exist a better way to get the current phone number (SIM number) programatically? Is it allowed to access personal users information considering apple's privacy policy for the end user? I need to authenticate sim card before my app works and for this I need to check at the startup if the number being usedcurrently is already authenticated or not.
    Thanks,
    Obaid

    Is Apple accept following:
    1.  I put the result string in a text box .
    2.  if the user click a send button and then  a dialog appears that warn it will be send to database
    3.  if user still accept , it will be send as a record to remote database.
    Where can I ask such questions in Apple support. Should I wait until apple reject or not . Or is there an official way to ask before the project. Googling is good but it is not saying last decision.
    Thanks
    Ali

  • Getting the current row in a datatable

    Hi,
    I am using datatable. How do I get the current row in the datatable
    and use it for my processing in the JSP page
    or I want to just output that value with out using any jsf tags.
    Examples
    <h:dataTable styleClass="dataTable" id="table1" border="0"                    value="#{myTrainingHandler.myMediaTraining}" var="dataIt">
    <h:column id="column1">
    <f:facet name="header">
    <h:outputText styleClass="outputText" value="Course Name"id="text1"></h:outputText>
    </f:facet>
    <!---------------------------------------------- how do I get the value of #{dataIt.name} and use it in the JSP way
    Reason: I just want to output the value. If I am using h:outputText then it inserts <span>... </span>
    or, I want to transfer that value to another another attribute in the session or something like that.
    ---------------------!>
    <h:outputText styleClass="outputText" id="text2" value="#{dataIt.name}"></h:outputText>
    </h:column>
    </h:dataTable>
    -Aswath

    It looks like good idea!Unfortunately this is just workaround. Indeed your
    suggestion is real JSF-feeling solution but due to the
    bug (or rather pure design of RI implementation???) it
    is dangerous.
    I had some doubt about is it bug or my incompetence.
    Unfortunately this seems is really bug.
    Hope this problem will be solved in the next releases.from blueprints catalog:
    Component bindings (e.g. <h:inputText binding="#{MyBean.lastNameComponent}" />) should always be stored in request scope since their value is no longer valid after a request has been processed anyway. The component tree is reconstituted during each incoming request, changing the physical instances these component bindings will point to.
    as you see there is really problem in using session backing bean with component binding
    so that means idea with parameter looks better now because we don't need to use table binding.
    Or probably we can define some kind of pattern like couple of beans with request scope and session scope.
    for example:
    Catalog - session scope
    CatalogView - request scope
    Catalog will keep session data and CatalogView will provide some presentation logic (including some stricly visual oriented data) and access to business methods of Catalog class.
    I will send you example by e-mail (on friday) if you not mind.
    >
    Thank you for your suggestion!
    Probably I will use your idea in my application.
    By the way I'm from Kiev also.Hello from Kiev :-)
    I have one suggestion.
    I'm working on JSF form that suppose to add, editand
    delete records from table.
    Also I wanna to use scrolling by page and sorting.
    I'm trying to make this form somehow clean and
    universal as much as possible.Seems I have same tasks for now.Great! I will send some code soon.
    And maybe we can discuss every aspect how to do good JSF based application including config oriented information and utilities classes.
    -how do you work with tables without primary keyI dont' have tables without primary key :)
    -how do you make pagination by universal wayWe need just make good component for that.
    We already started in this direction.

  • When I put in my password I get a drop down window with options I want to delete the current options, how do I do this?

    when I am siging on to a website with my user ID, I get a drop down window when typing the first letter with options and I want to delete the current options, how do I do this?

    http://www.apple.com/support/contact/

  • I currently have the Mac OS X v10.5.8 and want to get the new operating system but I don't know how to do it. I don't have the Mac App Store and can't get it because of my version. What do I do?

    I currently have the Mac OS X v10.5.8 and want to get the new operating system but I don't know how to do it. I don't have the Mac App Store and can't get it because of my version. What do I do?

    The Early 2006 model 1,1 Core Duo can only run a maximum of 10.6 Snow Leopard. The models Late 2006 Core 2 Duos 2,1 through Early 2008 4,1 can only run a maximum of 10.7 Lion. The Late 2008 model 5,1 Aluminum Unibody through the Mid 2010 White Unibody model 7,1 can run 10.8 Mountain Lion.
    To see which model you have go to the Apple in the upper left corner and select About This Mac, then click on More Info. When System Profiler comes up check the Model Identifier and post it back here.
    The Snow Leopard 10.6 DVD should still be available from Apple for $20. You will have to call Apple Customer Care 1-800-692-7753 or 1-800-676-2775 to purchase it. It may still be in the Legacy Products list.
    If they no longer have any in stock you will have to buy it from eBay or Apple resellers that still have stock. But you will have to pay a premium since the DVDs are no longer being made. Snow Leopard DVDs are already up to $100 on Amazon.
    http://www.ebay.com/sch/i.html?_nkw=10.6+snow+leopard&_sacat=0&_odkw=mac+os+10.6 &_osacat=0
    Once you are at 10.6.8 Lion is still available from Apple. You will have to call Apple Customer Care 1-800-692-7753 or 1-800-676-2775. to purchase it. Then within 3 days you will get an email with a code which you can use to download Lion from the App Store.  The price is still $29. You must have at least a model 2,1 MacBook.
    Lion will require at least 2gb of RAM but really needs 4gb to run smoothly.
    As for third party programs see this list for compatibility with 10.7 http://roaringapps.com/apps:table
    Also Lion doesn't run any Power PC programs. To see if you have any Power PC programs go to the Apple in the upper left corner and select About This Mac, then click on More Info. When System Profiler comes up select Applications under Software. Then look under Kind to see if any of your applications are listed as Power PC. Universal and Intel will run under Lion.
    Before Mac switched to Intel processors in 2006 they used Power PC processors from 1994 to 2005. Power PC 601 through 604, G3, G4 and G5. Applications written for the Power PC processors need the application called Rosetta to run on Intel processors. This was part of the Operating System in 10.4 and 10.5 but was an optional install in 10.6. With 10.7 Lion Apple dropped all support for Power PC applications.

  • Applescript to get the current insertion point of the cursor

    How do I use Applescript to get the current insertion point of the cursor in a Apple pages.app document?

    Oops, missed that one - you are correct, the line should be:
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">set {TheStart, TheEnd} to character range of the selection</pre>
    I have a wrapper script that I use to insert stuff from my handler/code library into a Script Editor document, and was adapting snippets from that for my examples - I guess that one got away.
    As for the dictionary, some applications just have poorly written or outdated documentation. Some of the items have multiple entries (eg, there may be a selection object for the application and also for the document), and some inherit properties from other items. Some are used as nouns, others as verbs (or both). Sometimes it is easier to visualize the item by keeping track of it's reference - the 'some property of document 1 of the current application' thing. You can use the Script Editor's Event Log to see the results of various properties and commands - for example, the above script will result in the following entry (your numbers will vary depending on the selected text):
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">tell current application
    get character range of selection
    {50, 50}
    end tell
    </pre>
    You can also use the 'log' statement (eg, 'log MyVariable') to add your own entries into the log instead of using dialog boxes.

Maybe you are looking for

  • Problem Working With Framemaker 9 Dita XML Files in Framemaker 10

    I just upgraded to Framemaker 10. I am encountering a number of problems when I try to work with my Dita XML help topics, which were last saved in Framemaker 9 format. 1. Using the Default Dita Template When I open one of my documents in Framemaker 1

  • Gettin Error code:-2147215361 Error code name:outOfMemoryError

    Hi all, I have Crystal Report Server 2008 V1 and when I invoke the Crystal Report server from my java file i am getting the below error. com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Out of memory error occurred. - Java heap space-- Er

  • Open delivery not showing in VL06 T.code

    Dear Guru, some of the Open delivey document is not showing in vl06  t.code. what may be the reason. Regards Preet

  • Employee Group Not deserved received particular wagetype

    Dear experts, current system not allowed particular employee group to received  particular wagetype. For example employee group A not deserved received wagetype 002. I want to change the config and allow group A recieved this wagetype. Can you give m

  • How do I unscramble PC-to-iPhoto photo transfer?

    Well, I was so proud of my non-techie self for figuring out how to transfer about 9,000 photos from my old PC to my new MacBook until I viewed the results. I was led to believe that iPhoto would preserve my PC's folder/subfolder structure. However, t