![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Perl - PostGreSql query | garric | UNIX and Linux Applications | 0 | 06-01-2008 04:17 AM |
| Query in perl | Dana Evans | UNIX for Dummies Questions & Answers | 2 | 11-21-2007 11:27 PM |
| perl query | bishweshwar | Shell Programming and Scripting | 1 | 04-30-2007 10:03 AM |
| Perl CGI Query | pondlife | Shell Programming and Scripting | 4 | 06-08-2006 10:28 PM |
| Query string assingment for other variable in PERL | maheshsri | Shell Programming and Scripting | 0 | 01-30-2006 04:45 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Incorrect SQL query in perl
I the the following perl script, however it does not return anything. Did i form my syantax wrongly? Code:
$sth=$dbh->prepare("select a.rowid,a.* from Table1 a
where a.field1 = \'$Indicator1\'
and a.schedule = \'$Indicator2\' and a.lastdate <= sysdate");
$sth->execute()
After i hardcoded my code to the following, it worked Code:
$sth=$dbh->prepare("select a.rowid,a.* from Table1 a
where a.field1 = 'Valid'
and a.schedule = 'Y' and a.lastdate <= sysdate ");
$sth->execute()
i think the ' and \ could have messed up the syntax, how can i resolve it? Indicator1 and indicator2 are not supposed to be hardcoded. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|