INSERT INTO new_schedules_spider_shipsname ( ID,SCAC,VESSEL,VOYAGE,SERVICE_NAME,MD5 ) SELECT
NULL,%s,%s,%s,%s,%s
FROM
DUAL
WHERE
NOT EXISTS ( SELECT * FROM new_schedules_spider_shipsname s WHERE s.MD5 = %s and s.STATE =0 )
05-27 09:03