in reply to CGI-SQL Query Issue

How is the sqlplus part failing?

Are you sure that blindly mixing shell scripts and Perl code is a good approach?

Maybe you want to read perlop and perlsyn on how to construct strings in Perl.

Personally, I suggest simply using Querylet::CGI to run SQL queries from a CGI environment.

Replies are listed 'Best First'.
Re^2: CGI-SQL Query Issue
by Anonymous Monk on Mar 17, 2016 at 14:18 UTC
    Hi, Not all the perl modules are installed on my system. And I cant get it installed too, it is in my office. So, this Querylet::CGI would not help. Any other solution? Regards
Re^2: CGI-SQL Query Issue
by Anonymous Monk on Mar 17, 2016 at 14:25 UTC
    I simply want to use "$STARTDATE" and "$ENDDATE" I parsed in my script (in above) in my sql query to retrieve the data from DB and output it on the web page, when the user clicks on "submit" button. Please help, this is very urgent!

      Have you read the links to the Perl documentation I provided?

      These links discuss how and when variables interpolate.

      Maybe eliminate CGI from the problem space and first get your Perl script running outside of the webserver.

      What errors do you get?

        I don't get any error, below is the output I get when I print the variable which was supposed to store the sql output. So, the sql is not processing at all.(this is the issue) sqlplus -s id971934/colecsp\@ECSP <<END set heading off set echo off set feedback off set pagesize 0 select date_time_out,order_id,error_message,customer_id from ECS_SCHEMA.cob_mcom_log where error_code<>0; END