that's because the problem script is only one of several in the PERL code overall, and the others work without any fuss. I've read up on DBI:ODBC and know there is a matter of how the module inteprets the sql script before it passes it over to the db.
However I thank you for the pointers about DBI (some pages I hadn't found before!) and will have a check through before I come back.
Comment on Re^2: Limitations of DBI (or) DBD::ODBC ?