to find the number of records retrieved in the select statement in the cursor

Hi all
with the cursor, I'm selecting select statement together and writing in the .txt file.
his worksheet, but it should not open the file, if the cursor returns nothing.
How to find the number of records returned by the select statement in the cursor.
pls help me.

Thank you...

Don't understand what you're trying to say, but maybe it's...

DECLARE
   vCounter NUMBER;
   -- Other variables...
BEGIN
   vCounter:=0;
   FOR .. IN cursor LOOP
    IF vCounter=0 THEN
      -- Here open file...
      -- Here write one time data...
    END IF;
    -- Here write cursor data...
    vCounter:=1;
   END LOOP;
END;

-Clément

Tags: Oracle Development

Similar Questions

  • I can capture the number of records retrieved by page in the Apex Interactive report?

    Hello

    I have a requirement in which I need to conditionally hide / show button on an interactive report.

    To achieve this, I need to compare the number of reows read by v/s lines page number to be

    read as specified by the user (defined using Actions-> lines per page).

    Please help me to know if there is a way to capture these 2 values:

    1. number of records retrieved in a report by page

    2. the value set by the user for the number of rows must be extracted (Actions--> lines per page).

    Quick help is really appreciated. Thank you.

    Hello

    You can use by jariola in his blog

    http://dbswh.webhop.NET/Apex/f?p=blog:read:0:article:41900346848694

    Thank you

    Benjamin

  • Skip and capture the Oracle SQL record dirty in a select statement

    Hello

    I have the Oracle Oracle 11.2.0.4 database when I run a select query.

    Question:

    10 columns have given Date format. When I try to execute this query into a FROG he says, a month not valid. Since the records are billion in nature, I am not able to know which line has this problem.

    Is there a way I can capture the failed row and add it to other tables and continues with the select statement regardless of this error

    OK, you have several TO_DATE functions fed a string that is built on the fly.  At least part of the time, the chain that is built does not match the date format mask used.

    For example:

    TO_DATE (SUBSTR (TO_CHAR (SQ_W_PURCH_CYCLNS_ORA. LAST_SUBMITTED_ON_DTTM_WID), 0, 8). » -'|| SUBSTR (TO_CHAR (SQ_W_PURCH_CYCLNS_ORA. (LAST_SUBMITTED_ON_DTTM_WID), 9, 6), "YYYYMMDD-HH24MISS")

    "SQ_W_PURCH_CYCLNS_ORA. LAST_SUBMITTED_ON_DTTM_WID' does not have a string where characters 5-6 are in the range 01-12.  You'll have to do an analysis on this column.  From its data and how that is managed by to_char.  What ARE the data type of ' SQ_W_PURCH_CYCLNS_ORA. LAST_SUBMITTED_ON_DTTM_WID' and what is a typical value?

    As others have said, this is simply an impossibility for a column of a table to actually have invalid month (or day, or year, or hour or minute or second).  ONLY, you get this error during the conversion of a string to a date with the TO_DATE function.

  • Find the cursor/carat posisition in the text box

    Hey all,.

    I'm new to flex and I am trying to write a function that will give me the index of the position of the cursor in a TextArea, I see that TextField is a getCaratPosition() or something similar. did someone knows how I could find out how to implement that in a box of text... or is there really no difference between a textArea and TextField component and I should just use a field?

    Thanks in advance!

    I think that the simplest here would continue to use the text box, then get the caretIndex of the textfield in the OT:

    var idx:int = TextField (ta.getChildAt (2)) .caretIndex; TA is the id of your TextArea

    Also make sure you import flash.text.TextField.

    TS

  • Cannot find the cursor color in Illustrator CC

    Where can I change the value of the hue of the color in Illustrator CC?

    I don't see the cursor in the Swatches palette.

    I have CMYK converted at the global level and can't see where to set the tint value

    It is in the pnael of color, not in the color chart.

  • The XLA API retrieves read operations (Select statements)?

    Hi all

    Firstly, I'm writing a request for implementation of the scheme of replication on databases TimesTen installed on servers that are distributed over several nodes, the application uses the API of XLA for monitors & retrieves changes apply on database TimesTen to a node, then propagates the changes to other nodes.

    The application must also propagate the transaction to read for some cases. If the XLA API doesn't get read operations? OTHERWISE, there are solutions to this situation?

    Thanks & BR

    Maher
    Software engineer

    No, XLA doesn't read operations. XLA is an API 'notification of change '. TimesTen has not any functgionality to allow you to 'hang' selects performed by another connection, sorry.

    Chris

  • How to bring back the volume control icon? Cannot find the cursor anywhere

    I found a solution to restore sndvol32. _ but the measures did not apply to my VGN-NR498E laptop

    Hello

    1 Please reboot nothing so interfere with this process.

    Click with the right button on Taskbar - Properties - tab Notification area - check box Volume - if it is grayed out
    Then, use this link. (Ditto for power, clock and network.)

    How to enable or disable the system tray in Vista icons (there are several methods
    and you can to use them all).
    http://www.Vistax64.com/tutorials/106787-notification-area-system-icons.html

    If necessary: a Mr Fixit

    System icons do not appear in the notification area in Windows Vista or in Windows 7 until you
    Restart the computer
    http://support.Microsoft.com/default.aspx/KB/945011

    I hope this helps.

  • difference in number of records in the table of audit

    Hi all

    We strive to remove lines of verification based on timestamp(sysdate-30) table(sys.aud$). The command I used below.

    SQL > set lines 200

    COL OWNER FORMAT A15

    Select TABLE_NAME, nom_tablespace, OWNER, num_rows, STATUS, DEGREE, TABLE_LOCK, LAST_ANALYZED, PARTITIONED, USER_STATS from dba_tables where TABLE_NAME = '& TABLE_NAME';

    SQL > SQL > type table_name value: AUD$

    OWNER, TABLE_NAME, NUM_ROWS STATUS DEGREE TABLE_LO LAST_ANALY BY USING NOM_TABLESPACE

    --------------- ------------------------------ ------------------------------ ---------- -------- ---------- -------- ---------- --- ---

    SYS AUD$ 934991 SYSTEM VALID ACTIVE 1 08/07/2012 No. No.

    SQL > delete / * + parallel (aud$ 8) * / of sys.aud$ where NTIMESTAMP # < sysdate-30; (I don't know why I put NTIMESTAMP #, although I see # aud TIMESTAMP column $ table, the above query, I got from sr dba)

    3140994 deleted rows. (reason why so many records have been deleted I see 934991 lines from dba_tables view)


    After that I saw the difference in number of records.


    SQL > select / * + parallel (aud$ 8) * / count (*) from sys.aud$ where TIMESTAMP # < sysdate-30;

    COUNT (*)

    ----------

    0

    SQL > select / * + parallel (aud$ 8) * / count (*) from sys.aud$ where NTIMESTAMP # < sysdate-30; -> Why there are differences in the number of records if I put NTIMESTAMP #in query)


    COUNT (*)

    ----------

    50

    Thank you

    Bhavani.

    SQL > SELECT count (*) from sys.aud$ where ntimestamp #.<>

    COUNT (*)
    ----------
    0

    Try this one.  Good luck.

  • Hard to find while coding source code - size of the cursor can be changed or rate of improved blink while in the cursor code view?

    On the retina Mac 5 k - work in Dreamweaver code - normal display mode. After you find the cursor in the code when editing source code. Is there a way to make the cursor itself more "BOLD", a different color, or change the visibility of markup/blink?

    Dreamweaver is not the settings for this.  But the fact of your operating system.

    To change the size of the cursor in Mac OS x:

    Choose Apple system, universal access preferences.

    In the mouse & Trackpad pane, use the slider at the bottom of the window to change the size of the cursor.

    Nancy O.

  • Simple query to find the difference between 2 numbers in one column to another column

    Hello

    I would like to know the difference between 2 numbers in same column corresponding to a condition of another column. How do that?

    For example: say I have a table with 3 columns A, B and C.

    A > Varchar2

    B > Varchar2

    C > number

    A B C
    AD1
    BC2
    CB3
    DA4

    I want something like 'column value corresponding C min min (col B) result = (col A) - value of the corresponding C column (number)' without having to write 2 select statements. How do I do that?

    Thanks in advance

    aBBy007



    Notes on the system:

    2-node 11.2.0.3.4 GI/RDBMS running on RHEL5.

    Hello

    It is not very similar to your original question.  It would be better if you asked what you really want in your first post, rather than making people to time writing solutions you want not and can not use waste.  Once you see an answer to this question, will you change the question again?

    Here's a way to do what you asked:

    WITH got_lasts AS

    (

    SELECT val.thread #.

    , MAX (val.sequence #) AS last_standby_seq_received

    MAX (CASE

    WHEN val.applied = "YES".

    THEN val.sequence #.

    END

    ) AS last_standby_seq_applied

    V $ archived_log val

    Join v$ database vdb WE val.resetlogs_change #.

    = vdb.resetlogs_change #.

    GROUP BY thread #.

    )

    SELECT thread #.

    last_standby_seq_received

    last_standby_seq_applied

    last_standby_seq_received

    -last_standby_seq_applied AS total_lag

    OF got_lasts

    ORDER BY thread #.

    ;

  • What became of the cursor to scroll the pages? [iOS]

    CCan can't find the cursor, I used to use to scroll through the pages where at - it go?

    Hello

    The old slider in the lower bar has disappeared.  But you can drag the indicator to the right page number (in continuous page view) or down (in the single Page display mode) to scroll through the pages quickly.  Alternatively, you can rely on it to bring up the go to Page dialog box to access a specific page.

    The current page number will appear in the center of the screen.

    Please feel free to comment on the new user interface.  Thank you.

  • change the cursor field

    
    

    Hello

    Here's some code I want to change an editfield and insert an image that I want to write data

             EditField yu = new EditField("AZERTy147 ", "") {
    
                  protected void paint(Graphics g) {
    
            Bitmap yy = Bitmap.getBitmapResource("inputtt.png");
    
                      g.drawBitmap(100,10, yy.getWidth(),yy.getHeight(),yy, 0, 0);
                          g.setColor(Color.BLUE);
                          g.drawText("azerty1474 ", 10, 0);
    
                  public void layout( int maxWidth, int maxHeight )
                    {
                    // int width = Display.getWidth();
                    //  int height = Display.getHeight();
                        super.layout(300, 100);
    
                        setExtent( 300, 100);
                    }
             };
             myScreen.add(new LabelField(" "));
             myScreen.add(yu) ;
    

    the problem, I can't find the cursor to write?

    You can go there. Should work on all modern but only tested devices on 9000 sim.

    EditField yu = new EditField("AZERTy147 ", "") {
                    public void paintBackground(Graphics g) {
                       Bitmap yy = Bitmap.getBitmapResource("inputtt.png");
                       g.drawBitmap(100,0, yy.getWidth(),yy.getHeight(),yy, 0, 0);
                    }
                   public void layout( int maxWidth, int maxHeight )
                    {
                    super.layout(300, 100);
                     setExtent( 300, 100);
                  }
             };
    
  • Find the number of times that the recorded session has been seen?

    Is it possible to find the number of views in Adobe Connect once a recorded session has been made public? Under the dash of meeting it keeps track of these views for 30 days, but I can't seem to find anywhere in the reports where to find this information.

    If you move recordings to the content library, then you can take the standard content reports, which will display the number of views.

  • I can't find the right screen to enter my redemption number to retrieve my serial number.

    I can't find the right screen to enter my redemption code to download my serial number.

    Refer to this:

    http://helpx.Adobe.com/x-productkb/global/redemption-code-help.html

    Mylenium

  • Satellite L300-21F - where can I find the serial number?

    The ink on the toshiba money serial No./model No. Panel at the back of my laptop rubbed off after only a week of use, when I bought the pc last year. I now have a problem with my touchpad registers is not the movement of finger-cursor or shots at normal pressure. I have to press more strong most of the time for the action to be recorded. A third of the time it works fine at normal pressure.

    It is still under warranty. Unless someone can tell me of a possible reason for this [someone]? so I guess I should probably send it in for repair.

    Where can I find the serial No. information? It is stored electronically on windows anywhere? I have only a rough idea of what is the serial number - I managed to write most of it when I noticed that he had started to rub. I don't think that my laptop is saved online and I don't have the paperwork that came with the laptop in its box.

    Thanks for any help

    null

    Hello

    I m wondering really that you can read the serial number on the underside of the t more after a week not where you use Notepad?

    In any case, I have the Satellite L300 too with Windows XP preinstalled. If I start Diagnostic PC Toshiba tools I can visualize all the details on my laptop and see also the serial number.
    Check this box!

Maybe you are looking for