Home » SQL & PL/SQL » SQL & PL/SQL » Compiling in native and have FOR statment return compiled with errors
Compiling in native and have FOR statment return compiled with errors [message #230217] Wed, 11 April 2007 04:19 Go to next message
danijelv
Messages: 12
Registered: March 2007
Junior Member
Hi,

I have one problem when i compiling package. This is for statement that doesn't work in compiling

for i in (select d.id, d.value1 from dv_rn_tb1 d where d.id in(1,2,4,6,8,9,4))
loop
dbms_output.put_line('test'||to_char(i.value1));
end loop;


This for statemen works
for i in 1..100
loop
dbms_output.put_line('test'||to_char(i));
end loop;
runstats_pkg.rs_stop();


Message i recive is when i execute "show Error" is "No errors"

Have someone experience with for statements.

Regards
Dani


Re: Compiling in native and have FOR statment return compiled with errors [message #230220 is a reply to message #230217] Wed, 11 April 2007 04:24 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Show us a copy-paste from sqlplus
Re: Compiling in native and have FOR statment return compiled with errors [message #230224 is a reply to message #230220] Wed, 11 April 2007 04:29 Go to previous messageGo to next message
danijelv
Messages: 12
Registered: March 2007
Junior Member
alter session set plsql_code_type = 'NATIVE';

Session altered

SQL> alter package dv_test compile package;

Warning: Package altered with compilation errors

SQL> show error
No errors for PACKAGE DANI.DV_TEST

SQL>
SQL> select object_name,param_name,param_value
2 from user_stored_settings
3 where object_name =
4 'DV_TEST';

OBJECT_NAME PARAM_NAME PARAM_VALUE
------------------------------ ------------------------------ --------------------------------------------------------------------------------
DV_TEST plsql_optimize_level 2
DV_TEST plsql_code_type NATIVE
DV_TEST plsql_debug FALSE
DV_TEST nls_length_semantics BYTE
DV_TEST plsql_warnings DISABLE:ALL
DV_TEST plsql_ccflags
DV_TEST plsql_compiler_flags NATIVE,NON_DEBUG
DV_TEST plsql_optimize_level 2
DV_TEST plsql_code_type NATIVE
DV_TEST plsql_debug FALSE
DV_TEST nls_length_semantics BYTE
DV_TEST plsql_warnings DISABLE:ALL
DV_TEST plsql_ccflags
DV_TEST plsql_compiler_flags NATIVE,NON_DEBUG

14 rows selected


If I disable
for i in (select d.id, d.value1 from dv_rn_tb1 d where d.id in(1,2,4,6,8,9,4))
loop
dbms_output.put_line('test'||to_char(i.value1));
end loop;

then work OK

Regard Dani

[Updated on: Wed, 11 April 2007 04:33]

Report message to a moderator

Re: Compiling in native and have FOR statment return compiled with errors [message #230229 is a reply to message #230224] Wed, 11 April 2007 04:34 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
select * from user_errors;

alter compile does not allow a show errors.
Re: Compiling in native and have FOR statment return compiled with errors [message #230235 is a reply to message #230229] Wed, 11 April 2007 04:48 Go to previous messageGo to next message
danijelv
Messages: 12
Registered: March 2007
Junior Member

I tried to use
select * from user_errors where name='DV_TEST';

NAME TYPE SEQUENCE LINE POSITION TEXT ATTRIBUTE MESSAGE_NUMBER
------------------------------ ------------ ---------- ---------- --------------------------------------------------------------------------------
DV_TEST PACKAGE BODY 1 0 0 PLS-00923: native compilation failed: C compilation or linking failed:c:/oracle/ ERROR 923


This is error on my package.
Re: Compiling in native and have FOR statment return compiled with errors [message #230243 is a reply to message #230235] Wed, 11 April 2007 04:56 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
I have no experience with native compiling..
You can execute the select as a select into? (without the for loop)
Re: Compiling in native and have FOR statment return compiled with errors [message #230245 is a reply to message #230243] Wed, 11 April 2007 05:00 Go to previous message
danijelv
Messages: 12
Registered: March 2007
Junior Member
It's hard

because we had writen 100 and more packages, thats the problem.
Mybe some will go, some can teke to much time to convert everihting,

Thnx a lot, for helping me.

Regards

Dani

Previous Topic: variables in packages
Next Topic: SQL coding
Goto Forum:
  


Current Time: Sun Dec 01 11:45:21 CST 2024