Loading ...
Sorry, an error occurred while loading the content.

Re: [OracleWarehouseBuilder] problem with PL/SQL statement

Expand Messages
  • bokkakesballa
    hi, my problem it s due to with pl/sql procedure not created with OWB, my procedure it s created by me with toad...the first solution it s correct and have
    Message 1 of 4 , Oct 3, 2005
    • 0 Attachment
      hi,

      my problem it's due to with pl/sql procedure not created with OWB, my
      procedure it's created by me with toad...the first solution it's
      correct and have result my problem.

      thank you a lot
      regards

      2005/9/30, janak Bhawnani <janak_y@...>:
      > hi
      > apparantly its an issue where ur select query is returning more than one
      > rows .The query does select INTO <nome> . The result of any code like this
      > in plsql MUST return only one record.
      > SELECT ...INTO x,y,z.
      > if there are two recs retrned for the select it gives this error that u have
      > two/more values and u r trying to store in one variable ..just execute only
      > the select part of the qury from backend and u may see it returns more than
      > one records which is not acceptable in plsql block when u try to store the
      > result in one variable.
      >
      > So either u have to correct ur join condition so that it returns only one
      > record ,else define a cursor with ur query and loop thru each record and
      > preocess based on business logic..
      >
      > regards
      > Janak
      >
      >
      > u2003@...> wrote:
      > what r u trying to do with this procedure..u must be getting the error while
      > running the map..where exactly r u getting the error message???
      >
      > bokkakesballa <bokkakesballa@...> wrote:Hi,
      >
      > this is my first message on this mailing list...
      >
      > i must create a procedure that make a select from 2 tables. An e.g. of
      > my code is this:
      >
      > CREATE OR REPLACE procedure nome_fornitore ( cod_fis fornitori.CFF%type ) as
      > nome fornitori.nomeF%type;
      > prodotto prodotti.NOMEP%type;
      >
      > begin
      > Select F.nomef, P.nomep
      > into nome, prodotto
      > from fornitori F, prodotti P
      > where F.CFF = cod_fis
      > and cod_fis = P.fornitore;
      >
      > dbms_output.put_line ('il nome del fornitore รจ: ' || nome ||
      > prodotto);
      >
      > exception
      > when no_data_found then
      > dbms_output.put_line ('fornitore non trovato ');
      > end;
      >
      > the procedure it's correctly complied but produce an error in runtime:
      >
      > The following error has occurred:
      >
      > ORA-01422: exact fetch returns more than requested number of rows
      > ORA-06512: at "SYS.NOME_FORNITORE", line 7
      > ORA-06512: at line 7
      >
      > I think that the error it's due to the from clause.
      > The procedure work right without one table on from clause but not
      > produce a correct result.
      >
      > P.S. i now that it's possible to create a view but I don't would make this.
      >
      > thank you a lot
      >
      >
      > Join
      > http://www.smartgroups.com/groups/Datawarehouse
      >
      >
      >
      > SPONSORED LINKS
      > Oracle 10g Oracle database Oracle 8i database Oracle database administration
      > Oracle database administrator Oracle database software
      >
      > ---------------------------------
      > YAHOO! GROUPS LINKS
      >
      >
      > Visit your group "OracleWarehouseBuilder" on the web.
      >
      > To unsubscribe from this group, send an email to:
      > OracleWarehouseBuilder-unsubscribe@yahoogroups.com
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      >
      >
      > ---------------------------------
      >
      >
      >
      >
      >
      > ---------------------------------
      > Yahoo! for Good
      > Click here to donate to the Hurricane Katrina relief effort.
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >
      > Join
      > http://www.smartgroups.com/groups/Datawarehouse
      >
      >
      >
      > SPONSORED LINKS
      > Oracle 10g Oracle database Oracle 8i database Oracle database administration
      > Oracle database administrator Oracle database software
      >
      > ---------------------------------
      > YAHOO! GROUPS LINKS
      >
      >
      > Visit your group "OracleWarehouseBuilder" on the web.
      >
      > To unsubscribe from this group, send an email to:
      > OracleWarehouseBuilder-unsubscribe@yahoogroups.com
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      >
      >
      > ---------------------------------
      >
      >
      >
      >
      > ---------------------------------
      > Yahoo! for Good
      > Click here to donate to the Hurricane Katrina relief effort.
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >
      > Join
      > http://www.smartgroups.com/groups/Datawarehouse
      >
      >
      >
      > SPONSORED LINKS
      > Oracle 10g Oracle database Oracle 8i database
      > Oracle database administration Oracle database administrator Oracle database
      > software
      > ________________________________
      > YAHOO! GROUPS LINKS
      >
      > Visit your group "OracleWarehouseBuilder" on the web.
      >
      > To unsubscribe from this group, send an email to:
      > OracleWarehouseBuilder-unsubscribe@yahoogroups.com
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      > To unsubscribe from this group, send an email to:
      > OracleWarehouseBuilder-unsubscribe@yahoogroups.com
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      > ________________________________
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.