PL/SQL (MOSC)

MOSC Banner

Select into a custom procedure table

edited May 9, 2018 4:06AM in PL/SQL (MOSC) 9 commentsAnswered ✓

Hello,

i try to fetch data into a custom procedure table, but cant compile the function cause:

  • Fehler(9,3): PL/SQL: SQL Statement ignored
  • Fehler(11,3): PL/SQL: ORA-00947: Anzahl der Werte reicht nicht aus

Is a simple "into" not possible here?

Have i to use a loop and fetch construct?

Sincerly

create or replace type odbcread.kart_data_row as object (  id number(10,0),  artnr varchar2(20));/create or replace type odbcread.kart_data  as table of odbcread.kart_data_row;/create or replace function odbcread.kart_collected (kunde in number)return odbcread.kart_dataas  my_data odbcread.kart_data := odbcread.kart_data();begin  my_data.extend;  my_data(my_data.last) := odbcread.kart_data_row(1, '12345');    select objectid, artnr  into my_data  from prod_erp_001.kart  where kadrnr = kunde;    return my_data;end;/

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center