macchisp
09-11-2007, 08:09 PM
I have a SQL statement that works in one script, and not in another. They are exactly the same statement, but the only difference is one I am using the #!/usr/local/bin/perl and the other I'm using #!/usr/bin/perl. (I know it seems odd that these are different but the boxes are a mess and it's what I have to work with!)
I am using the module DBI and the local bin has version 1.59 while the usr bin uses 1.48. The one in the usr bin works correctly.
Here is my SQL Statement:
SELECT * FROM JPDAR WHERE Position = '$Cposition' AND Year = '$Year'
I think it is failing because of the AND. I have tested by removing the AND and only using WHERE Position = '$Cposition' or Year = '$Year' and it works fine.
Has anyone run into a similar problem like this before? I know it seems wierd, but I am out of things to test.
Thanks for all your assistance on this.
I am using the module DBI and the local bin has version 1.59 while the usr bin uses 1.48. The one in the usr bin works correctly.
Here is my SQL Statement:
SELECT * FROM JPDAR WHERE Position = '$Cposition' AND Year = '$Year'
I think it is failing because of the AND. I have tested by removing the AND and only using WHERE Position = '$Cposition' or Year = '$Year' and it works fine.
Has anyone run into a similar problem like this before? I know it seems wierd, but I am out of things to test.
Thanks for all your assistance on this.