Help on conditional statement to accompany wp_insert_post function please?

What sort of unique data are returned by your external SQL query? I would assume that you would need to insert some sort of unique data (e.g. primary key from the external DB) as either $post data or metadata, and then your conditional could look for the existence of these unique data.

Alternately, you could hash the postdata from the external DB, and then store the hash value as $post metadata, and query on the existence of the hash value?

EDIT:

To query for specific $post metadata, use the get_post_custom() function (Codex ref). e.g.:

$mypostcustom = get_post_custom( $post->ID );

if ( ! isset( $mypostcustom['unique_query_data'] ) ) {
     // Unique query data not found; do something
} else {
     // Unique query data found; do something else
}

Note: this assumes that you’ve already worked out how to add the custom post meta, e.g. via add_post_meta() (Codex ref).