2014-08-28 3 views
1

내가 아래로 펄을 사용하여 프로 시저를 실행하려고 사용하여 procedue을 실행하려고 :오라클 - 펄

DBD::Oracle::st execute failed: ORA-06550: line 4, column 12: 
PLS-00103: Encountered the symbol "END" when expecting one of the following: 


    := . (% ; 
The symbol ";" was substituted for "END" to continue. (DBD ERROR: error possibly near <*> indicator at char 71 in ' 
      BEGIN 
      update_cascade.on_table(:ts) 
      <*>END; 
     ') [for Statement " 
      BEGIN 
      update_cascade.on_table(:ts) 
      END; 
     " with ParamValues: :ts='ACTOR'] at sakila_update_cascade.pl line 18. 
DBD::Oracle::st execute failed: ORA-06550: line 4, column 12: 
PLS-00103: Encountered the symbol "END" when expecting one of the following: 


    := . (% ; 
The symbol ";" was substituted for "END" to continue. (DBD ERROR: error possibly near <*> indicator at char 71 in ' 
      BEGIN 
      update_cascade.on_table(:ts) 
      <*>END; 
     ') [for Statement " 
      BEGIN 
      update_cascade.on_table(:ts) 
      END; 
     " with ParamValues: :ts='ACTOR'] at sakila_update_cascade.pl line 18. 

내가 SQLPLUS 내에서 실행할 수 있습니다 : 다음과 같은 오류가 발생

my @tabs = qw!ACTOR ADDRESS CATEGORY CITY COUNTRY CUSTOMER FILM INVENTORY LANGUAGE STAFF STORE!; 
    for my $ts (@tabs){ 
    chomp $ts; 
     my $csr = $ora->prepare(q{ 
      BEGIN 
      update_cascade.on_table(:ts) 
      END; 
     }); 
$csr->bind_param(":ts", $ts); 
$csr->execute; 
} 

: 나는 함께 노력

exec update_cascade.on_table(:'ACTOR'); 

아래로
update_cascade.on_table('||:ts||') 

그것은하지 않습니다 실행 얻을이 펄 오류 얻을 : 아래

예를 들어
Can't bind unknown placeholder ':ts' (':ts') at sakila_mig.pl line 659. 

DBD :: Oracle 패키지 사이트 : 당신의 도움에 대한

my $test_num = 5; 
    my $is_odd; 

    $csr = $db->prepare(q{ 
    BEGIN 
    PLSQL_EXAMPLE.PROC_IN_INOUT(:test_num, :is_odd); 
    END; 
    }); 
    $csr->bind_param(":test_num", $test_num); 

    $csr->bind_param_inout(":is_odd", \$is_odd, 1); 
    $csr->execute; 

많은 감사를! Tonya.

답변

2

당신은 단순히 세미콜론이 누락 (;)

시도 :

 BEGIN 
     update_cascade.on_table(:ts); 
     END; 

코드는 확인 보인다!

+0

대단히 감사합니다. – TonyaLepski