Perl "system" command and Informix
Posted in 1998
Can anyone tell my what i'm doing wrong? The following procedure works if i
hard code the $hh in as say, "12", but it won't work if i try to have it
read from the list. I keep getting the error,
1262: Non-numeric character in datetime or interval.
Error in line 3Near character position 44
201: A syntax error has occurred.
Error in line 1Near character position 4
Please tell me what i'm doing wrong. Thanks in advance.
============================================
#!/usr/local/bin/perl
@half_hours = ("12","13","14");
foreach $hh (@half_hours) {
$ENV{INFORMIXSERVER} = "n36_shm";
system q{
dbaccess << 'eof'
database pmsys@n36;
SELECT *
FROM ama0_980714
WHERE EXTEND (ostime, HOUR to HOUR) = "$hh"; eof
};
print "got half hour $hh\\n";
#other code....
}