Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Counter rows in cursor using for loop.

Re: Counter rows in cursor using for loop.

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 5 Oct 1999 17:15:17 +0100
Message-ID: <939140163.9989.0.nnrp-12.9e984b29@news.demon.co.uk>


It's the same problem with the same solution; re-think it as:

           col_name1 || '|'
        || col_name2 || '|'
        || col_name3 || '|'
.....
        || col_name4 || '|'

--

Jonathan Lewis
Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk

screwbai_at_my-deja.com wrote in message <7td73r$416$1_at_nnrp1.deja.com>...
>Thanks for you answer. Unfortunatly it doesn't seem to solve my problem
>completly.
>
>What I am actually doing here is to create a select statement that I
>then use to spool the content of a file to a pipe delimited file.
>
>counter := 0;
>for rec in cur
>LOOP
> counter :=counter + 1;
> if counter<last
> then
> dbms_output.put_line(rec.column || '||''|''||' )
> else
> dbms_output.put_line(rec.column || '||''|''')
>END LOOP
>
Received on Tue Oct 05 1999 - 11:15:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US