Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Counter rows in cursor using for loop.
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
![]() |
![]() |