Hi, I need some help here. I'm using DBD::Sybase and am trying to run a transaction. It's got a bunch of inserts in it and somewhere near the top I've got a :
declare @foo int select @foo=(some subselect) insert into table(f1, .. fn) values (v1, ...(select @foo),..vn) insert into table2(f1, ..., fn) values (v1...(select @foo),..vn) type thing. I set AutoCommit to 0 and then itterate through an array of these with my $dbh->do. What I get though is an error stating that I must 'first declare @foo', when it starts to run through the inserts which (select @foo). Does anyone know how to do this correctly? I can run it through ISQL, however Cheers, Raf