By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,691 Members | 2,041 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,691 IT Pros & Developers. It's quick & easy.

Oracle SQL parallel query within PERL

P: 1
Hello - I am trying to run an oracle parallel query within a perl script but it will not work. I am getting the following error: ORA-24373: invalid length specified for statement (DBD ERROR: OCIStmtPrepare)
I would appreciate any sugguestions on what to try in order to get this to work.

Expand|Select|Wrap|Line Numbers
  1. sub cre_mob_arch_tmp {
  2.   print "  (*) Creating Base of Mobility Trouble_Ticket_Archive Tickets ...\n";
  3.   $sql_statement = `
  4.      Create table mob_arch_tmp as select /*+ PARALLEL(a 8) */ * from trouble_ticket_archive@mobility a where to_char((TO_DATE('1970-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')+NUMTODSINTERVAL("CLOSED_TIME"-14400,'second')), 'DD-MON-YY') = to_char(sysdate-1, 'DD-MON-YY')
  5. /
  6.   `;
  7.  
  8.   unless ($rows = $dbh->do("$sql_statement")) {
  9.     &programError("Could not create table MOB_ARCH_TMP", "$sql_statement", "$DBI::errstr", "dba", "jbriz");
  10.     $dbh->rollback;
  11.     &logoffOracle($dbh);
  12.     exit;
  13.   }
  14. } # sub cre_mob_arch_tmp
  15.  
Apr 1 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.