#!substdef "!DISPATCHER_CHECK_MEDIA_SERVER_INSERT_QUERY!insert into dispatcher (setid, destination) select \$var(SetId), \"\$var(MediaUrl)\" where not exists(select * from dispatcher where destination = \"\$var(MediaUrl)\")!g"
#!substdef "!DISPATCHER_CHECK_MEDIA_SERVER_INSERT_QUERY!insert into dispatcher (setid, destination) select \$var(SetId), \"\$var(MediaUrl)\" from DUAL where not exists(select * from dispatcher where destination = \"\$var(MediaUrl)\")!g"
sql_query("exec", "insert into dispatcher (setid, destination) select $var(SetId), \"$var(MediaUrl)\" where not exists(select * from dispatcher where destination=\"$var(MediaUrl)\")");