Invalid query: insert into tb_error values (null, sysdate(), '', 'select as country_rus, a.codename as country_eng, a.nid as ncatalog1, b.nid as ncatalog2, b.ntype as ntype2, b.codename as subjectcode, as subject, b.nflag as dirflag, a.name2 as country_rus2, b.cross_dir from am_catalog as a, am_catalog as b where a.ntype=1 and (b.ntype = 4 and a.codename = \'\' or b.ntype not in (1,4)) and CONCAT( a.codename, \'/\', b.codename) in (\'colombia/\', \'/colombia\', \'colombia\') order by b.npid;', '');