home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2001 July
/
PCWorld_2001-07_cd.bin
/
Software
/
Komercni
/
software602
/
cnv_ifp.exe
/
CONV_TRA.PSM
< prev
next >
Wrap
Text File
|
2001-02-12
|
38KB
|
769 lines
{$$3249892617 . }FUNCTION `Conv_transfer_107to110`( { <parameters> } ) RETURNS BOOLEAN;
BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION,SQLWARNING
BEGIN
RETURN FALSE;
END;
CALL Set_sql_option(64,0); -- automatickΘ uvol≥ovßnφ zßznam∙
DELETE FROM _110ti_07;
DELETE FROM _110ti_03;
DELETE FROM _110ti_032;
DELETE FROM _110ti_033;
DELETE FROM _110ti_034;
DELETE FROM _110ti_035;
DELETE FROM _110ti_036;
DELETE FROM _110ti_037;
DELETE FROM _110ti_038;
CALL Set_sql_option(64,64);
FOR row AS curs INSENSITIVE CURSOR FOR
SELECT *
FROM _107Ti_07
DO
INSERT INTO _110Ti_07 (stsk_bm_from,stsk_bm_to,stsk_bm_date,stsk_dm_from,stsk_dm_to,stsk_dm_date,last_op_proc,fulltext)
VALUES (row.stsk_bm_from,row.stsk_bm_to,row.stsk_bm_date,row.stsk_dm_from,row.stsk_dm_to,row.stsk_dm_date,row.last_op_proc,row.fulltext);
END FOR;
INSERT INTO _110ti_03 SELECT * FROM _107ti_03;
FOR row AS curs INSENSITIVE CURSOR FOR
SELECT *
FROM _107Ti_011
WHERE cat_name<>""
DO
INSERT INTO _110Ti_032 (id,name, is_company_categ, is_pers_categ, is_cmppers_categ)
VALUES (row.id,row.cat_name, true,true,false);
END FOR;
FOR row AS curs INSENSITIVE CURSOR FOR
SELECT *
FROM _107Ti_013
WHERE cat_name<>""
DO
INSERT INTO _110Ti_032 (id,name, is_company_categ, is_pers_categ, is_cmppers_categ)
VALUES (row.id+40,row.cat_name, false,false,true);
END FOR;
FOR row AS curs INSENSITIVE CURSOR FOR
SELECT *
FROM _107Ti_09
DO
IF row.c1=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=1 AND is_company_categ));
END IF;
IF row.c2=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=2 AND is_company_categ));
END IF;
IF row.c3=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=3 AND is_company_categ));
END IF;
IF row.c4=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=4 AND is_company_categ));
END IF;
IF row.c5=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=5 AND is_company_categ));
END IF;
IF row.c6=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=6 AND is_company_categ));
END IF;
IF row.c7=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=7 AND is_company_categ));
END IF;
IF row.c8=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=8 AND is_company_categ));
END IF;
IF row.c9=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=9 AND is_company_categ));
END IF;
IF row.c10=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=10 AND is_company_categ));
END IF;
IF row.c11=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=11 AND is_company_categ));
END IF;
IF row.c12=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=12 AND is_company_categ));
END IF;
IF row.c13=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=13 AND is_company_categ));
END IF;
IF row.c14=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=14 AND is_company_categ));
END IF;
IF row.c15=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=15 AND is_company_categ));
END IF;
IF row.c16=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=16 AND is_company_categ));
END IF;
IF row.c17=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=17 AND is_company_categ));
END IF;
IF row.c18=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=18 AND is_company_categ));
END IF;
IF row.c19=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=19 AND is_company_categ));
END IF;
IF row.c20=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=20 AND is_company_categ));
END IF;
END FOR;
FOR row AS curs INSENSITIVE CURSOR FOR
SELECT *
FROM _107Ti_010
DO
IF row.c21=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=21 AND is_company_categ));
END IF;
IF row.c22=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=22 AND is_company_categ));
END IF;
IF row.c23=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=23 AND is_company_categ));
END IF;
IF row.c24=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=24 AND is_company_categ));
END IF;
IF row.c25=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=25 AND is_company_categ));
END IF;
IF row.c26=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=26 AND is_company_categ));
END IF;
IF row.c27=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=27 AND is_company_categ));
END IF;
IF row.c28=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=28 AND is_company_categ));
END IF;
IF row.c29=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=29 AND is_company_categ));
END IF;
IF row.c30=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=30 AND is_company_categ));
END IF;
IF row.c31=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=31 AND is_company_categ));
END IF;
IF row.c32=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=32 AND is_company_categ));
END IF;
IF row.c33=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=33 AND is_company_categ));
END IF;
IF row.c34=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=34 AND is_company_categ));
END IF;
IF row.c35=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=35 AND is_company_categ));
END IF;
IF row.c36=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=36 AND is_company_categ));
END IF;
IF row.c37=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=37 AND is_company_categ));
END IF;
IF row.c38=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=38 AND is_company_categ));
END IF;
IF row.c39=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=39 AND is_company_categ));
END IF;
IF row.c40=true THEN
INSERT INTO _110Ti_034 (id_cmp,id_categ)
VALUES (row.id_cmp,(SELECT id FROM _110Ti_032 WHERE id=40 AND is_company_categ));
END IF;
END FOR;
FOR row AS curs INSENSITIVE CURSOR FOR
SELECT *
FROM _107Ti_014
DO
IF row.cp1=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=1+40 AND is_cmppers_categ));
END IF;
IF row.cp2=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=2+40 AND is_cmppers_categ));
END IF;
IF row.cp3=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=3+40 AND is_cmppers_categ));
END IF;
IF row.cp4=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=4+40 AND is_cmppers_categ));
END IF;
IF row.cp5=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=5+40 AND is_cmppers_categ));
END IF;
IF row.cp6=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=6+40 AND is_cmppers_categ));
END IF;
IF row.cp7=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=7+40 AND is_cmppers_categ));
END IF;
IF row.cp8=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=8+40 AND is_cmppers_categ));
END IF;
IF row.cp9=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=9+40 AND is_cmppers_categ));
END IF;
IF row.cp10=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=10+40 AND is_cmppers_categ));
END IF;
IF row.cp11=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=11+40 AND is_cmppers_categ));
END IF;
IF row.cp12=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=12+40 AND is_cmppers_categ));
END IF;
IF row.cp13=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=13+40 AND is_cmppers_categ));
END IF;
IF row.cp14=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=14+40 AND is_cmppers_categ));
END IF;
IF row.cp15=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=15+40 AND is_cmppers_categ));
END IF;
IF row.cp16=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=16+40 AND is_cmppers_categ));
END IF;
IF row.cp17=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=17+40 AND is_cmppers_categ));
END IF;
IF row.cp18=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=18+40 AND is_cmppers_categ));
END IF;
IF row.cp19=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=19+40 AND is_cmppers_categ));
END IF;
IF row.cp20=true THEN
INSERT INTO _110Ti_035 (id_pers,id_categ)
VALUES (row.id_pers,(SELECT id FROM _110Ti_032 WHERE id=20+40 AND is_cmppers_categ));
END IF;
END FOR;
INSERT INTO _110ti_033 (id,name,type) VALUES (-2,"--- Äßdnß ---",0);
INSERT INTO _110ti_033 (id,name,type) VALUES (-1,"--- Novß ---",0);
FOR row AS curs INSENSITIVE CURSOR FOR
SELECT *
FROM _107ti_015
DO
INSERT INTO _110ti_036 (id,name,private,fcmp_sm,`exp`) VALUES (row.id,row.name,row.`user`,(SELECT cmp_sm FROM _107ti_016 WHERE id_query=row.id),1440);
END FOR;
FOR row AS curs INSENSITIVE CURSOR FOR
SELECT *
FROM _107ti_016
DO
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type) VALUES (row.id_query,999,0);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type) VALUES (row.id_query,999,1);
IF row.c1=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,1);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,1);
END IF;
IF row.c1=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,1);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,1);
END IF;
IF row.c2=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,2);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,2);
END IF;
IF row.c2=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,2);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,2);
END IF;
IF row.c3=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,3);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,3);
END IF;
IF row.c3=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,3);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,3);
END IF;
IF row.c4=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,4);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,4);
END IF;
IF row.c4=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,4);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,4);
END IF;
IF row.c5=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,5);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,5);
END IF;
IF row.c5=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,5);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,5);
END IF;
IF row.c6=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,6);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,6);
END IF;
IF row.c6=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,6);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,6);
END IF;
IF row.c7=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,7);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,7);
END IF;
IF row.c7=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,7);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,7);
END IF;
IF row.c8=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,8);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,8);
END IF;
IF row.c8=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,8);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,8);
END IF;
IF row.c9=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,9);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,9);
END IF;
IF row.c9=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,9);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,9);
END IF;
IF row.c10=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,10);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,10);
END IF;
IF row.c10=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,10);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,10);
END IF;
IF row.c11=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,11);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,11);
END IF;
IF row.c11=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,11);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,11);
END IF;
IF row.c12=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,12);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,12);
END IF;
IF row.c12=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,12);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,12);
END IF;
IF row.c13=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,13);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,13);
END IF;
IF row.c13=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,13);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,13);
END IF;
IF row.c14=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,14);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,14);
END IF;
IF row.c14=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,14);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,14);
END IF;
IF row.c15=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,15);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,15);
END IF;
IF row.c15=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,15);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,15);
END IF;
IF row.c16=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,16);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,16);
END IF;
IF row.c16=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,16);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,16);
END IF;
IF row.c17=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,17);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,17);
END IF;
IF row.c17=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,17);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,17);
END IF;
IF row.c18=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,18);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,18);
END IF;
IF row.c18=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,18);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,18);
END IF;
IF row.c19=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,19);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,119);
END IF;
IF row.c19=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,19);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,19);
END IF;
IF row.c20=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,20);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,20);
END IF;
IF row.c20=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,20);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,20);
END IF;
IF row.c21=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,21);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,21);
END IF;
IF row.c21=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,21);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,21);
END IF;
IF row.c22=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,22);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,22);
END IF;
IF row.c22=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,22);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,22);
END IF;
IF row.c23=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,23);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,23);
END IF;
IF row.c23=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,23);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,23);
END IF;
IF row.c24=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,24);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,24);
END IF;
IF row.c24=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,24);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,24);
END IF;
IF row.c25=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,25);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,25);
END IF;
IF row.c25=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,25);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,25);
END IF;
IF row.c26=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,26);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,26);
END IF;
IF row.c26=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,26);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,26);
END IF;
IF row.c27=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,27);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,27);
END IF;
IF row.c27=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,27);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,27);
END IF;
IF row.c28=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,28);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,28);
END IF;
IF row.c28=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,28);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,28);
END IF;
IF row.c29=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,29);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,29);
END IF;
IF row.c29=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,29);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,29);
END IF;
IF row.c30=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,30);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,30);
END IF;
IF row.c30=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,30);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,30);
END IF;
IF row.c31=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,31);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,31);
END IF;
IF row.c31=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,31);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,31);
END IF;
IF row.c32=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,31);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,31);
END IF;
IF row.c32=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,32);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,32);
END IF;
IF row.c33=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,32);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,32);
END IF;
IF row.c33=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,33);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,33);
END IF;
IF row.c34=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,34);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,34);
END IF;
IF row.c34=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,34);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,34);
END IF;
IF row.c35=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,35);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,35);
END IF;
IF row.c35=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,35);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,35);
END IF;
IF row.c36=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,36);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,6);
END IF;
IF row.c36=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,36);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,36);
END IF;
IF row.c37=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,37);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,37);
END IF;
IF row.c37=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,37);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,37);
END IF;
IF row.c38=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,38);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,38);
END IF;
IF row.c38=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,38);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,38);
END IF;
IF row.c39=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,39);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,39);
END IF;
IF row.c39=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,39);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,39);
END IF;
IF row.c40=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,0,40);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,1,40);
END IF;
IF row.c40=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,0,40);
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,1,40);
END IF;
IF row.cp1=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,41);
END IF;
IF row.cp1=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,41);
END IF;
IF row.cp2=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,42);
END IF;
IF row.cp2=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,42);
END IF;
IF row.cp3=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,43);
END IF;
IF row.cp3=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,43);
END IF;
IF row.cp4=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,44);
END IF;
IF row.cp4=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,44);
END IF;
IF row.cp5=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,45);
END IF;
IF row.cp5=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,45);
END IF;
IF row.cp6=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,46);
END IF;
IF row.cp6=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,46);
END IF;
IF row.cp7=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,47);
END IF;
IF row.cp7=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,47);
END IF;
IF row.cp8=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,48);
END IF;
IF row.cp8=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,48);
END IF;
IF row.cp9=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,49);
END IF;
IF row.cp9=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,49);
END IF;
IF row.cp10=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,50);
END IF;
IF row.cp10=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,50);
END IF;
IF row.cp11=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,51);
END IF;
IF row.cp11=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,51);
END IF;
IF row.cp12=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,52);
END IF;
IF row.cp12=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,52);
END IF;
IF row.cp13=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,53);
END IF;
IF row.cp13=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,53);
END IF;
IF row.cp14=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,54);
END IF;
IF row.cp14=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,54);
END IF;
IF row.cp15=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,55);
END IF;
IF row.cp15=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,55);
END IF;
IF row.cp16=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,56);
END IF;
IF row.cp16=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,56);
END IF;
IF row.cp17=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,57);
END IF;
IF row.cp17=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,57);
END IF;
IF row.cp18=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,58);
END IF;
IF row.cp18=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,58);
END IF;
IF row.cp19=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,59);
END IF;
IF row.cp19=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,59);
END IF;
IF row.cp20=true THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,0,2,60);
END IF;
IF row.cp20=false THEN
INSERT INTO _110Ti_037 (id_query,categ_rel,categ_type,categ_id) VALUES (row.id_query,1,2,60);
END IF;
END FOR;
RETURN TRUE;
END