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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to fix these bugs!!!

Re: How to fix these bugs!!!

From: Lun Wing San (Oracle) <wslun_at_qrcsun.qrc.org>
Date: 1997/03/05
Message-ID: <331D9B32.1325@qrcsun.qrc.org>#1/1

Wingyu wrote:

> --------------------------------------------------------------------------
> The following is the message after compile:
>
> LINE/COL ERROR
>
> -------- -----------------------------------------------------------------
> 14/2 PLS-00402: alias required in SELECT list of cursor to avoid
> duplicate column names
>
> 14/2 PL/SQL: Statement ignored
> ---------------------------------------------------------------------------
>
> The following is my with-bug program:
>
> -- interface
> create or replace package newchi is
>
> procedure fyp_scna;
> end ;
> /
> show errors
>
> create or replace package body newchi is
>
> procedure fyp_scna is
> cursor all_object is select * from firms f ,Co_bg c ,FileUrl u where
> f.co_name='A' and f.co_id=c.co_id and f.co_id=u.co_id order by f.co_name;
>
> begin
> htp.bodyopen('http://imsu11.ust.hk:9000/ar/img/t2.gif');
> htp.p('The Companies with "A" as the first character:');
> htp.nl;
> htp.tableOpen('yes');
> htp.tableRowOpen;
> htp.tableData(htf.strong('Company Name'));
> htp.tableData(htf.strong('Year'));
> htp.tableRowClose;
> for each_object in all_object
> loop
> htp.tableRowOpen;
> htp.tableData(htf.anchor(each_object.co_url,each_object.co_name));
> htp.tableData(each_object.year);
> htp.tableRowOpen;
> end loop;
> htp.tableClose;
> end; -- end of fyp_scna
> end newchi;
> /

  It was because you are using select * <--

---
Name   : Lun Wing San (Certified Oracle Database Administrator)

Title  : Oracle Application Developer of Hong Kong Productivity Council
         Oracle Database Administrator and System Administrator of QRC
Phone  : (852)27885841

This posting represents the personal opinions of the author. It is not the
official opinion or policy of the author's employer. Warranty expired when you
opened this article and I will not be responsible for its contents or use.
Received on Wed Mar 05 1997 - 00:00:00 CST

Original text of this message

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