in reply to perl win32:odbc exceution of query with unions

While I am unable to nail down the exact nature of your problem, I have a suggestion. Assuming you have access to Access, does your sp2 run fine from within Access? That may be the quickest way to identify the cause of your error.

Also, I am seeing the following in your code

$db-> Sql( "execute Sp2 2004/05/16" )
I think you might want to escape your date properly. In Access you usually do like so --
my $date = "#2004/05/16#"; $db-> Sql( "execute Sp2 $date" )
Note the use of the # signs bookending the date.