Hello:
I'm having a problem formulating the code to execute a multiple line
command. I'm trying to execute something like:
set rowcount 100000
declare @rowct int
select @rowct = 1
while (@rowct > 0)
begin
delete Foo where creationDate < dateadd(day, -5, getdate())
select @rowct = @@rowcount
end
I know the change to rowcount will persist, but I'm having problems
formulating the rest of it. Specifically, I'm having problems
declaring the variable and executing the while loop.
$query = "declare @rowct int \n select @rowct = 1 \n" doesn't seem to
be working probably due to the interpretation of the "\n".
I was unable to find anything at perldoc or cpan searching for DBD or
DBI modules. Any assistance would be appreciated.
Thanks
John