Just been hacking away at this to get the idea across of migrating and validating data from one database into the Drupal core (Drupal 6). It relies on the user having created a content type of news from CCK.

mysql_connect('localhost', 'user', 'password') or die('Cannot connect to MySql');
mysql_select_db('database') or die('Cannot connect to database');

// get the required data from the database
$sql = 'select * from tableName';
$query = mysql_query($sql);

// give it a timestamp
$unixTimestamp = 1230800640; //starting unix timestamp
$increment = 1012745; //could be replace by a rand()

//beginning of the mysql insert sql queries
$insertToNode = "INSERT INTO `node` (`nid`, `vid`, `type`, `language`, `title`, `uid`, `status`, `created`, `changed`, `comment`, `promote`, `moderate`, `sticky`, `tnid`, `translate`) VALUES ";
$insertToNodeCommentStats = "INSERT INTO `node_comment_statistics` (`nid`, `last_comment_timestamp`, `last_comment_name`, `last_comment_uid`, `comment_count`) VALUES ";
$insertToNodeRevisions = "INSERT INTO `node_revisions` (`nid`, `vid`, `uid`, `title`, `body`, `teaser`, `log`, `timestamp`, `format`) VALUES ";

//get the total number of rows
$totalRows = mysql_num_rows($query);

$startNid = 3; // the first Node id (Nid) to be added
$userUid = 1; // the id of the user (1 = admin)

// create the insert queries
while($result = mysql_fetch_assoc($query)){

// sanitise strings ready for insertion
$headline = mysql_real_escape_string($result['headline']);
$content = mysql_real_escape_string($result['content']);
$snippet = mysql_real_escape_string($result['teaser']);

// create looping additois to database
$insertToNode = $insertToNode."($startNid, $startNid, 'news', '', '".$headline."', $userUid, 1, $unixTimestamp, $unixTimestamp, 2, 1, 0, 0, 0, 0)";
$insertToNodeCommentStats = $insertToNodeCommentStats."($startNid, $unixTimestamp, NULL, 1, 0)";
$insertToNodeRevisions = $insertToNodeRevisions."($startNid, $startNid, $userUid, '".$headline."', '".$content."', '".$snippet."', '', $unixTimestamp, 2)";


$unixTimestamp = $unixTimestamp + $increment;

// put a semi colon to finish query
if($startNid != $totalRows){
$insertToNode = $insertToNode.', ';
$insertToNodeCommentStats = $insertToNodeCommentStats.', ';
$insertToNodeRevisions = $insertToNodeRevisions.', ';

// if not empty run as mysql_query
mysql_select_db('newDatabase') or die ('Cannot connect to database');

$insertToNode = $insertToNode.';';
$insertToNodeCommentStats = $insertToNodeCommentStats.';';
$insertToNodeRevisions = $insertToNodeRevisions.';';


//echo the data that has been inserted
echo 'Inserted into tablename node: '.$insertToNode;
echo 'Inserted into tablename node_comment_statistics: '.$insertToNodeCommentStats;
echo 'Inserted into tablename node_revisions: '.$insertToNodeRevisions;