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 euro_catalog as a, euro_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 (\'podmsk/\', \'/podmsk\', \'podmsk\') order by b.npid;', '');