vihar has asked for the wisdom of the Perl Monks concerning the following question:
my $dbh = DBI->connect( "dbi:Oracle:host=ortp09-scan;port=1521;service +_name=service1", "uname", "pass" , { RaiseError => 1 } ); # $day variable could change..hardcoded for now $day = "Sunday"; my $sth = $dbh->prepare(<<SQL); Select * From SMSVA_SUPR.schedule_table where process_name = 'Seed' and '$day' = 'Y'; SQL $sth->execute();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing a perl variable in SQL AND statement
by clueless newbie (Curate) on Nov 20, 2013 at 20:45 UTC | |
by vihar (Acolyte) on Nov 20, 2013 at 20:58 UTC | |
by dasgar (Priest) on Nov 20, 2013 at 21:06 UTC | |
by vihar (Acolyte) on Nov 20, 2013 at 21:18 UTC | |
by vihar (Acolyte) on Nov 20, 2013 at 20:59 UTC | |
by vihar (Acolyte) on Nov 20, 2013 at 21:19 UTC |