Table structure is id int(11) source_code varchar(20) stream_code char(100) client_id int(11) stream_oauth_id int(11) name varchar(200) url varchar(2500) status_code char(10) stream_data longtext feed_db varchar(500) feed_table varchar(200) last_update datetime report_db varchar(500) sla smallint(5) unsigned exclude_request varchar(200) owned tinyint(1) push tinyint(1) unsigned #### id: 447 source_code: FACEBOOK stream_code: 281434322dd4734 client_id: 53 stream_oauth_id: 422 name: Seer url: Old Beer status_code: DISABLED stream_data: NULL feed_db: production_feed002 feed_table: FACEBOOK_28111aa734 last_update: 2015-02-05 13:23:19 report_db: production_report002 sla: 0 exclude_request: CONVERSATIONS owned: 1 push: 0 #### $activate_stream =$dbh4->prepare("INSERT INTO stream (source_code, stream_code, client_id, name, url, status_code, stream_data, feed_db, feed_table, last_update, report_db, sla, exclude_request, owned, push) VALUES(?, ?, 10, ?, ?, DISABLED, ?, production_feed002, ?, ?, ?, ?, ?, ?, ?)"); while (my @activate_results = $activate_info >fetchrow_array() ) { $activate_stream->execute(@activate_results) or die $activate_stream->errstr; } } $activate_stream->finish();