On Tue, 28 Dec 2004, Chris Lyon wrote: > So, I am trying to move data from one sql table to another table > called logs_archive. It seems that I am running into some problems > with memory as I am moving this much data from one table to another. > This is just syslog data but we need to archive it in some way. Can > anybody give any advice? Code is below. You're archiving syslog data?
Then why pump it into a database to begin with? Log data `bzip`s wonderfully well, you know... > $sth = $dbh->prepare( "select * from logs where ( timestamp <= > '$start_date$start_time' )" ); If you stub in values for $start_date and $start_time, what happens when you run this statement directly to your database? You don't mention what database server you're running, but in the SQL dialects I'm familiar with, '<=' isn't a valid operator I'm aware of. In any case, you don't really spell out what the problem is. Does this code work, but run too slowly, or does it not work at all? What happens when you run this script? -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>