0

Hi,

I am facing issue while connecting to sqlplus in perl script. Following is my perl script code. It didn't execute properly & it take too much time to run very short sql.

#!/usr/bin/perl
$sql_return = `sqlplus -s user/password << SQL_END
set linesize 80
set pagesize 10
set heading off
set feedback off
SELECT ID,NAME,LASTNAME
FROM EMPLOYEES
WHERE ( ID= '$id');
quit
SQL_END
`;
chomp($sql_return);
$sql_return = trim($sql_return);
my ($id,$name,$lastname)= split('\n',$sql_return);
print "$id\n";
print "$name\n";
print "$lastname\n";

Can you please suggest if I'm missing anything here. Thanks!

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by thines01
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.