Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2844

INSERT INTO informix.

sysaggregates(name)
VALUES('{ DATABASE afcelmolino delimiter | }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant dba to root;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant dba to informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant dba to Admin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant dba to Usuario;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant dba to USUARIO;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant dba to Administrador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant dba to Systecoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapctb row size = 71 number of columns = 6 index size =
13 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapc00100.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapctb ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pctb_cod_pctb char(8) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pctb_des_pctb char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pctb_cue_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pctb_val_num decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pctb_val_car char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pctb_val_fec date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pctb_cod_pctb) constraint informix.pk_bcapctb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapctb from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.track_01 row size = 110 number of columns = 8 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = track00101.unl number of rows = 178542 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.track_01 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_01_cod serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_01_userid integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_01_username char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_01_module integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_01_station varchar(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_01_dbuser varchar(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_01_datei datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_01_dateo datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (track_01_datei < track_01_dateo ) constraint
informix.ckt_track_01')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (track_01_cod) constraint informix.pk_track_01')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.track_01 from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.track_02 row size = 56 number of columns = 5 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = track00102.unl number of rows = 227034 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.track_02 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_02_cod serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_02_table char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_02_statment char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_02_date datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_02_cod_01 integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (track_02_cod) constraint informix.pk_track_02')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.track_02 from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.track_03 row size = 348 number of columns = 6 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = track00103.unl number of rows = 1420266 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.track_03 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_03_cod serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_03_cod_02 integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_03_pkval varchar(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_03_colname varchar(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_03_value varchar(255) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_03_case char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (track_03_cod) constraint informix.pk_track_03')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.track_03 from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaopen row size = 68 number of columns = 4 index size =
48 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaop00104.unl number of rows = 25 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaopen ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('open_cod_open serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('open_des_open char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('open_ses_id integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('open_nam_pc char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (open_ses_id')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (open_cod_open) constraint informix.pk_bcaopen')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaopen from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatjor row size = 53 number of columns = 50 index size
= 10 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatj00105.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatjor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_cod_tjor integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_cod_dsem char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0030 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0100 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0130 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0200 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0230 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0300 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0330 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0400 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0430 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0500 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0530 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0600 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0630 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0700 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0730 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0800 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0830 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0900 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_0930 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1000 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1030 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1100 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1130 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1200 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1230 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1300 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1330 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1400 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1430 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1500 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1530 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1600 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1630 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1700 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1730 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1800 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1830 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1900 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_1930 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_2000 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_2030 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_2100 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_2130 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_2200 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_2230 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_2300 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_2330 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tjor_hm_2400 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tjor_cod_tjor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatjor from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaapp row size = 36 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaap00106.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaapp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('app_cod_app serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('app_cod_modu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('app_computer char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('app_fecha datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (app_cod_app) constraint informix.pk_cod_app')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaapp from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaproc row size = 48 number of columns = 3 index size =
13 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapr00107.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaproc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('proc_cod_prfi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('proc_cod_proc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('proc_des_proc char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (proc_cod_prfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaproc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatmpf row size = 108 number of columns = 2 index size
= 13 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatm00108.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatmpf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tmpf_cod_tmpf char(8) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tmpf_des_tmpf char(100) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tmpf_cod_tmpf) constraint informix.pk_bcatmpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatmpf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcavaft row size = 660 number of columns = 5 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcava00109.unl number of rows = 11 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcavaft ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vaft_cod_vaft integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vaft_des_vaft char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vaft_lon_vaft integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vaft_sel_vaft char(600)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vaft_tip_vaft smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (vaft_cod_vaft) constraint informix.pk_bcavaft')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcavaft from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcathdv row size = 38 number of columns = 6 index size =
17 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcath00110.unl number of rows = 109 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcathdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('thdv_cod_tadv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('thdv_fec_thdv datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('thdv_mon_inic decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('thdv_mon_fina decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('thdv_tas_acti decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('thdv_tas_inac decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (thdv_cod_tadv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcathdv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadfes row size = 51 number of columns = 4 index size =
14 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadf00111.unl number of rows = 25 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadfes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfes_anio integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfes_fec_dfes char(5) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfes_des_dfes char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfes_ctr_dfes smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dfes_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadfes from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaftnt row size = 1035 number of columns = 4 index size
= 8 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaft00112.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaftnt ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ftnt_cod_ftnt char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ftnt_des_ftnt char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ftnt_for_ftnt char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ftnt_tip_ftnt smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ftnt_cod_ftnt) constraint informix.pk_bcaftnt')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaftnt from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.tmpsact row size = 26 number of columns = 4 index size =
13 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = tmpsa00113.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.tmpsact ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_peri integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_sal_debi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_sal_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (sact_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.tmpsact from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacoac row size = 4 number of columns = 2 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaco00114.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacoac ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coac_cod_coac smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coac_ord_coac smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (coac_cod_coac) constraint informix.pk_bcacoac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacoac from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaestr row size = 58 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaes00115.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaestr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('estr_cod_estr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('estr_des_estr char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('estr_dig_estr smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('estr_ord_estr smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (estr_cod_estr) constraint informix.pk_bcaestr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaestr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaseqn row size = 34 number of columns = 2 index size =
35 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcase00116.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaseqn ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('seqn_tab_seqn char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('seqn_val_seqn integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (seqn_tab_seqn) constraint informix.pk_bcaseqn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaseqn from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcactrl row size = 395 number of columns = 21 index size
= 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcact00117.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcactrl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_1 varchar(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_2 varchar(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_3 varchar(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_4 varchar(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_5 varchar(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_6 decimal(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_7 decimal(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_8 decimal(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_9 decimal(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_10 decimal(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_11 decimal(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_12 decimal(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_13 decimal(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_14 decimal(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_15 decimal(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_16 decimal(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_17 varchar(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_18 decimal(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_19 decimal(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_20 decimal(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('field_21 varchar(140')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcactrl from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaenti row size = 122 number of columns = 2 index size
= 66 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaen00118.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaenti ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('enti_cod_enti varchar(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('enti_nom_enti varchar(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (enti_cod_enti) constraint informix.pk_bcaenti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaenti from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatprv row size = 33 number of columns = 7 index size =
13 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatp00119.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatprv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tprv_fec_prdv datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tprv_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tprv_cod_tdoc char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tprv_num_docu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tprv_val_prdv decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tprv_cod_tasi char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tprv_cod_tcdv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tprv_fec_prdv) constraint informix.pk_bcatprv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatprv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcasaux row size = 25 number of columns = 5 index size =
0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcasa00120.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcasaux ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('saux_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('saux_sal_ndis decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('saux_num_dias integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('saux_fec_migr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('saux_cod_est integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcasaux from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.pbcattbl row size = 369 number of columns = 25 index
size = 31 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = pbcat00121.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.pbcattbl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbt_tnam char(18) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbt_tid integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbt_ownr char(8) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbd_fhgt smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbd_fwgt smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbd_fitl char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbd_funl char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbd_fchr smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbd_fptc smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbd_ffce char(18)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbh_fhgt smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbh_fwgt smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbh_fitl char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbh_funl char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbh_fchr smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbh_fptc smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbh_ffce char(18)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbl_fhgt smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbl_fwgt smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbl_fitl char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbl_funl char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbl_fchr smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbl_fptc smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbl_ffce char(18)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbt_cmnt varchar(254)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pbt_tnam')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.pbcattbl from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.pbcatcol row size = 1429 number of columns = 19 index
size = 49 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = pbcat00122.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.pbcatcol ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_tnam char(18) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_tid integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_ownr char(8) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_cnam char(18) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_labl varchar(254)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_lpos smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_hdr varchar(254)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_hpos smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_jtfy smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_mask char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_case smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_hght smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_wdth smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_ptrn char(31)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_bmap char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_init varchar(254)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_edit varchar(31)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_cmnt varchar(254)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbc_tag varchar(254)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pbc_tnam')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.pbcatcol from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.pbcatfmt row size = 291 number of columns = 4 index size
= 35 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = pbcat00123.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.pbcatfmt ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbf_name char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbf_frmt varchar(254) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbf_type smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbf_cntr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pbf_name) constraint informix.pk_pbcatfmt')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.pbcatfmt from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.pbcatvld row size = 546 number of columns = 5 index size
= 35 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = pbcat00124.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.pbcatvld ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbv_name char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbv_vald varchar(254) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbv_type smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbv_cntr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbv_msg varchar(254)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pbv_name) constraint informix.pk_pbcatvld')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.pbcatvld from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.pbcatedt row size = 329 number of columns = 7 index size
= 37 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = pbcat00125.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.pbcatedt ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbe_name char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbe_edit varchar(254)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbe_type smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbe_cntr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbe_seqn smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbe_flag integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pbe_work char(32)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pbe_name')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.pbcatedt from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcagrup row size = 34 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcagr00126.unl number of rows = 6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcagrup ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grup_cod_grup serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grup_des_grup char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (grup_cod_grup) constraint informix.pk_bcagrup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcagrup from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadsem row size = 14 number of columns = 3 index size =
6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcads00127.unl number of rows = 7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadsem ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsem_cod_dsem char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsem_des_dsem char(9) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsem_dia_efec integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dsem_cod_dsem) constraint informix.pk_bcadsem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadsem from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatsec row size = 34 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcats00128.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatsec ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsec_cod_tsec serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsec_des_tsec char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tsec_cod_tsec) constraint informix.pk_bcatsec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatsec from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaprov row size = 46 number of columns = 6 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapr00129.unl number of rows = 23 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaprov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prov_cod_prov integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prov_nom_prov char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prov_cod_telf char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prov_sib_prov integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prov_cod_pais integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prov_cod_regi char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (prov_cod_prov) constraint informix.pk_bcaprov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaprov from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcamenu row size = 162 number of columns = 6 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcame00130.unl number of rows = 11 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcamenu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('menu_cod_menu serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('menu_des_menu char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('menu_clas_menu char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('menu_opc_dina integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('menu_cod_modu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('menu_tar_menu char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (menu_cod_menu) constraint informix.pk_bcamenu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcamenu from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaperf row size = 22 number of columns = 2 index size =
32 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcape00131.unl number of rows = 10 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaperf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('perf_cod_perf char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('perf_des_perf char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (perf_des_perf) constraint informix.uc_bcaperf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (perf_cod_perf) constraint informix.pk_bcaperf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaperf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatasi row size = 21 number of columns = 2 index size =
6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcata00132.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatasi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasi_cod_tasi char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasi_des_tasi char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (tasi_cod_tasi IN (''C'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tasi_cod_tasi) constraint informix.pk_bcatasi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatasi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatdin row size = 34 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatd00133.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatdin ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdin_cod_tdin serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdin_des_tdin char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tdin_cod_tdin) constraint informix.pk_bcatdin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatdin from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatcar row size = 31 number of columns = 2 index size =
6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatc00134.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatcar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcar_cod_tcar char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcar_des_tcar char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tcar_cod_tcar) constraint informix.pk_bcatcar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatcar from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcasexo row size = 21 number of columns = 2 index size =
6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcase00135.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcasexo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sexo_cod_sexo char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sexo_des_sexo char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (sexo_cod_sexo) constraint informix.pk_bcasexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcasexo from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaeciv row size = 23 number of columns = 3 index size =
6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaec00136.unl number of rows = 6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaeciv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eciv_cod_eciv char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eciv_des_eciv char(18) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eciv_eda_eciv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (eciv_cod_eciv) constraint informix.pk_bcaeciv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaeciv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatact row size = 24 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcata00137.unl number of rows = 56 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatact ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tact_cod_tact serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tact_des_tact char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tact_cod_tact) constraint informix.pk_bcatact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatact from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcating row size = 24 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcati00138.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcating ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ting_cod_ting serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ting_des_ting char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ting_cod_ting) constraint informix.pk_bcating')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcating from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaunid row size = 24 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaun00139.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaunid ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unid_cod_unid serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unid_des_unid char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (unid_cod_unid) constraint informix.pk_bcaunid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaunid from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcautel row size = 24 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaut00140.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcautel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('utel_cod_utel serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('utel_des_utel char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (utel_cod_utel) constraint informix.pk_bcautel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcautel from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcattel row size = 14 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatt00141.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcattel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttel_cod_ttel serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttel_des_ttel char(10) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ttel_cod_ttel) constraint informix.pk_bcattel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcattel from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatide row size = 27 number of columns = 4 index size =
6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcati00142.unl number of rows = 8 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tide_cod_tide char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tide_des_tide char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tide_sri_tide integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tide_ban_tide smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tide_cod_tide) constraint informix.pk_bcatide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatide from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaintr row size = 55 number of columns = 3 index size =
6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcain00143.unl number of rows = 6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaintr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('intr_cod_intr char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('intr_des_intr char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('intr_eda_intr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (intr_cod_intr) constraint informix.pk_bcaintr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaintr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatofi row size = 21 number of columns = 2 index size =
6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcato00144.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatofi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tofi_cod_tofi char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tofi_des_tofi char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tofi_cod_tofi) constraint informix.pk_bcatofi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatofi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaocu1 row size = 170 number of columns = 5 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaoc00145.unl number of rows = 45 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaocu1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu1_cod_ocu1 integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu1_des_ocu1 char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu1_sib_ocu1 char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu1_ban_ocu1 smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu1_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ocu1_cod_ocu1) constraint informix.pk_bcaocu1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaocu1 from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcafcdi row size = 216 number of columns = 4 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcafc00146.unl number of rows = 8191 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcafcdi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fcdi_cod_fcdi serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fcdi_fec_fcdi datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fcdi_cod_comp integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fcdi_des_fcdi char(200) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (fcdi_cod_fcdi) constraint informix.pk_bcafcdi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcafcdi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatman row size = 24 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatm00147.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatman ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tman_cod_tman integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tman_des_tman char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tman_cod_tman) constraint informix.pk_bcatman')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatman from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatben row size = 24 number of columns = 2 index size =
34 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatb00148.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatben ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tben_cod_tben serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tben_des_tben char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (tben_des_tben) constraint informix.uc_bcatben')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tben_cod_tben) constraint informix.pk_bcatben')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatben from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatcfa row size = 24 number of columns = 2 index size =
34 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatc00149.unl number of rows = 10 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatcfa ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcfa_cod_tcfa serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcfa_des_tcfa char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (tcfa_des_tcfa) constraint informix.uc_bcatcfa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tcfa_cod_tcfa) constraint informix.pk_bcatcfa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatcfa from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatprm row size = 32 number of columns = 2 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatp00150.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatprm ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tprm_cod_tprm smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tprm_des_tprm char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tprm_cod_tprm) constraint informix.pk_bcatprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatprm from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcabbdd row size = 44 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcabb00151.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcabbdd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bbdd_cod_bbdd serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bbdd_des_bbdd char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (bbdd_cod_bbdd) constraint informix.pk_bcabbdd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcabbdd from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatcue row size = 21 number of columns = 2 index size =
6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatc00152.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatcue ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcue_cod_tcue char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcue_des_tcue char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (tcue_cod_tcue IN (''A'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tcue_cod_tcue) constraint informix.pk_bcatcue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatcue from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcanatu row size = 21 number of columns = 2 index size =
6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcana00153.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcanatu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('natu_cod_natu char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('natu_des_natu char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (natu_cod_natu IN (''A'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (natu_cod_natu) constraint informix.pk_bcanatu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcanatu from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatdoc row size = 40 number of columns = 5 index size =
43 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatd00154.unl number of rows = 47 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatdoc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdoc_cod_tdoc char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdoc_des_tdoc char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdoc_num_tdoc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdoc_tip_tdoc smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0 not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdoc_sec_tdoc char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (tdoc_des_tdoc) constraint informix.uc_bcatdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tdoc_cod_tdoc) constraint informix.pk_bcatdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatdoc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcamone row size = 47 number of columns = 4 index size =
67 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcamo00155.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcamone ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mone_cod_mone serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mone_des_mone char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mone_plu_mone char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mone_simbolo char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (mone_simbolo) constraint informix.uc_bcamone1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (mone_des_mone) constraint informix.uc_bcamone2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (mone_plu_mone) constraint informix.uc_bcamone3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (mone_cod_mone) constraint informix.pk_bcamone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcamone from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaedpf row size = 34 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaed00156.unl number of rows = 8 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaedpf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('edpf_cod_edpf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('edpf_des_edpf char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (edpf_cod_edpf IN (1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (edpf_cod_edpf) constraint informix.pk_bcaepfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaedpf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaimpu row size = 53 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaim00157.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaimpu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impu_cod_impu serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impu_des_impu char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impu_por_impu decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impu_val_impu decimal(8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (impu_cod_impu) constraint informix.pk_bcaimpu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaimpu from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcamese row size = 15 number of columns = 2 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcame00158.unl number of rows = 14 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcamese ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mese_cod_mese smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mese_des_mese char(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check ((mese_cod_mese >= 0 ) AND (mese_cod_mese <= 13 ) ) constraint
informix.ckt_meses')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (mese_cod_mese) constraint informix.pk_bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcamese from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaediv row size = 24 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaed00159.unl number of rows = 7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ediv_cod_ediv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ediv_des_ediv char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (ediv_cod_ediv IN (1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ediv_cod_ediv) constraint informix.pk_bcaediv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaediv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapasd row size = 22 number of columns = 2 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapa00160.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapasd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pasd_cod_pasd char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pasd_des_pasd char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (pasd_cod_pasd IN (''NA'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pasd_cod_pasd) constraint informix.pk_bcapasd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapasd from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatese row size = 22 number of columns = 2 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcate00161.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatese ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tese_cod_tese char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tese_des_tese char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (tese_cod_tese IN (''NA'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tese_cod_tese) constraint informix.pk_bcatese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatese from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaccre row size = 94 number of columns = 13 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacc00162.unl number of rows = 8 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaccre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_cod_ccre integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_des_ccre char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_sib_ccre integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_cod_siba char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_nor_ccon char(6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_ven_ccon char(6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_rie_ccon char(6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_rel_ccon char(6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_rve_ccon char(6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_rri_ccon char(6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_cca_ccre char(4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_ban_acti integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_cod_tide char(20) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ccre_cod_ccre) constraint informix.pk_bcaccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaccre from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatcre row size = 27 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatc00163.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatcre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcre_cod_tcre integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcre_des_tcre char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcre_sib_tcre char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (tcre_cod_tcre IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tcre_cod_tcre) constraint informix.pk_bcatcre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatcre from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatamo row size = 32 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcata00164.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatamo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tamo_cod_tamo integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tamo_des_tamo char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tamo_est_tamo integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tamo_dia_tamo integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (tamo_cod_tamo IN (1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tamo_cod_tamo) constraint informix.pk_bcatamo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatamo from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatgar row size = 68 number of columns = 5 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatg00165.unl number of rows = 13 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatgar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgar_cod_tgar integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgar_des_tgar char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgar_sib_tgar char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgar_por_prov decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgar_est_tgar smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tgar_cod_tgar) constraint informix.pk_bcatgar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatgar from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaintv row size = 31 number of columns = 5 index size =
6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcain00166.unl number of rows = 14 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaintv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('intv_cod_intv char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('intv_des_intv char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('intv_num_dias integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('intv_cod_siba char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('intv_est_intv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (intv_cod_intv) constraint informix.pk_bcaintv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaintv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacgti row size = 27 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacg00167.unl number of rows = 6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacgti ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cgti_cod_cgti integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cgti_des_cgti char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cgti_cod_siba char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cgti_cod_cgti) constraint informix.pk_bcacgti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacgti from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatvin row size = 411 number of columns = 4 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatv00168.unl number of rows = 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatvin ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tvin_cod_tvin integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tvin_des_tvin char(400)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tvin_sib_tvin char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tvin_est_tvin integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tvin_cod_tvin) constraint informix.pk_bcatvin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatvin from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaecre row size = 34 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaec00169.unl number of rows = 6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaecre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ecre_cod_ecre integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ecre_des_ecre char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ecre_cod_ecre) constraint informix.pk_bcaecre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaecre from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadepe row size = 118 number of columns = 6 index size
= 44 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcade00170.unl number of rows = 39 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadepe ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depe_cod_depe serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depe_nom_depe char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depe_cod_ciud integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depe_dir_depe char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depe_telefono char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depe_coordina char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (depe_nom_depe) constraint informix.uc_bcadepe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (depe_cod_depe) constraint informix.pk_bcadepe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadepe from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcattpf row size = 24 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatt00171.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcattpf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttpf_cod_ttpf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttpf_des_ttpf char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ttpf_cod_ttpf) constraint informix.pk_bcattpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcattpf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatfpg row size = 36 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatf00172.unl number of rows = 12 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatfpg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tfpg_cod_tfpg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tfpg_des_tfpg char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tfpg_cod_sri char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tfpg_cod_tfpg) constraint informix.pk_bcatfpg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatfpg from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcafcin row size = 44 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcafc00173.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcafcin ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fcin_cod_fcin serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fcin_des_fcin char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (fcin_cod_fcin) constraint informix.pk_bcafcin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcafcin from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatcap row size = 46 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatc00174.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatcap ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcap_cod_tcap serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcap_des_tcap char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcap_cod_siba char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tcap_cod_tcap) constraint informix.pk_bcatcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatcap from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatlib row size = 25 number of columns = 3 index size =
6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatl00175.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatlib ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlib_cod_tlib char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlib_des_tlib char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlib_anc_tlib integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tlib_cod_tlib) constraint informix.pk_bcatlib')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatlib from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapicn row size = 57 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapi00176.unl number of rows = 8 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapicn ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('picn_cod_picn integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('picn_des_picn char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('picn_val_picn decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('picn_cod_tpic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (picn_cod_picn) constraint informix.pk_bcapicn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapicn from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatfir row size = 60 number of columns = 5 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatf00177.unl number of rows = 7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatfir ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tfir_cod_tfir integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tfir_des_tfir char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tfir_sib_tfir char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tfir_ban_tfir smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tfir_num_firm smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (tfir_ban_tfir IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tfir_cod_tfir) constraint informix.pk_bcatfir')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatfir from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatanx row size = 34 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcata00178.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatanx ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tanx_cod_tanx integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tanx_des_tanx char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tanx_cod_tanx) constraint informix.pk_bcatanx')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatanx from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaeacd row size = 26 number of columns = 4 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaea00179.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaeacd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eacd_cod_eacd smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eacd_des_eacd char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eacd_sib_eacd char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eacd_ban_eacd smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (eacd_ban_eacd IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (eacd_cod_eacd) constraint informix.pk_bcaeacd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaeacd from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaitrv row size = 28 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcait00180.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaitrv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('itrv_cod_itrv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('itrv_des_itrv char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('itrv_num_mess integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (itrv_cod_itrv) constraint informix.pk_bcaitrv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaitrv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapago row size = 267 number of columns = 4 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapa00181.unl number of rows = 33281 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapago ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pago_cod_pago serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pago_obs_pago char(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pago_ctr_pago integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pago_fec_anul date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pago_cod_pago) constraint informix.pk_bcapago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapago from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatfor row size = 44 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatf00182.unl number of rows = 7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatfor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tfor_cod_tfor serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tfor_des_tfor char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tfor_cod_tfor) constraint informix.pk_bcatfor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatfor from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapaco row size = 104 number of columns = 2 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapa00183.unl number of rows = 43 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapaco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('paco_cod_paco integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('paco_des_paco char(100) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (paco_cod_paco) constraint informix.pk_bcapaco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapaco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatcba row size = 30 number of columns = 4 index size =
6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatc00184.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatcba ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcba_cod_tcba char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcba_des_tcba char(25) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcba_sib_tcba char(2) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''10''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcba_bce_codi char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tcba_cod_tcba) constraint informix.pk_bcatcba')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatcba from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaecba row size = 24 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaec00185.unl number of rows = 11 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaecba ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ecba_cod_ecba integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ecba_des_ecba char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ecba_cod_ecba) constraint informix.pk_bcaecta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaecba from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcamdep row size = 52 number of columns = 2 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcamd00186.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcamdep ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mdep_cod_mdep smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mdep_des_mdep char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (mdep_cod_mdep) constraint informix.pk_bcamdep')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcamdep from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatico row size = 52 number of columns = 2 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcati00187.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatico ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tico_cod_tico smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tico_des_tico char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tico_cod_tico) constraint informix.pk_bcatico')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatico from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatdep row size = 52 number of columns = 2 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatd00188.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatdep ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdep_cod_tdep smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdep_des_tdep char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tdep_cod_tdep) constraint informix.pk_bcatdep')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatdep from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcabech row size = 177 number of columns = 4 index size
= 19 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcabe00189.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcabech ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bech_cod_bech varchar(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bech_nom_bech varchar(100) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bech_dir_bech varchar(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bech_tel_bech varchar(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (bech_cod_bech) constraint informix.pk_bcabech')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcabech from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaimpc row size = 59 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaim00190.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaimpc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impc_cod_impc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impc_det_impc varchar(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impc_fech_ing date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (impc_cod_impc) constraint informix.pk_bcaimpc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaimpc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatdtc row size = 48 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatd00191.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatdtc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdtc_cod_tdtc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdtc_des_tdtc varchar(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdtc_sib_tdtc char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tdtc_cod_tdtc) constraint informix.pk_bcatdtc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatdtc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatdpd row size = 35 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatd00192.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatdpd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdpd_cod_tdpd serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdpd_des_tdpd char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdpd_sib_tdpd char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tdpd_cod_tdpd) constraint informix.pk_bcatdpd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatdpd from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatsob row size = 25 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcats00193.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatsob ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsob_cod_tsob integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsob_des_tsob varchar(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tsob_cod_tsob) constraint informix.pk_tipo_sobregiro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatsob from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatmba row size = 25 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatm00194.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatmba ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tmba_cod_tmba integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tmba_des_tmba varchar(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tmba_cod_tmba) constraint informix.pk_tipo_movimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatmba from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatcli row size = 126 number of columns = 6 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatc00195.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatcli ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcli_cod_tcli integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcli_des_tcli char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcli_cod_siba char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcli_cod_tide char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcli_cod_modu char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcli_cod_tcdv char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tcli_cod_tcli) constraint informix.pk_bcatcli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatcli from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcamlbr row size = 64 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaml00196.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcamlbr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mlbr_cod_mlbr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mlbr_des_mlibr char(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (mlbr_cod_mlbr) constraint informix.pk_bcamlbr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcamlbr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapott row size = 353 number of columns = 9 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapo00197.unl number of rows = 47 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapott ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pott_cod_pott serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pott_tipo_trans integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pott_descrip varchar(80) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pott_det_dine integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pott_est_pott integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pott_usu_perm char(250)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pott_ban_cont smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pott_ban_bizb smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pott_ban_giro smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (pott_tipo_trans IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pott_cod_pott) constraint informix.pk_bcapott')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapott from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcalcre row size = 135 number of columns = 11 index size
= 18 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcalc00198.unl number of rows = 20 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcalcre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcre_cod_lcred serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcre_desc_lcred varchar(80) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcre_est_lcre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcre_cod_ccre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcre_inic_tasc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcre_fin_tasc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcre_tas_lcre decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcre_pri_cobr smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcre_por_enca decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcre_ban_ingr smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcre_sib_lcre char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (lcre_ban_ingr IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (lcre_cod_lcred) constraint informix.pk_bcalcre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcalcre from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaffin row size = 88 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaff00199.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaffin ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ffin_cod_ffin serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ffin_dec_ffin varchar(80) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ffin_sib_ffin char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ffin_cod_ffin) constraint informix.pk_bcaffin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaffin from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcamodu row size = 268 number of columns = 12 index size
= 18 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcamo00200.unl number of rows = 26 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcamodu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('modu_cod_modu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('modu_cod_grup integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('modu_des_modu char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('modu_ban_inst smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('modu_cla_modu char(22)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('modu_cla_inst char(22)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('modu_num_ctri integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('modu_num_lice integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('modu_cla_ctri char(22)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('modu_cla_lice char(22)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('modu_ico_modu varchar(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('modu_exe_modu varchar(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (modu_cod_modu) constraint informix.pk_bcamodu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcamodu from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaprms row size = 263 number of columns = 3 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapr00201.unl number of rows = 246 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaprms ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prms_cod_prms serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prms_cod_modu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prms_des_prms char(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (prms_cod_prms) constraint informix.pk_bcaprms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaprms from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaopci row size = 146 number of columns = 8 index size
= 27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaop00202.unl number of rows = 485 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaopci ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opci_cod_opci serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opci_cod_modu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opci_cod_menu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opci_nom_opci char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opci_nom_clas char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opci_microhelp char(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opci_ban_opci smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opci_ord_opci smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (opci_cod_opci) constraint informix.pk_bcaopci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaopci from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcavprm row size = 706 number of columns = 4 index size
= 16 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcavp00203.unl number of rows = 245 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcavprm ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vprm_cod_prms integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vprm_cod_tprm smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vprm_val_vprm char(600)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vprm_asu_vprm char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (vprm_cod_prms) constraint informix.pk_bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcavprm from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaciud row size = 52 number of columns = 4 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaci00204.unl number of rows = 218 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaciud ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciud_cod_ciud serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciud_cod_prov integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciud_nom_ciud char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciud_sib_ciud integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ciud_cod_ciud) constraint informix.pk_bcaciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaciud from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcasect row size = 96 number of columns = 5 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcase00205.unl number of rows = 1323 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcasect ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sect_cod_sect serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sect_cod_ciud integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sect_cod_tsec integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sect_des_sect char(80)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sect_sib_sect integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (sect_cod_sect) constraint informix.pk_sector_ciudad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcasect from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadepa row size = 53 number of columns = 5 index size =
43 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcade00206.unl number of rows = 7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadepa ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depa_cod_depa serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depa_des_depa char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depa_cod_dsup integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depa_cod_ndep char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depa_abr_depa char(5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (depa_des_depa) constraint informix.uc_bcadepa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (depa_cod_depa) constraint informix.pk_bcadepa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadepa from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaclna row size = 61 number of columns = 9 index size =
45 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacl00207.unl number of rows = 4643 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaclna ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_clna serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_eciv char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_sexo char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_intr char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_sect integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_dir_trab char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_jef_hoga smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_fec_ingr date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (clna_cod_clie) constraint informix.uc_bcaclna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (clna_cod_clna) constraint informix.pk_bcaclna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaclna from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcabanc row size = 143 number of columns = 15 index size
= 36 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaba00208.unl number of rows = 72 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcabanc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_cod_banc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_nom_repr char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_liq_banc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_rie_banc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_ren_banc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_cal_banc char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_cod_temi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_pat_banc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_cap_banc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_cod_crie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_fec_banc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_cod_bce char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_sri_form char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_bce_ncta char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (banc_cod_banc) constraint informix.pk_bcabanc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcabanc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadpvi row size = 263 number of columns = 31 index size
= 70 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadp00209.unl number of rows = 9380 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_dpvi serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_tcdv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_tfir integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_num_firm integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_eacd smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_num_dpvi char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_ofi_cier integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_cier date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_upgi date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_sal_disp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_sal_cont decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cla_cdav char(22)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_umcd date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_aho_mini decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_udev date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_uina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_acti date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_venc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_dia_plaz integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_tas_dpvi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_dia_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_dpv_debi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_usu_inac integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_intv char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_ccdv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_sect integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_nom_dpvi char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_ban_prin smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dpvi_cod_dpvi) constraint informix.pk_bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadpvi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacred row size = 572 number of columns = 72 index size
= 200 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacr00210.unl number of rows = 1997 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_soli char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_paga char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_tip_ccon char(15) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cap_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_tas_cred decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_venc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_intv char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_dtcr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_reli integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_tese char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_por_segd decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_tcse char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_tcre integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_tamo integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ccre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_tvin integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_tgar integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_orec integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ffin integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_lcre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_pago date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_comp integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_iden smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_tcta integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_iope integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_eope integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_orig integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_sect integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_socr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_val_extr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_extr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cap_soli decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_por_mora decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cap_prov decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_por_prov decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_prov date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_mod_fech smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_ban_role smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_dcre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_dia_calc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ocup char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_ban_mfec smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_ppag date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_tas_tea decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_tas_tir decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_tope integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cuot integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_calf char(3) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''A-1''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_cast date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_val_cast decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_ban_pror integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_con_mora smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_deve date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_adqu date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default today')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_val_desc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_nom_titu char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_ide_titu char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_nom_covt char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_ide_covt char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_nct_grac integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_nct_repr integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_repr date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default today')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_ban_afin smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_pror integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (cred_ban_afin IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (cred_num_pror <= cred_num_cuot ) constraint
informix.ckt_num_bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cred_num_cred) constraint informix.pk_bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacred from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcagtia row size = 324 number of columns = 8 index size
= 36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcagt00211.unl number of rows = 267 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcagtia ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtia_num_gtia serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtia_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtia_cod_cgti integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtia_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtia_des_bien char(120) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtia_obs_gtia char(180)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtia_fec_ingr date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default today')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtia_cod_usua integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gtia_num_gtia) constraint informix.pk_bcagtia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcagtia from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacaja row size = 67 number of columns = 9 index size =
15 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaca00212.unl number of rows = 28 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacaja ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('caja_cod_caja char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('caja_des_caja char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('caja_cod_tcar char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('caja_ubicaci char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('caja_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('caja_val_efec decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('caja_imp_term char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('caja_fec_uinc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('caja_fec_cier date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacaja from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapape row size = 62 number of columns = 12 index size
= 53 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapa00213.unl number of rows = 708985 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapape ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_pape serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_fec_pape datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_divc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_ediv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_tran integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_num_tran char(15) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_tdoc char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_num_comp integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_pap_ante integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_auxi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pape_cod_pape) constraint informix.pk_bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapape from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacont row size = 57 number of columns = 5 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaco00214.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacont ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cont_cod_cont serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cont_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cont_des_cont char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cont_cta_ingr char(15) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cont_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (cont_cta_ingr IN (''4'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cont_cod_cont) constraint informix.pk_bcacont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacont from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacomp row size = 416 number of columns = 17 index size
= 44 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaco00215.unl number of rows = 70866 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacomp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_cod_comp serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_cod_peri integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_cod_tdoc char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_num_comp integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_fec_comp date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_beneficia varchar(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_num_docu char(8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_detalle varchar(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_mayori char(1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''0'' not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_transmi char(1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''0'' not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_anulado char(1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''0'' not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_fec_serv date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_usu_anul integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_fec_anul date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_val_comp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (comp_anulado IN (''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (comp_cod_comp) constraint informix.pk_bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacomp from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaccom row size = 321 number of columns = 10 index size
= 33 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacc00216.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaccom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccom_cod_ccom serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccom_cod_mese smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccom_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccom_cod_tdoc char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccom_num_ccom integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccom_fec_ccom date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccom_ben_ccom char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccom_det_ccom char(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccom_mayori char(1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''0'' not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccom_cod_ejer integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (ccom_mayori IN (''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ccom_cod_ccom) constraint informix.pk_bcaccom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaccom from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadeef row size = 35 number of columns = 9 index size =
42 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcade00217.unl number of rows = 139843 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadeef ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deef_cod_deef serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deef_cod_modu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deef_cod_movi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deef_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deef_cod_caja char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deef_fec_deef datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deef_cod_tasi char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deef_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deef_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (deef_cod_deef) constraint informix.pk_bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadeef from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaottr row size = 128 number of columns = 11 index size
= 13 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaot00218.unl number of rows = 8203 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaottr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ottr_cod_pape integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ottr_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ottr_detalle varchar(80)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ottr_fecha date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ottr_cod_caja char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ottr_est_ottr smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ottr_num_ottr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ottr_num_ctas char(15) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ottr_ban_giro smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ottr_cod_banc integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ottr_cod_tcba char(1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''A''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (ottr_ban_giro IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ottr_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaottr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapgpf row size = 41 number of columns = 9 index size =
58 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapg00219.unl number of rows = 4275 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapgpf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_pgpf serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_dpfi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_num_pgpf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_rubr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_fec_fina date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_val_pgpf decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_edpf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (pgpf_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (pgpf_cod_edpf IN (1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pgpf_cod_pgpf) constraint informix.pk_bcapgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapgpf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaejer row size = 12 number of columns = 3 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaej00220.unl number of rows = 6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaejer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ejer_cod_ejer serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ejer_cod_cont integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ejer_ani_ejer integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (ejer_cod_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (ejer_ani_ejer >= 1990 ) constraint informix.ck_bcaejer3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ejer_cod_ejer) constraint informix.pk_bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaejer from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapcom row size = 395 number of columns = 5 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapc00221.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pcom_cod_pcom serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pcom_des_pcom char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pcom_cod_cont integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pcom_beneficia varchar(100) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pcom_detalle varchar(255) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pcom_cod_pcom) constraint informix.pk_bcapcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapcom from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacpre row size = 21 number of columns = 6 index size =
40 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacp00222.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacpre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpre_cod_cpre serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpre_cod_cont integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpre_ani_pres integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpre_ani_refe integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpre_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpre_cie_pres char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (cpre_cod_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cpre_cod_cpre) constraint informix.pk_bcacpre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacpre from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaccon row size = 194 number of columns = 11 index size
= 63 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacc00223.unl number of rows = 11949 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ctas serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon char(15) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_nom_ccon char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_tcue char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_natu char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cla_ccon char(5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_ban_ccon smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_usua integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (ccon_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ccon_cod_ctas) constraint informix.pk_bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaccon from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaperi row size = 11 number of columns = 4 index size =
36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcape00224.unl number of rows = 84 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaperi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_cod_peri serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_cod_ejer integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_mes_peri smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_cie_peri char(1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''0'' not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (peri_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (peri_cie_peri IN (''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (peri_cod_peri) constraint informix.pk_bcapero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaperi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacons row size = 39 number of columns = 4 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaco00225.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacons ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cons_cod_cons serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cons_cod_ejer integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cons_ban_cons char(1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''0'' not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cons_des_cons char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (cons_ban_cons IN (''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cons_cod_cons) constraint informix.pk_bcacons')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacons from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcarubr row size = 59 number of columns = 10 index size
= 40 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaru00226.unl number of rows = 22 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcarubr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rubr_cod_rubr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rubr_des_rubr char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rubr_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rubr_cod_modu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rubr_ban_rubr char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rubr_num_prio integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rubr_ban_afct smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rubr_cta_paga integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rubr_ban_giva smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rubr_cod_iva integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (rubr_cod_rubr) constraint informix.pk_bcarubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcarubr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacomi row size = 66 number of columns = 11 index size
= 35 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaco00227.unl number of rows = 15 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacomi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comi_cod_comi serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comi_des_comi char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comi_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comi_pct_comi decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comi_val_comi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comi_est_comi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comi_cod_lcre integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comi_ban_segu smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comi_ban_firl char(1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''1''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comi_ban_flat smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comi_ban_cert smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (comi_cod_lcre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (comi_cod_comi) constraint informix.pk_bcacomi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacomi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacban row size = 98 number of columns = 15 index size
= 60 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacb00228.unl number of rows = 29 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacban ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_cod_cban serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_cod_banc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_cod_tcba char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_num_cban char(12) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_cod_sell char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_fec_cier date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_fec_aper date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_sal_disp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_sal_cont decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_ofi_cban char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_num_firm integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_cod_ecba integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cban_cod_cban) constraint informix.pk_bcacban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacban from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcabloq row size = 79 number of columns = 7 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcabl00229.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcabloq ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bloq_cod_bloq serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bloq_cod_cban integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bloq_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bloq_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bloq_fec_bloq date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bloq_des_bloq char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bloq_est_bloq integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (bloq_cod_bloq) constraint informix.pk_bloqueos_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcabloq from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaooem row size = 35 number of columns = 3 index size =
8 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaoo00230.unl number of rows = 10 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaooem ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ooem_cod_ooem char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ooem_des_ooem char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ooem_gen_cheq smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ooem_cod_ooem) constraint informix.pk_bcaooem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaooem from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatrcj row size = 89 number of columns = 9 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatr00231.unl number of rows = 52 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatrcj ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trcj_cod_trcj serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trcj_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trcj_desc_trcj varchar(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trcj_tipo_trcj integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trcj_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trcj_cod_tasi char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trcj_ban_dbso smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trcj_est_trcj smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trcj_gen_iva smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (trcj_cod_trcj) constraint informix.pk_bcatrcj')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatrcj from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcafxtc row size = 20 number of columns = 5 index size =
40 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcafx00232.unl number of rows = 24 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcafxtc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fxtc_lad_fxtc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fxtc_cod_fxtc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fxtc_cod_tcdv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fxtc_num_pagi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fxtc_cod_flib integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (fxtc_cod_fxtc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (fxtc_cod_fxtc) constraint informix.pk_formato_de_libr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcafxtc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcachra row size = 148 number of columns = 7 index size
= 27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcach00233.unl number of rows = 17 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcachra ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chra_cod_chra serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chra_cod_cban integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chra_cod_ecba integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chra_num_chra char(12) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chra_num_chqi char(12) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chra_num_chqf char(12) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chra_cod_empl char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (chra_cod_chra) constraint informix.pk_bcachra')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcachra from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcamban row size = 311 number of columns = 14 index size
= 42 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcamb00234.unl number of rows = 27252 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcamban ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_cod_mban serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_cod_cban integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_fec_mban date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_cod_tasi char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_cod_tmba integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_ben_mban char(100) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_det_mban char(150) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_con_mban integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_val_mban decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_num_pape char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_cod_ofic integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_cod_usua integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_fec_serv date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default today')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (mban_cod_mban) constraint informix.pk_bcamban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcamban from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapres row size = 279 number of columns = 4 index size
= 42 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapr00235.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapres ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pres_cod_pres serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pres_cod_cpre integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pres_cod_ccon char(15) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pres_obs_pres varchar(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (pres_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pres_cod_pres) constraint informix.pk_bcapres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapres from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadchv row size = 106 number of columns = 18 index size
= 85 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadc00236.unl number of rows = 1285 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadchv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_cod_dchv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_cod_modu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_cod_mcdv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_cod_depg integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_cod_banc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_num_ctab char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_num_dchv char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_ban_efec smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_fec_esan date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_fec_esac date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_est_ante integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_est_actu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_cod_fcdi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_cod_tfpg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_cod_dmba integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_cod_inic char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_doc_efec integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (dchv_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dchv_cod_dchv) constraint informix.pk_bcadchv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadchv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcamcdv row size = 370 number of columns = 16 index size
= 58 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcamc00237.unl number of rows = 266803 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_mcdv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_num_mcdv char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_caja char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_fec_mcdv date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_ctr_impr smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_det_mcdv char(300)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_val_mcdv decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_ban_deta smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_num_cheq integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_tran integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_orec integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_tndd integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_ban_iva integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (mcdv_cod_mcdv) constraint informix.pk_bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcamcdv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcalibr row size = 49 number of columns = 10 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcali00238.unl number of rows = 9380 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcalibr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('libr_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('libr_cod_fxtc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('libr_num_libr char(8) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('libr_lad_libr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('libr_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('libr_num_pagi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('libr_num_pag2 integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('libr_num_line integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('libr_sal_libr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('libr_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (libr_cod_dpvi) constraint informix.pk_bcalibr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcalibr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadivc row size = 111 number of columns = 16 index size
= 40 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadi00239.unl number of rows = 61900 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadivc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cod_divc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_num_divc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_num_cred integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cod_ediv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_fec_venc date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cap_divc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cap_pago decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_tas_divc decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_int_plaz decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_int_deve decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_fec_pago date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cod_ccon varchar(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_fec_auxi date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cap_proy decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_int_paga decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_int_proy decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (divc_cod_ediv IN (1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (divc_cod_divc) constraint informix.pk_bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadivc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatafo row size = 22 number of columns = 3 index size =
12 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcata00240.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatafo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tafo_cod_tafo char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tafo_cod_tasi char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tafo_des_tafo char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tafo_cod_tafo) constraint informix.pk_bcatafo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatafo from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacamb row size = 19 number of columns = 4 index size =
36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaca00241.unl number of rows = 12 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacamb ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('camb_cod_camb serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('camb_cod_tdin integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('camb_val_camb decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('camb_val_seri smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (camb_cod_tdin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (camb_cod_camb) constraint informix.pk_bcacamb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacamb from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaocu2 row size = 204 number of columns = 6 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaoc00242.unl number of rows = 155 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaocu2 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu2_cod_ocu2 integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu2_cod_ocu1 integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu2_des_ocu2 char(180) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu2_ban_ocu2 smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu2_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu2_sib_ocu2 char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ocu2_cod_ocu2) constraint informix.pk_bcaocu2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaocu2 from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaocup row size = 261 number of columns = 12 index size
= 27 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaoc00243.unl number of rows = 3639 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaocup ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocup_cod_ocup integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocup_cod_ocu2 integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocup_des_ocup char(180) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocup_ciu_codi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocup_sib_ocup char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocup_ban_ocup smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocup_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocup_rec_ocup integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocup_cod_modu char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocup_cod_segm char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocup_cod_ccre char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocup_rie_ambt char(2) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (ocup_rie_ambt IN (''M'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ocup_cod_ocup) constraint informix.pk_bcaocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaocup from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatran row size = 63 number of columns = 5 index size =
17 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatr00244.unl number of rows = 85 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tran_cod_tran serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tran_des_tran varchar(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tran_cod_tdoc char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tran_num_secu integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0 not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tran_ban_tran char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (tran_ban_tran IN (''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tran_cod_tran) constraint informix.pk_bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatran from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadepg row size = 35 number of columns = 8 index size =
36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcade00245.unl number of rows = 4776 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadepg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depg_cod_depg serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depg_cod_pgpf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depg_cod_tfpg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depg_cod_tran integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depg_val_depg decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depg_cod_caja char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depg_fec_pago date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depg_ban_depg integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (depg_cod_tfpg IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (depg_cod_depg) constraint informix.pk_bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadepg from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaoptr row size = 12 number of columns = 3 index size =
40 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaop00246.unl number of rows = 31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaoptr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('optr_cod_optr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('optr_cod_opci integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('optr_cod_tran integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (optr_cod_opci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (optr_cod_optr) constraint informix.pk_bcaoptr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaoptr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaplaz row size = 20 number of columns = 5 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapl00247.unl number of rows = 13 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaplaz ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plaz_cod_plaz serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plaz_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plaz_ini_plaz integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plaz_fin_plaz integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plaz_cod_modu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (plaz_cod_plaz) constraint informix.pk_bcaplaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaplaz from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcamont row size = 30 number of columns = 5 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcamo00248.unl number of rows = 24 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcamont ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mont_cod_mont serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mont_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mont_ini_mont decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mont_fin_mont decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mont_cod_modu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (mont_cod_mont) constraint informix.pk_bcamont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcamont from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaccco row size = 64 number of columns = 5 index size =
24 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacc00249.unl number of rows = 1103 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaccco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_ctas serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_ccon char(15) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_nom_ccon char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_tcue char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_mone integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ccco_cod_ctas) constraint informix.pk_bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaccco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcafpsd row size = 24 number of columns = 3 index size =
14 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcafp00250.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcafpsd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fpsd_cod_fpsd char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fpsd_des_fpsd char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fpsd_cod_pasd char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (fpsd_cod_fpsd) constraint informix.pk_bcafpsd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcafpsd from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatcse row size = 36 number of columns = 4 index size =
14 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatc00251.unl number of rows = 7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatcse ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcse_cod_tcse char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcse_des_tcse char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcse_cod_fpsd char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcse_est_tcse smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tcse_cod_tcse) constraint informix.pk_bcatcse')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatcse from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcafppf row size = 38 number of columns = 3 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcafp00252.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcafppf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fppf_cod_fppf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fppf_cod_ttpf integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fppf_des_fppf char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check ((fppf_cod_ttpf IS NULL ) OR (fppf_cod_ttpf IN (1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (fppf_cod_fppf) constraint informix.pk_bcafppf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcafppf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaflib row size = 75 number of columns = 13 index size
= 15 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcafl00253.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaflib ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('flib_cod_flib serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('flib_cod_tlib char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('flib_des_flib char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('flib_num_line integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('flib_num_lcab integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('flib_num_lme1 integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('flib_num_lme2 integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('flib_cam_fech integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('flib_cam_depo integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('flib_cam_reti integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('flib_cam_sald integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('flib_cam_docu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('flib_tam_letr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (flib_cod_flib) constraint informix.pk_bcaflib')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaflib from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadpln row size = 47 number of columns = 11 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadp00254.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadpln ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpln_cod_dpln serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpln_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpln_cod_itrv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpln_fec_venc date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpln_plz_dpln integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpln_tas_dpln decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpln_val_depo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpln_rec_inte smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpln_ind_infl decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpln_fec_inac date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpln_fec_canc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dpln_cod_dpln) constraint informix.pk_bcadpln')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadpln from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadtcr row size = 103 number of columns = 6 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadt00255.unl number of rows = 24 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadtcr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtcr_cod_dtcr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtcr_des_dtcr char(70)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtcr_sib_dtcr char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtcr_cod_tdtc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtcr_ban_dtcr smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtcr_cod_ccre char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dtcr_cod_dtcr) constraint informix.pk_bcadtcr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadtcr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaaper row size = 8 number of columns = 3 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaap00256.unl number of rows = 4828 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaaper ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('aper_cod_perf char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('aper_cod_opci integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('aper_ctr_opci smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (aper_cod_perf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaaper from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaausu row size = 10 number of columns = 3 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaau00257.unl number of rows = 10407 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaausu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ausu_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ausu_cod_opci integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ausu_ctr_opci smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ausu_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaausu from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaimpr row size = 90 number of columns = 5 index size =
43 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaim00258.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaimpr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impr_cod_impr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impr_des_impr char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impr_cod_opci integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impr_ubi_impr char(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impr_swi_impr smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (impr_des_impr) constraint informix.uc_bcaimpr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (impr_cod_impr) constraint informix.pk_bcaimpr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaimpr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaacli row size = 12 number of columns = 3 index size =
40 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaac00259.unl number of rows = 755 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaacli ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acli_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acli_cod_ocup integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acli_cod_tact integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (acli_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaacli from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatene row size = 24 number of columns = 7 index size =
36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcate00260.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatene ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tene_cod_tene serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tene_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tene_cod_sect integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tene_are_terr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tene_cod_unid integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tene_rie_terr smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tene_leg_terr smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tene_cod_tene) constraint informix.pk_bcatene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatene from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatele row size = 28 number of columns = 6 index size =
36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcate00261.unl number of rows = 4399 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatele ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tele_cod_tele serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tele_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tele_cod_ttel integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tele_cod_utel integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tele_num_tele char(10) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tele_ban_prin smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tele_cod_tele) constraint informix.pk_bcatele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatele from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadecl row size = 8 number of columns = 2 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcade00262.unl number of rows = 1213 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadecl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decl_cod_depe integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decl_cod_clna integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (decl_cod_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadecl from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadtra row size = 15 number of columns = 5 index size =
48 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadt00263.unl number of rows = 16382 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadtra ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtra_cod_dtra serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtra_cod_fcdi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtra_cod_caja char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtra_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtra_cod_tafo char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (dtra_cod_fcdi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dtra_cod_dtra) constraint informix.pk_bcadtra')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadtra from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadfcd row size = 21 number of columns = 4 index size =
40 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadf00264.unl number of rows = 8866 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadfcd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcd_cod_dfcd serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcd_cod_fcdi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcd_cod_tfpg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcd_val_dfcd decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dfcd_cod_dfcd) constraint informix.pk_bcadfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadfcd from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcateof row size = 22 number of columns = 4 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcate00265.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcateof ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teof_cod_teof serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teof_cod_ttel integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teof_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teof_num_tele char(10) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (teof_cod_teof) constraint informix.pk_bcateof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcateof from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacfam row size = 122 number of columns = 8 index size
= 59 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacf00266.unl number of rows = 770 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacfam ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_cod_cfam serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_cod_tcfa integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_ban_cfam smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_nom_cfam char(90)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_cod_tide char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_ide_cfam char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_cod_fami integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (cfam_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cfam_cod_cfam) constraint informix.pk_bcacfam')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacfam from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcabene row size = 40 number of columns = 6 index size =
53 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcabe00267.unl number of rows = 57 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcabene ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bene_cod_bene serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bene_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bene_cod_cben integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bene_cod_tben integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bene_porcent decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bene_condici char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (bene_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check ((bene_porcent >= 1. ) AND (bene_porcent <= 100. ) ) constraint
informix.ckt_bcabene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (bene_cod_bene) constraint informix.pk_bcabene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcabene from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcajorn row size = 59 number of columns = 52 index size
= 24 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcajo00268.unl number of rows = 242 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcajorn ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_cod_jorn serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_cod_dsem char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_cod_caja char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0030 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0100 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0130 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0200 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0230 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0300 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0330 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0400 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0430 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0500 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0530 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0600 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0630 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0700 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0730 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0800 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0830 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0900 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_0930 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1000 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1030 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1100 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1130 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1200 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1230 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1300 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1330 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1400 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1430 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1500 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1530 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1600 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1630 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1700 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1730 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1800 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1830 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1900 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_1930 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_2000 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_2030 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_2100 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_2130 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_2200 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_2230 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_2300 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_2330 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_hm_2400 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (jorn_cod_jorn) constraint informix.pk_bcajorn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcajorn from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacoti row size = 43 number of columns = 6 index size =
35 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaco00269.unl number of rows = 27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacoti ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coti_cod_coti serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coti_fec_coti datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coti_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coti_val_comp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coti_val_vent decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coti_val_inte decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (coti_fec_coti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (coti_cod_coti) constraint informix.pk_bcacoti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacoti from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaimag row size = 200 number of columns = 7 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaim00270.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaimag ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('imag_cod_imag serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('imag_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('imag_fir_imag byte')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('imag_fot_imag byte')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('imag_nom_arch char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('imag_arc_foto char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('imag_arc_cedu char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (imag_cod_clie) constraint informix.uc_bcaimag')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (imag_cod_imag) constraint informix.pk_bcaimag')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaimag from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcajcop row size = 57 number of columns = 51 index size
= 24 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcajc00271.unl number of rows = 14 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcajcop ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_cod_jcop serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_cod_dsem char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0030 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0100 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0130 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0200 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0230 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0300 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0330 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0400 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0430 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0500 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0530 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0600 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0630 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0700 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0730 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0800 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0830 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0900 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_0930 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1000 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1030 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1100 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1130 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1200 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1230 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1300 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1330 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1400 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1430 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1500 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1530 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1600 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1630 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1700 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1730 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1800 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1830 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1900 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_1930 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_2000 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_2030 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_2100 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_2130 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_2200 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_2230 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_2300 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_2330 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_hm_2400 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (jcop_cod_jcop) constraint informix.pk_bcajcop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcajcop from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadefe row size = 16 number of columns = 4 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcade00272.unl number of rows = 180489 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadefe ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('defe_cod_defe serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('defe_cod_deef integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('defe_cod_camb integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('defe_num_defe integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (defe_cod_defe) constraint informix.pk_bcadefe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadefe from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcasact row size = 30 number of columns = 5 index size =
44 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcasa00273.unl number of rows = 30105 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcasact ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_peri integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_sal_debi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_sal_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (sact_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcasact from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapdco row size = 22 number of columns = 5 index size =
33 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapd00274.unl number of rows = 17 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapdco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdco_cod_pdco serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdco_cod_comp integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdco_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdco_cod_tasi char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdco_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (pdco_valor >= 0. ) constraint informix.ckt_detalle_planti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pdco_cod_pdco) constraint informix.pk_bcapdco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapdco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcancue row size = 46 number of columns = 5 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcanc00275.unl number of rows = 36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcancue ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ncue_cod_ncue serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ncue_des_ncue char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ncue_cod_ejer integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ncue_num_digi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ncue_fec_crea date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default today not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check ((ncue_num_digi >= 1 ) AND (ncue_num_digi <= 15 ) ) constraint
informix.ckt_niveles_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ncue_cod_ncue) constraint informix.pk_bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcancue from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaimru row size = 12 number of columns = 3 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaim00276.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaimru ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('imru_cod_imru serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('imru_cod_impu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('imru_cod_rubr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (imru_cod_imru) constraint informix.pk_bcaimru')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaimru from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacrau row size = 12 number of columns = 3 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacr00277.unl number of rows = 2684 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacrau ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crau_cod_dpfi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crau_cod_rubr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crau_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (crau_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacrau from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcarvpf row size = 17 number of columns = 3 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcarv00278.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcarvpf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rvpf_cod_dpfi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rvpf_dpfi_ante integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rvpf_val_incr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (rvpf_cod_dpfi) constraint informix.pk_bcarvpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcarvpf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaanpf row size = 208 number of columns = 3 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaan00279.unl number of rows = 42 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaanpf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anpf_cod_dpfi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anpf_des_anpf char(200) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anpf_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (anpf_cod_dpfi) constraint informix.pk_bcaanpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaanpf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcactip row size = 12 number of columns = 3 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcact00280.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcactip ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctip_cod_impu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctip_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctip_cod_ctaa integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ctip_cod_impu) constraint informix.pk_bcactip')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcactip from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaimpa row size = 14 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaim00281.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaimpa ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impa_cod_impu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impa_val_impa decimal(8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impa_por_impa decimal(8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (impa_cod_impu) constraint informix.pk_bcaimpa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaimpa from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaprpf row size = 29 number of columns = 6 index size =
32 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapr00282.unl number of rows = 190 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaprpf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prpf_cod_pgpf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prpf_fec_prpf datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prpf_cod_tasi char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prpf_val_prpf decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prpf_cod_tdoc char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prpf_num_tdoc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (prpf_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaprpf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadeip row size = 38 number of columns = 6 index size =
52 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcade00283.unl number of rows = 613 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadeip ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deip_cod_pgpf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deip_cod_prms integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deip_cod_tran integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deip_fec_pape datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deip_val_dpii decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deip_val_ipro decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (deip_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.pk_bcadeip')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadeip from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaprdi row size = 16 number of columns = 3 index size =
26 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapr00284.unl number of rows = 36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaprdi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdi_cod_prms integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdi_cod_prdi char(8) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdi_plz_prdi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (prdi_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaprdi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadirb row size = 43 number of columns = 7 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadi00285.unl number of rows = 221094 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadirb ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dirb_cod_divc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dirb_cod_rubc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dirb_val_dirb decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dirb_val_sadi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dirb_val_paga decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dirb_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dirb_fec_dirb date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dirb_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadirb from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapdte row size = 23 number of columns = 5 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapd00286.unl number of rows = 33281 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapdte ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdte_cod_pago integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdte_cod_tfpg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdte_val_pdte decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdte_fec_pago date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdte_cod_caja char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pdte_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapdte from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcagtcr row size = 17 number of columns = 3 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcagt00287.unl number of rows = 250 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcagtcr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtcr_num_cred integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtcr_num_gtia integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtcr_val_gtcr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gtcr_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcagtcr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacocr row size = 30 number of columns = 5 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaco00288.unl number of rows = 2857 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacocr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cocr_num_cred integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cocr_cod_comi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cocr_val_cocr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cocr_impuesto integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cocr_cod_cocr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cocr_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacocr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacrpg row size = 13 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacr00289.unl number of rows = 426 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacrpg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crpg_cod_gara integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crpg_cap_deud decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (crpg_cod_gara) constraint informix.pk_bcacrpg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacrpg from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacpcr row size = 17 number of columns = 3 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacp00290.unl number of rows = 1621 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacpcr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpcr_num_cred integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpcr_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpcr_val_cpcr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cpcr_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacpcr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcagbie row size = 350 number of columns = 20 index size
= 27 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcagb00291.unl number of rows = 48 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcagbie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtia_num_gtia integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_cod_sect integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_dir_bien char(120) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_are_estr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_are_hitr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_ava_catr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_ava_cotr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_are_escn decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_are_hicn decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_ava_cacn decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_ava_cocn decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_nom_peri char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_fec_avca date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_fec_avco date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_fec_cthi date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_nom_nota char(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_num_cthi char(10) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_fec_rgpr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_num_rgpr char(10) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_cod_gtbi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gtia_num_gtia) constraint informix.pk_bcagbie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcagbie from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapose row size = 204 number of columns = 9 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapo00292.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapose ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pose_num_gtia integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pose_nom_aseg char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pose_mon_aseg decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pose_fec_endo date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pose_mon_endo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pose_des_rgcu char(120) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pose_num_poli char(10) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pose_fec_emip date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pose_fec_vtop date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pose_num_gtia) constraint informix.pk_bcapose')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapose from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcagpre row size = 91 number of columns = 6 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcagp00293.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcagpre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gpre_num_gtia integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gpre_cod_sect integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gpre_dir_bien char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gpre_ava_fact decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gpre_nom_peri char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gpre_fec_avfa date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gpre_num_gtia) constraint informix.pk_bcagpre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcagpre from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcagtit row size = 47 number of columns = 8 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcagt00294.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcagtit ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtit_num_gtia integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtit_val_nomi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtit_val_merc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtit_can_gtia decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtit_cod_banc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtit_fec_emis date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtit_fec_venc date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtit_cod_gtti integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gtit_num_gtia) constraint informix.pk_bcagtit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcagtit from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaobcr row size = 299 number of columns = 8 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaob00295.unl number of rows = 1510 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaobcr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obcr_cod_obcr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obcr_num_cred integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obcr_fec_obcr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obcr_obs_obcr varchar(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obcr_ing_obcr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obcr_egr_obcr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obcr_ptr_obcr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obcr_num_trab integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (obcr_cod_obcr) constraint informix.pk_bcaobcr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaobcr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadbau row size = 8 number of columns = 2 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadb00296.unl number of rows = 1992 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadbau ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbau_num_cred integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbau_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dbau_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadbau from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapddb row size = 8 number of columns = 2 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapd00297.unl number of rows = 33151 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapddb ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pddb_cod_pago integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pddb_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pddb_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapddb from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacous row size = 10 number of columns = 4 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaco00298.unl number of rows = 28 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacous ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cous_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cous_cod_cont integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cous_ban_cous char(1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''0'' not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cous_con_acti char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (cous_ban_cous IN (''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (cous_con_acti IN (''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cous_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacous from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatasa row size = 21 number of columns = 6 index size =
40 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcata00299.unl number of rows = 17 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatasa ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasa_cod_tasa serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasa_cod_plaz integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasa_cod_mont integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasa_ini_tasa decimal(4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasa_fin_tasa decimal(4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasa_rng_tasa decimal(4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (tasa_cod_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tasa_cod_tasa) constraint informix.pk_bcatasa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatasa from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatxcp row size = 12 number of columns = 3 index size =
40 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatx00300.unl number of rows = 59 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatxcp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('txcp_cod_txcp serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('txcp_cod_tcdv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('txcp_cod_tran integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (txcp_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (txcp_cod_txcp) constraint informix.pk_bcatxcp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatxcp from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcameac row size = 8 number of columns = 2 index size =
22 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcame00301.unl number of rows = 133 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcameac ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('meac_cod_tcdv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('meac_cod_meac integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (meac_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcameac from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcavpcn row size = 192 number of columns = 11 index size
= 44 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcavp00302.unl number of rows = 2488 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcavpcn ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpcn_cod_picn integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpcn_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpcn_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpcn_valoraux decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpcn_num_vpcn integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpcn_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpcn_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpcn_plz_vpcn integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpcn_de1_vpcn char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpcn_de2_vpcn char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpcn_de3_vpcn char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (vpcn_cod_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcavpcn from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcabpln row size = 52 number of columns = 4 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcabp00303.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcabpln ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bpln_cod_dpln integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bpln_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bpln_por_bpln decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bpln_cnd_bpln char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (bpln_cod_dpln')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcabpln from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatpln row size = 12 number of columns = 3 index size =
22 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatp00304.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatpln ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpln_fec_camb date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpln_cod_dpln integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpln_tas_camb decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tpln_fec_camb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatpln from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaddte row size = 23 number of columns = 5 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadd00305.unl number of rows = 187736 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaddte ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddte_cod_mcdv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddte_cod_tfpg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddte_val_ddte decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddte_efe_dias integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddte_ban_umbr smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (ddte_ban_umbr IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ddte_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaddte from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacpan row size = 104 number of columns = 2 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacp00306.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacpan ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpan_cod_mcdv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpan_det_cpan char(100) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cpan_cod_mcdv) constraint informix.pk_bcacpan')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacpan from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadaut row size = 12 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcada00307.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadaut ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('daut_cod_dpln integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('daut_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('daut_dias_daut integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (daut_cod_dpln) constraint informix.pk_bcadaut')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadaut from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatadv row size = 34 number of columns = 6 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcata00308.unl number of rows = 14 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatadv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tadv_cod_tadv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tadv_cod_tcdv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tadv_mon_inic decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tadv_mon_fina decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tadv_tas_acti decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tadv_tas_inac decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tadv_cod_tadv) constraint informix.pk_bcatadv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatadv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaclib row size = 24 number of columns = 5 index size =
35 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacl00309.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaclib ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clib_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clib_num_libr char(8) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clib_cod_mlbr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clib_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clib_fec_camb date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (clib_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaclib from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatcdp row size = 43 number of columns = 10 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatc00310.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatcdp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdp_cod_tcdv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdp_plz_mini integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdp_plz_maxi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdp_tas_mini decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdp_tas_maxi decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdp_tas_inac decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdp_tas_canc decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdp_dep_mini decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdp_rec_inte smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdp_nod_inac integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tcdp_cod_tcdv) constraint informix.pk_bcatcdp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatcdp from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaerro row size = 208 number of columns = 4 index size
= 22 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaer00311.unl number of rows = 28 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaerro ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('erro_cod_bbdd integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('erro_cod_erro integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('erro_det_erro char(100) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('erro_ico_erro char(100) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (erro_cod_bbdd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaerro from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadefz row size = 12 number of columns = 3 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcade00312.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadefz ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('defz_cod_banc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('defz_cod_tfpg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('defz_dia_efec integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (defz_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadefz from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcafadv row size = 16 number of columns = 4 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcafa00313.unl number of rows = 4000 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcafadv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fadv_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fadv_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fadv_num_fadv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fadv_est_fadv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (fadv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcafadv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadcom row size = 23 number of columns = 6 index size =
33 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadc00314.unl number of rows = 324079 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcom_cod_dcom serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcom_cod_comp integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcom_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcom_cod_tasi char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcom_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcom_may_dcom char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (dcom_valor > 0. ) constraint informix.ckt_bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dcom_cod_dcom) constraint informix.pk_bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadcom from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadbpf row size = 21 number of columns = 4 index size =
44 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadb00315.unl number of rows = 4721 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadbpf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbpf_cod_depg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbpf_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbpf_cod_tran integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbpf_val_dbpf decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dbpf_cod_depg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadbpf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadpap row size = 26 number of columns = 6 index size =
42 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadp00316.unl number of rows = 1853669 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadpap ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpap_num_dpap serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpap_cod_pape integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpap_cod_rubr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpap_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpap_cod_tasi char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpap_val_dpap decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dpap_num_dpap) constraint informix.pk_bcadpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadpap from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.tmpdcom row size = 26 number of columns = 4 index size =
22 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = tmpdc00317.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.tmpdcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcom_fec_dcom date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcom_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcom_sal_debi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcom_sal_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dcom_fec_dcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.tmpdcom from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaprdv row size = 29 number of columns = 6 index size =
33 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapr00318.unl number of rows = 157724 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaprdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdv_fec_prdv datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdv_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdv_cod_tdoc char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdv_num_docu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdv_val_prdv decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdv_cod_tasi char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (prdv_fec_prdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaprdv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaustr row size = 9 number of columns = 3 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaus00319.unl number of rows = 746 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaustr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ustr_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ustr_cod_optr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ustr_ban_ustr char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (ustr_ban_ustr IN (''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ustr_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaustr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaform row size = 102 number of columns = 5 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcafo00320.unl number of rows = 62 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaform ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('form_cod_form serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fomr_cod_tfor integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('form_des_form char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('form_dws_name char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('form_cod_paco integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (form_cod_form) constraint informix.pk_bcaform')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaform from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcavpre row size = 15 number of columns = 3 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcavp00321.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcavpre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpre_cod_pres integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpre_cod_mese smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpre_val_vpre decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (vpre_cod_pres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcavpre from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcactap row size = 16 number of columns = 4 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcact00322.unl number of rows = 11 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcactap ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctap_cod_prms integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctap_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctap_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctap_cod_ctaa integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ctap_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcactap from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacpar row size = 38 number of columns = 3 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacp00323.unl number of rows = 43 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacpar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpar_cod_cont integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpar_cod_paco integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpar_val_paco char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cpar_cod_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacpar from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaefba row size = 16 number of columns = 4 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaef00324.unl number of rows = 494 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaefba ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('efba_cod_efba serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('efba_cod_tfpg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('efba_cod_banc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('efba_num_dias integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (efba_cod_efba) constraint informix.pk_bcaefba')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaefba from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaobct row size = 166 number of columns = 5 index size
= 27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaob00325.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaobct ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obct_cod_obct serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obct_cod_cban integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obct_det_obct char(150) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obct_fec_obct date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obct_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (obct_cod_obct) constraint informix.pk_bcacbac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaobct from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadmba row size = 21 number of columns = 4 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadm00326.unl number of rows = 27258 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadmba ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmba_cod_dmba serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmba_cod_mban integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmba_cod_tfpg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmba_val_dmba decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dmba_cod_dmba) constraint informix.pk_bcadmba')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadmba from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcasald row size = 35 number of columns = 5 index size =
22 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcasa00327.unl number of rows = 189408 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcasald ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sald_fec_sald date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sald_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sald_dispo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sald_conta decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sald_val_picn decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (sald_fec_sald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcasald from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcabxco row size = 18 number of columns = 2 index size =
51 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcabx00328.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcabxco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bxco_cod_bech varchar(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bxco_cod_comp integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (bxco_cod_bech')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcabxco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadecb row size = 60 number of columns = 15 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcade00329.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadecb ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_cod_flib integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_cam_soci integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_cam_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_cam_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_cam_tcdv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_cam_fech integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_cam_iden integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_cam_dire integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_esp_soci integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_esp_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_esp_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_esp_tcdv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_esp_fech integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_esp_iden integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_esp_dire integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (decb_cod_flib) constraint informix.pk_bcadecb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadecb from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacobs row size = 136 number of columns = 5 index size
= 27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaco00330.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacobs ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cobs_cod_cobs serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cobs_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cobs_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cobs_fec_cobs date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cobs_obs_cobs char(120) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cobs_cod_cobs) constraint informix.pk_bcacobs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacobs from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatndd row size = 179 number of columns = 13 index size
= 51 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatn00331.unl number of rows = 155 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatndd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_cod_tndd serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_des_tndd char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_cod_tasi char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_est_tndd integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_cod_usua char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_ban_iva smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_val_tndd decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_por_iva decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_usu_modi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_cod_star integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tndd_cod_tndd) constraint informix.pk_bcatndd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatndd from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadimp row size = 66 number of columns = 6 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadi00332.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadimp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('impc_cod_impc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dimp_plan_otor varchar(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dimp_tasa_otor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dimp_plan_venc varchar(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dimp_aplicable decimal(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dimo_tasa_venc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (((dimp_aplicable >= 0. ) AND (dimp_aplicable <= 1. ) ) AND
(dimp_aplicable IN (0. ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (impc_cod_impc) constraint informix.pk_bcadimp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadimp from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacsob row size = 41 number of columns = 9 index size =
44 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacs00333.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacsob ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csob_cod_csob serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csob_cod_tsob integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csob_cod_cban integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csob_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csob_fec_csob date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csob_est_csob integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csob_val_csob decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csob_fec_cadu date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csob_fec_esta date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (csob_cod_csob')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacsob from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcasdct row size = 26 number of columns = 4 index size =
22 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcasd00334.unl number of rows = 5065 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcasdct ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sdct_fec_sdct date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sdct_cod_cban integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sdct_dis_sdct decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sdct_con_sdct decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (sdct_fec_sdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcasdct from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcachcj row size = 16 number of columns = 4 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcach00335.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcachcj ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chcj_cod_dchv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chcj_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chcj_cod_deef integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chcj_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (chcj_cod_dchv) constraint informix.pk_bcachcj')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcachcj from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaconc row size = 63 number of columns = 12 index size
= 27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaco00336.unl number of rows = 545 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaconc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conc_cod_conc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conc_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conc_ani_conc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conc_mes_conc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conc_fei_conc date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conc_fef_conc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conc_fec_conc date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conc_est_conc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conc_dif_conc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conc_cod_cban integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conc_sal_cuet decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conc_sal_ante decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (conc_cod_conc) constraint informix.pk_bcaconc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaconc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadtot row size = 17 number of columns = 3 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadt00337.unl number of rows = 50 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadtot ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtot_cod_dtot integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtot_cod_trcj integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtot_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dtot_cod_dtot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadtot from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaotcl row size = 21 number of columns = 4 index size =
39 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaot00338.unl number of rows = 8203 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaotcl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dotr_cod_pape integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dotr_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dotr_cod_trcj integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dotr_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dotr_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaotcl from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcasacp row size = 28 number of columns = 5 index size =
40 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcasa00339.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcasacp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_cons integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_mese smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_sal_debi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_sal_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (sacp_cod_cons')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcasacp from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacdco row size = 23 number of columns = 6 index size =
33 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacd00340.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacdco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdco_cod_cdco serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdco_cod_ccom integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdco_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdco_cod_tasi char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdco_val_cdco decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdco_may_cdco char(1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''0'' not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (cdco_may_cdco IN (''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cdco_cod_cdco) constraint informix.pk_bcacdco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacdco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacsac row size = 28 number of columns = 5 index size =
40 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacs00341.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacsac ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csac_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csac_cod_mese smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csac_sal_debi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csac_sal_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csac_cod_ejer integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (csac_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacsac from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadoem row size = 11 number of columns = 3 index size =
42 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcado00342.unl number of rows = 13 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadoem ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('doem_cod_ooem char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('doem_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('doem_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (doem_cod_ooem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadoem from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcandoc row size = 11 number of columns = 3 index size =
29 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcand00343.unl number of rows = 275 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcandoc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ndoc_cod_ejer integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ndoc_cod_tdoc char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ndoc_num_tdoc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ndoc_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcandoc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcafchq row size = 50 number of columns = 13 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcafc00344.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcafchq ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fchq_cod_fchq serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fchq_cod_banc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fchq_pos_xben integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fchq_pos_xval integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fchq_pos_xde1 integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fchq_pos_xde2 integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fchq_pos_xfec integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fchq_pos_yben integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fchq_pos_yval integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fchq_pos_yde1 integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fchq_pos_yde2 integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fchq_pos_yfec integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fchq_ban_form smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (fchq_cod_fchq) constraint informix.pk_bcafchq')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcafchq from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcarant row size = 8 number of columns = 2 index size =
0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcara00345.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcarant ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rant_lim_infe integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rant_lim_supe integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcarant from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcagcre row size = 25 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcagc00346.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcagcre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcre_cod_gcre integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grcre_des_gcre varchar(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gcre_cod_gcre) constraint informix.pk_bcagcre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcagcre from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaineg row size = 59 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcain00347.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaineg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ineg_cod_ineg serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ineg_des_ineg varchar(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ineg_ban_ineg char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ineg_sig_ineg smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ineg_cod_ineg) constraint informix.pk_bcaineg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaineg from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcading row size = 21 number of columns = 4 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadi00348.unl number of rows = 4319 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcading ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ding_cod_ineg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ding_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ding_val_deta decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ding_fec_actu date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ding_cod_ineg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcading from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcafsal row size = 20 number of columns = 5 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcafs00349.unl number of rows = 7207 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcafsal ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fsal_cod_fsal serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fsal_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fsal_cod_csal integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fsal_fec_ingr date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fsal_fec_sali date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (fsal_cod_fsal) constraint informix.pk_bcafsal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcafsal from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacsal row size = 60 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacs00350.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacsal ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csal_cod_csal serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csal_des_csal varchar(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csal_est_clie smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csal_sib_csal char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (csal_cod_csal) constraint informix.pk_bcacsal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacsal from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaordc row size = 12 number of columns = 3 index size =
26 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaor00351.unl number of rows = 812 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaordc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ordc_cod_dcom integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ordc_cod_orec integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ordc_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ordc_cod_dcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaordc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaacce row size = 8 number of columns = 2 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaac00352.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaacce ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acce_cod_bbdd integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acce_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (acce_cod_bbdd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaacce from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcarols row size = 105 number of columns = 15 index size
= 18 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaro00353.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcarols ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_cod_rols serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_mes_rols integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_ani_rols integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_tip_rols integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_aho_rols decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_cer_rols decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_pre_capi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_pre_inte decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_ant_capi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_ant_inte decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_bon_rols decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_alm_rols decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_dep_rols integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rols_var_rols decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (rols_cod_rols) constraint informix.pk_bcarols')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcarols from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaotde row size = 29 number of columns = 6 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaot00354.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaotde ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('otde_cod_otde serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('otde_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('otde_mes_rols integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('otde_ani_rols integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('otde_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('otde_tip_otde integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (otde_cod_otde) constraint informix.pk_bcaotde')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaotde from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaremq row size = 85 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcare00355.unl number of rows = 55 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaremq ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('remq_cod_remq serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('remq_des_remq varchar(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('remq_id1_remq byte')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('remq_id2_remq integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (remq_cod_remq) constraint informix.pk_bcaremq')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaremq from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcanoti row size = 110 number of columns = 11 index size
= 18 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcano00356.unl number of rows = 160 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcanoti ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('noti_cod_noti serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('noti_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('noti_fec_noti date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('noti_num_noti integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('noti_obs_noti char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('noti_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('noti_ban_noti integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('noti_num_divi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('noti_fec_divi date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('noti_val_noti decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('noti_val_deud decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (noti_cod_noti) constraint informix.pk_bcanoti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcanoti from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacatr row size = 54 number of columns = 8 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaca00357.unl number of rows = 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacatr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catr_cod_catr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catr_cod_sib char(5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catr_des_catr char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catr_por_apli decimal(10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catr_por_real decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catr_val_catr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catr_cod_modu smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catr_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (catr_cod_catr) constraint informix.pk_bcacatr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacatr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaacer row size = 125 number of columns = 8 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaac00358.unl number of rows = 1178 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaacer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acer_cod_acer serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acer_fec_acer datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acer_ter_acer varchar(25) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acer_usa_acer varchar(25) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acer_pas_acer varchar(25) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acer_ban_acer char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acer_usu_acer varchar(25)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acer_fcc_acer datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (acer_ban_acer IN (''P'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (acer_cod_acer) constraint informix.pk_bcaacer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaacer from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcarb11 row size = 40 number of columns = 6 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcarb00359.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcarb11 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rb11_cod_rb11 serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rb11_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rb11_cod_ccon char(15) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rb11_mes_rb11 integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rb11_val_sald decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rb11_fec_rep date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (rb11_cod_rb11) constraint informix.pk_bcarb11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcarb11 from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadpor row size = 8 number of columns = 2 index size =
13 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadp00360.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadpor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpor_cod_orec integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpor_cod_depg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dpor_cod_orec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadpor from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapais row size = 119 number of columns = 7 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapa00361.unl number of rows = 225 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapais ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_cod_pais serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_sib_pais char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_des_pais varchar(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_nac_pais varchar(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_des_naci varchar(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_sri_pais char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_cod_num integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pais_cod_pais) constraint informix.pk_bcapais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapais from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaeope row size = 71 number of columns = 12 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaeo00362.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaeope ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eope_cod_eope serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eope_sib_eope char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eope_des_eope varchar(36)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eope_ban_eope smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eope_cod_mcco integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eope_per_mora char(2) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''NO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eope_per_ncap char(2) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''NO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eope_per_nplz char(2) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''NO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eope_per_mcre char(2) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''NO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eope_per_cpac char(2) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''NO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eope_dia_venc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eope_pon_calf integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (eope_per_cpac IN (''NO'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (eope_cod_eope) constraint informix.pk_bcaeope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaeope from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaiope row size = 261 number of columns = 3 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaio00363.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaiope ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('iope_cod_iope serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('iope_sib_iope char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('iope_des_iope varchar(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (iope_cod_iope) constraint informix.pk_bcaiope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaiope from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaorig row size = 52 number of columns = 5 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaor00364.unl number of rows = 6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaorig ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orig_cod_orig serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orig_sib_orig char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orig_des_orig varchar(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orig_ban_orig smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orig_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (orig_cod_orig) constraint informix.pk_bcaorig')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaorig from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacfir row size = 16 number of columns = 4 index size =
22 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacf00365.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacfir ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfir_cod_cfir serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfir_cod_cban integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfir_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfir_cod_tfir integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cfir_cod_cfir')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacfir from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaavpic row size = 27 number of columns = 6 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaav00366.unl number of rows = 11868 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaavpic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('avpic_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('avpic_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('avpic_cod_picn integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('avpic_fec_modi date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('avpic_val_avpic decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('avpic_tip_modi varchar(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (((avpic_tip_modi = ''I'' ) OR (avpic_tip_modi = ''U'' ) ) OR
(avpic_tip_modi = ''D'' ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(') constraint informix.ckt_bcaavpic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaavpic from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaesol row size = 54 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaes00367.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaesol ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esol_cod_esol serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esol_des_esol char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (esol_cod_esol) constraint informix.pk_bcaesol')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaesol from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapgre row size = 24 number of columns = 6 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapg00368.unl number of rows = 1632 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapgre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgre_cod_pgre serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgre_num_cred integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgre_num_pgre integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgre_fec_entr date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgre_est_pgre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgre_usu_entr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pgre_cod_pgre) constraint informix.pk_bcapgre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapgre from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaendc row size = 36 number of columns = 6 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaen00369.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaendc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('endc_cod_endc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('endc_num_gtia integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('endc_num_endc varchar(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('endc_val_endc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('endc_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('endc_fec_fini date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (endc_cod_endc) constraint informix.pk_bcaendc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaendc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcagchq row size = 457 number of columns = 13 index size
= 36 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcagc00370.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcagchq ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gchq_cod_gchq serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gchq_num_gtia integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gchq_cod_banc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gchq_num_ctab varchar(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gchq_num_gchq varchar(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gchq_fec_venc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gchq_val_gchq decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gchq_est_gchq integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gchq_nom_gira char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gchq_fec_acta date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gchq_cif_prom char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gchq_inf_pres char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gchq_obs_gchq char(250)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gchq_cod_gchq) constraint informix.pk_bcagchq')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcagchq from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcachqs row size = 121 number of columns = 11 index size
= 45 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcach00371.unl number of rows = 1014 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcachqs ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chqs_cod_chqs serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chqs_cod_chra integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chqs_num_chqs integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chqs_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chqs_ben_chqs char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chqs_fec_chqs date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chqs_val_chqs decimal(16')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chqs_cod_mban integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chqs_cod_ecba integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chqs_cod_dcom integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chqs_observa char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (chqs_cod_chqs) constraint informix.pk_bcachqs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcachqs from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcafret row size = 65 number of columns = 6 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcafr00372.unl number of rows = 15 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcafret ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fret_cod_fret serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fret_xpo_fret decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fret_ypo_fret decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fret_des_fret char(35)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fret_ban_fret integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fret_val_sele integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (fret_cod_fret) constraint informix.pk_bcafret')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcafret from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatpco row size = 230 number of columns = 5 index size
= 8 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatp00373.unl number of rows = 24 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatpco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpco_cod_tpco varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpco_des_tpco varchar(120) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpco_sec_tran varchar(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpco_fec_vige date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpco_sus_trib varchar(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tpco_cod_tpco) constraint informix.pk_bcatpco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatpco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacoan row size = 68 number of columns = 11 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaco00374.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacoan ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coan_cod_coan serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coan_fec_ingr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('idif_ruc_info varchar(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpco_cod_tpco varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coan_num_sees varchar(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coan_num_sepe varchar(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coan_num_sein varchar(7) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coan_num_sefi varchar(7) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coan_num_auto varchar(10) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coan_fec_emis date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (coan_cod_coan) constraint informix.pk_bcacoan')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacoan from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatptr row size = 155 number of columns = 4 index size
= 7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatp00375.unl number of rows = 7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatptr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tptr_cod_tptr varchar(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tptr_des_tptr varchar(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tptr_tip_comp varchar(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tptr_sec_tran varchar(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tptr_cod_tptr) constraint informix.pk_bcatptr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatptr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadrtr row size = 52 number of columns = 8 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadr00376.unl number of rows = 2730 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadrtr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtr_cod_drtr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_cod_refi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crfi_cod_secu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtr_tot_depo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtr_bas_imre decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtr_por_rete decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtr_mon_rere decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (drtr_cod_drtr) constraint informix.pk_bcadrtr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadrtr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatpie row size = 33 number of columns = 2 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatp00377.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatpie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpie_cod_tpie varchar(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpie_des_tpie varchar(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tpie_cod_tpie) constraint informix.pk_bcatpie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatpie from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadiad row size = 35 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadi00378.unl number of rows = 13 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadiad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('diad_cod_diad varchar(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('diad_des_diad varchar(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (diad_cod_diad) constraint informix.pk_bcadiad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadiad from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacore row size = 104 number of columns = 2 index size
= 8 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaco00379.unl number of rows = 30 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacore ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('core_cod_core varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('core_des_core varchar(100) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (core_cod_core) constraint informix.pk_bcacore')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacore from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatsie row size = 33 number of columns = 2 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcats00380.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatsie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsie_cod_tsie varchar(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsie_des_tsie varchar(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tsie_cod_tsie) constraint informix.pk_bcatsie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatsie from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcateex row size = 209 number of columns = 27 index size
= 49 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcate00381.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcateex ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_cod_teex serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_cod_comp integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_fec_ingr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('idif_ruc_info varchar(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpie_cod_tpie varchar(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpco_cod_tpco varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('diad_cod_diad varchar(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_nore_anio varchar(4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('core_cod_core varchar(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_nor_corr varchar(6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_nor_veri varchar(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_doc_tran varchar(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_fec_tran date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_nro_idfi varchar(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsie_cod_tsie varchar(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_val_fob decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_raz_socl varchar(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_dev_iva varchar(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpco_cod_tpco1 varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_val_comp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_num_sees varchar(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_num_sepe varchar(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_num_secu varchar(7) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_fec_reco date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_num_auto varchar(10) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teex_fec_emco date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (teex_cod_teex) constraint informix.pk_bcateex')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcateex from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapiva row size = 40 number of columns = 8 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapi00382.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapiva ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('piva_cod_secu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('piva_cod_piva integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('piva_val_piva integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('piva_fec_ini date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('piva_cta_comp varchar(8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('piva_cta_vent varchar(8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('piva_asu_piva smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('piva_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (piva_cod_secu) constraint informix.pk_bcapiva')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapiva from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapice row size = 86 number of columns = 6 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapi00383.unl number of rows = 11 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapice ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pice_cod_pice integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pice_val_pice decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pice_cod_impu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pice_des_pice varchar(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pice_fec_ini date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pice_fec_fin date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pice_cod_pice) constraint informix.pk_bcapice')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapice from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadrti row size = 43 number of columns = 7 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadr00384.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadrti ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drti_cod_drti serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_cod_teim integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crfi_cod_secu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drti_bas_impo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drti_por_rete decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drti_mon_rete decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (drti_cod_drti) constraint informix.pk_bcadrti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadrti from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadrtc row size = 47 number of columns = 8 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadr00385.unl number of rows = 4035 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadrtc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtc_cod_drtc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_cod_tlco integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crfi_cod_secu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtc_bas_impo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtc_por_rete decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtc_mon_rete decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtc_cod_dcom integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (drtc_cod_drtc) constraint informix.pk_bcadrtc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadrtc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadrtv row size = 43 number of columns = 7 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadr00386.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadrtv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtv_cod_drtv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtv_cod_tlve integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtv_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtv_cod_crfi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtv_bas_impo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtv_por_rete decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtv_mon_rete decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (drtv_cod_drtv) constraint informix.pk_bcadrtv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadrtv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaanme row size = 28 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaan00387.unl number of rows = 12 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaanme ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anme_num_anio integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anme_des_mes varchar(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anme_num_mes varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (anme_num_anio) constraint informix.pk_bcaanme')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaanme from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatacr row size = 34 number of columns = 2 index size =
8 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcata00388.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatacr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tacr_cod_tacr varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tacr_des_tacr varchar(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tacr_cod_tacr) constraint informix.pk_bcatacr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatacr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatifi row size = 65 number of columns = 5 index size =
8 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcati00389.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatifi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tifi_cod_tifi varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tifi_des_tifi varchar(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tifi_cod_pore varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tifi_fec_ini date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tifi_fec_fin date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tifi_cod_tifi) constraint informix.pk_bcatifi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatifi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaegch row size = 34 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaeg00390.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaegch ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('egch_cod_egch integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('egch_nom_egch char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (egch_cod_egch) constraint informix.pk_bcaecgh')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaegch from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaesfe row size = 158 number of columns = 15 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaes00391.unl number of rows = 60 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaesfe ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_cod_esfe serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_des_esfe varchar(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_cod_ccon char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_cod_grup integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_ban_elim char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_ccod_elim char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_ccoh_elim char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_ban_efec char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_ban_inve char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_ban_fina char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_ban_oper char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_ban_igcl char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_ban_igot char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_ban_utpr char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_ban_utot char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (esfe_cod_esfe) constraint informix.pk_bcaesfe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaesfe from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaesac row size = 78 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaes00392.unl number of rows = 13 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaesac ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esac_cod_esac serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esac_des_esac char(70)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esac_ban_esac smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esac_ord_esac smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (esac_cod_esac) constraint informix.pk_bcaesac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaesac from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaeesf row size = 113 number of columns = 14 index size
= 27 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaee00393.unl number of rows = 56 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaeesf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_cod_eesf serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_cod_esfe integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_cod_esac integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_des_eesf char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_val_eesf decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_ban_eesf smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_usu_eesf integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_fec_eesf date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_cod_ejer integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_eje_actu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_cod_peri integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_per_actu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_sig_eesf char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (eesf_cod_eesf) constraint informix.pk_bcaeesf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaeesf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcarang row size = 18 number of columns = 2 index size =
23 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcara00394.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcarang ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rang_ini_rang decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rang_fin_rang decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (rang_ini_rang')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcarang from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadmon row size = 69 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadm00395.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadmon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmon_cod_dmon integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmon_des_dmon varchar(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmon_cod_modu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dmon_cod_dmon) constraint informix.pk_bcadmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadmon from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcamoni row size = 19 number of columns = 3 index size =
22 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcamo00396.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcamoni ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('moni_cod_dmon integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('moni_mes_moni integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('moni_val_moni decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcamoni from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcavari row size = 34 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcava00397.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcavari ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vari_cod_vari char(4) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vari_des_vari char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (vari_cod_vari) constraint informix.pk_bcavari')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcavari from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadvar row size = 22 number of columns = 4 index size =
26 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadv00398.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadvar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dvar_cod_vari char(4) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dvar_ani_dvar integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dvar_mes_dvar integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dvar_val_dvar decimal(18')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dvar_cod_vari')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadvar from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatind row size = 166 number of columns = 6 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcati00399.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatind ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tind_cod_tind serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tind_nom_tind varchar(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tind_des_tind varchar(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tind_ban_tind smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0 not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tind_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tind_cod_dmon integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tind_cod_tind) constraint informix.pk_bcatind')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatind from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatafi row size = 92 number of columns = 10 index size
= 36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcata00400.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatafi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tafi_cod_tafi serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tafi_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tafi_cta_gast integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tafi_cta_depr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tafi_nom_tafi char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tafi_por_depr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tafi_tie_tafi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tafi_abr_tafi char(5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tafi_ban_tafi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tafi_cta_reva integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tafi_cod_tafi) constraint informix.pk_bcatafi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatafi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaddep row size = 63 number of columns = 4 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadd00401.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaddep ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddep_cod_ddep serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddep_cod_depa integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddep_nom_ddep char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddep_abr_ddep char(5) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ddep_cod_ddep) constraint informix.pk_bcaddep')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaddep from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaeafi row size = 34 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaea00402.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaeafi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eafi_cod_eafi serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eafi_nom_eafi char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (eafi_cod_eafi) constraint informix.pk_bcaeafi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaeafi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadtac row size = 67 number of columns = 5 index size =
22 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadt00403.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadtac ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtac_cod_dtac serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtac_cod_tafi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtac_num_dtac integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtac_nom_dtac char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtac_abr_dtac char(5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dtac_cod_dtac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadtac from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaacti row size = 531 number of columns = 27 index size
= 58 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaac00404.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaacti ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_acti serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_dtac integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_tafi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_ddep integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_eafi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_empl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_prdr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_comp integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_gene char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_nom_acti char(100) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_ser_acti char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_car_acti char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_med_acti char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_col_acti char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_val_acti decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_val_depr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_fec_ingr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_fec_depr date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_mod_bien char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_val_resi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_tie_tecn integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_obs_acti char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_com_baja integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_fec_regr date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (acti_cod_acti) constraint informix.pk_bcaacti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaacti from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadepr row size = 25 number of columns = 5 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcade00405.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadepr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depr_cod_depr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depr_cod_acti integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depr_fec_proc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depr_val_depr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depr_fec_depr date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (depr_cod_depr) constraint informix.pk_bcadepr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadepr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaacem row size = 25 number of columns = 7 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaac00406.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaacem ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acem_cod_acem serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acemi_cod_acti integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acem_est_actu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acem_cod_empl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acem_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acem_fec_acem date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acem_ope_acem char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check ((acem_ope_acem = ''I'' ) OR (acem_ope_acem = ''U'' ) )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (acem_cod_acem) constraint informix.pk_bcaacem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaacem from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaaeac row size = 21 number of columns = 6 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaae00407.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaaeac ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('aeac_cod_aeac serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('aeac_cod_acti integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('aeac_est_ante integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('aeac_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('aeac_fec_aeac date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('aeac_ope_aeac char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check ((aeac_ope_aeac = ''I'' ) OR (aeac_ope_aeac = ''U'' ) )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (aeac_cod_aeac) constraint informix.pk_bcaaeac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaaeac from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcahact row size = 38 number of columns = 8 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaha00408.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcahact ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hact_cod_hact serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hact_cod_acti integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hact_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hact_fec_hact date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hact_fec_ingr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hact_val_acti decimal(18')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hact_tie_acti integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hact_cod_comp integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (hact_cod_hact) constraint informix.pk_bcahact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcahact from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaabog row size = 28 number of columns = 7 index size =
49 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaab00409.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaabog ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abog_cod_abog serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abog_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abog_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abog_fec_ingr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abog_fec_sali date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abog_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abog_cod_rubr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (abog_cod_abog')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaabog from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaejui row size = 45 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaej00410.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaejui ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ejui_cod_ejui serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ejui_des_ejui varchar(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ejui_cod_ejui) constraint informix.pk_bcaejui')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaejui from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcajuic row size = 48 number of columns = 9 index size =
44 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaju00411.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcajuic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('juic_num_cred integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('juic_cod_abog integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('juic_num_juic varchar(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('juic_cod_ejui integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('juic_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('juic_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('juic_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('juic_val_juic decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('juic_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (juic_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcajuic from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcamonc row size = 26 number of columns = 4 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcamo00412.unl number of rows = 15 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcamonc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('monc_cod_monc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('monc_cod_mone integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('monc_ini_plaz decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('monc_fin_plaz decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (monc_cod_monc) constraint informix.pk_bcamonc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcamonc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaplcr row size = 27 number of columns = 5 index size =
24 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapl00413.unl number of rows = 14 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaplcr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plcr_cod_plcr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plcr_cod_intv char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plcr_cod_mone integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plcr_ini_plcr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plcr_fin_plcr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (plcr_cod_plcr) constraint informix.pk_bcaplcr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaplcr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatasc row size = 32 number of columns = 8 index size =
45 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcata00414.unl number of rows = 31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatasc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasc_cod_tasc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasc_cod_ccre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasc_por_tasa decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasc_ini_tasc decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasc_fin_tasc decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasc_cod_plcr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasc_cod_monc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasc_cod_lcre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tasc_cod_tasc) constraint informix.pk_bcatasc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatasc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaofus row size = 12 number of columns = 3 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaof00415.unl number of rows = 39 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaofus ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofus_cod_ofus serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofus_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofus_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ofus_cod_ofus) constraint informix.pk_bcaofus')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaofus from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaesrf row size = 35 number of columns = 2 index size =
45 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaes00416.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaesrf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esrf_cod_esrf serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esrf_nom_esrf varchar(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (esrf_cod_esrf) constraint informix.pk_bcaesrf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaesrf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaoffa row size = 74 number of columns = 12 index size
= 36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaof00417.unl number of rows = 14 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaoffa ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('offa_cod_offa serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('offa_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('offa_cod_esrf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('offa_cod_tran integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('offa_num_esta varchar(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('offa_num_loca varchar(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('offa_num_inic varchar(10) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('offa_num_fina varchar(10) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('offa_num_actu varchar(10) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('offa_num_auto varchar(10) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('offa_fec_venc date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('offa_ban_cele smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (offa_cod_offa) constraint informix.pk_bcaoffa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaoffa from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcasetr row size = 6 number of columns = 3 index size =
21 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcase00418.unl number of rows = 17 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcasetr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('setr_cod_setr varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tptr_cod_tptr varchar(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpid_cod_iden char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (setr_cod_setr) constraint informix.pk_bcasetr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcasetr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatiin row size = 69 number of columns = 4 index size =
45 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcati00419.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatiin ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tiin_cod_tiin integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tiin_des_tiin varchar(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tiin_nom_repr varchar(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tiin_pro_nomb char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tiin_cod_tiin) constraint informix.pk_bcatiin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatiin from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afccpof row size = 16 number of columns = 4 index size =
49 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afccp00420.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afccpof ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpof_ofi_orig integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpof_ofi_dest integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpof_cta_cobr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpof_cta_pagr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cpof_ofi_orig')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afccpof from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaempl row size = 331 number of columns = 25 index size
= 72 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaem00421.unl number of rows = 34 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaempl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_cod_empl serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_fec_ingr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_fec_sali date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_cod_carg integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_sue_empl decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_num_iess char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_lib_mili char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_obs_empl char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_cod_rlab integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_tit_empl varchar(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_cod_taud integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_res_sib char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_fec_sib date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_fec_venc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_ban_ases smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_tfp_pago integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_ban_bgal smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_ban_enca smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_cod_disc integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_por_disc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_tid_disc char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_ide_disc char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_cod_tcem integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (empl_cod_clie) constraint informix.uc_bcaempl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (empl_cod_empl) constraint informix.pk_bcaempl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaempl from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcahesu row size = 25 number of columns = 5 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcahe00422.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcahesu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hesu_cod_hesu serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hesu_cod_empl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hesu_val_ante decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hesu_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hesu_fec_ante date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (hesu_cod_hesu) constraint informix.pk_bcahesu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcahesu from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcataud row size = 31 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcata00423.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcataud ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('taud_cod_taud serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('taud_des_taud varchar(25)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('taud_sib_taud char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (taud_cod_taud) constraint informix.pk_bcataud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcataud from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatica row size = 30 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcati00424.unl number of rows = 7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatica ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tica_cod_tica integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tica_nom_tica varchar(25)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tica_cod_tica) constraint informix.pk_bcatica')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatica from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacarg row size = 39 number of columns = 4 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaca00425.unl number of rows = 191 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacarg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('carg_cod_carg serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('carg_cod_tica integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('carg_nom_carg varchar(25)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('carg_sib_carg varchar(4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (carg_cod_carg) constraint informix.pk_bcacarg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacarg from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcarlab row size = 22 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcarl00426.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcarlab ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rlab_cod_rlab serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rlab_des_rlab varchar(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rlab_sib_rlab varchar(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (rlab_cod_rlab) constraint informix.pk_bcarlab')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcarlab from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaereg row size = 42 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaer00427.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaereg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ereg_cod_ereg serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ereg_des_ereg varchar(35)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ereg_sib_ereg varchar(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ereg_cod_ereg) constraint informix.pk_bcaereg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaereg from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapaca row size = 20 number of columns = 5 index size =
23 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapa00428.unl number of rows = 25 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapaca ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('paca_cod_ccon varchar(4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('paca_ran_inic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('paca_ran_fina integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('paca_cod_ccre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('paca_lin_paca char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapaca from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapcal row size = 25 number of columns = 6 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapc00429.unl number of rows = 45 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapcal ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pcal_fec_tope date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pcal_cod_ccre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pcal_lim_infe integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pcal_lim_supe integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default null')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pcal_est_calf char(5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pcal_val_pond integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pcal_fec_tope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapcal from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcarcla row size = 20 number of columns = 5 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcarc00430.unl number of rows = 65 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcarcla ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rcla_cod_ccre integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rcla_cod_tgar integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rcla_dias_rcla integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rcla_num_rcla integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rcla_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (rcla_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcarcla from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcagara row size = 20 number of columns = 5 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaga00431.unl number of rows = 728 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcagara ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gara_cod_gara serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gara_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gara_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gara_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gara_cod_socr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gara_cod_gara) constraint informix.pk_bcagara')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcagara from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaclie row size = 540 number of columns = 43 index size
= 265 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacl00432.unl number of rows = 4643 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_num_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tide char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie char(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ape_clie varchar(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nom_clie char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_nac date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_sect integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_dir_domi char(55)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_uac datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_ingr datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_sali date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ema_clie char(80)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cal_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_rep_lega varchar(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_repr char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_tide_repr char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_pais integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_ofct integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ref_dire char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_cocu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_adic smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_disc smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tviv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_val_vivi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_num_carg smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcsr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_auid integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_asan date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_prof integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ban_peps smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tvin integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ban_grup smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_grup integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tres integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1 not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_pai_resi integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 56 not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_hue_dact char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ban_pdpe smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (clie_ide_clie) constraint informix.uc_bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (clie_cod_tcli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (clie_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaclie from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdsoc row size = 537 number of columns = 9 index size
= 27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcds00433.unl number of rows = 1822 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdsoc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsoc_cod_dsoc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsoc_cod_socr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsoc_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsoc_obs_dsoc char(500)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsoc_est_ante integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsoc_fec_apro date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsoc_tas_ante decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsoc_num_cuot integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsoc_cod_prso integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dsoc_cod_dsoc) constraint informix.pk_afcdsoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdsoc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcprso row size = 25 number of columns = 5 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcpr00434.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcprso ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prso_cod_prso serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prso_cod_prms integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prso_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prso_val_prso decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prso_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (prso_cod_prso) constraint informix.pk_bcaprmg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcprso from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcainan row size = 20 number of columns = 5 index size =
22 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcain00435.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcainan ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inan_cod_tcdv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inan_cod_anio integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inan_cod_tanx integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inan_fec_proc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inan_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (inan_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcainan from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacalf row size = 166 number of columns = 23 index size
= 13 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaca00436.unl number of rows = 617414 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacalf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_fec_calf date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_num_cred integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_sal_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_est_calf char(5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_prov decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_cod_ccre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_acti decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_venc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_deve decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_dias_venc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_dema decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_cast decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_pro_cons decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_capt decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_fec_serv datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_num_cuot decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_mora decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_por_preq decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_por_pcon decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_sib_tope char(3) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''CDC''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_fec_repr date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_scal decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (calf_fec_calf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacalf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaabdv row size = 54 number of columns = 11 index size
= 63 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaab00437.unl number of rows = 141954 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaabdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_abdv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_divc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_rubr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_fec_abdv date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_val_abdv decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_pape integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_pago integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_ediv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_fec_serv date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_sal_abdv decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (abdv_cod_abdv) constraint informix.pk_bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaabdv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcconf row size = 123 number of columns = 9 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcco00438.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcconf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conf_cod_conf serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conf_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conf_val_conf decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conf_va1_conf decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conf_fec_conf date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conf_des_conf char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conf_de1_conf char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conf_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conf_por_apor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (conf_cod_conf) constraint informix.pk_afcconf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcconf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctinv row size = 69 number of columns = 5 index size =
8 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcti00439.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctinv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tinv_cod_tinv char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tinv_des_tinv char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tinv_tip_tinv char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tinv_sib_tinv char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tinv_sib_tip char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tinv_cod_tinv) constraint informix.pk_bcatinv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctinv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcloca row size = 36 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afclo00440.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcloca ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('loca_cod_loca serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('loca_des_loca char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('loca_sib_loca char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (loca_cod_loca) constraint informix.pk_afcloca')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcloca from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcinve row size = 1044 number of columns = 30 index
size = 86 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcin00441.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcinve ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_inve serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_mone integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_edpf integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_tinv char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_banc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_loca integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_ffin integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_des_inve char(300)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_doc_inve char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_obs_inve char(500)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_fec_crea date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_plz_maxi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_plz_mini integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_val_inve decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_val_inv2 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_num_inve decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_tas_inve decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cos_ante decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cos_vari decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_peri char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_fppf integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_num_pint integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_por_rete decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_fec_prov date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_val_prov decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_dia_calc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (inve_cod_inve) constraint informix.pk_bcainve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcinve from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcminv row size = 520 number of columns = 22 index size
= 63 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcmi00442.unl number of rows = 13 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcminv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_cod_minv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_cod_inve integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_cod_tran integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_cod_rubr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_cod_edpf integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_cod_tfpg integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_fec_minv date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_det_minv char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_obs_minv char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_num_minv decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_cos_ante decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_cos_actu decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_cos_vari decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_val_vari decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_val_comp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_val_gana decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_val_gast decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_pag_tfpg integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_fec_paga date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (minv_cod_minv) constraint informix.pk_afcminv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcminv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaeanr row size = 29 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaea00443.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaeanr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eanr_cod_eanr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eanr_des_eanr char(25) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (eanr_cod_eanr) constraint informix.pk_bcaeanr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaeanr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaorco row size = 74 number of columns = 9 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaor00444.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaorco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orco_cod_orco serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orco_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orco_cod_prdr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orco_fec_orco date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orco_val_orco decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orco_num_orco char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orco_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orco_est_orco integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orco_obs_orco varchar(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (orco_cod_orco) constraint informix.pk_bcaorco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaorco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacrrl row size = 45 number of columns = 10 index size
= 45 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacr00445.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacrrl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crrl_cod_crrl serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crrl_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crrl_cod_prdr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crrl_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crrl_fec_crrl date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crrl_val_crrl decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crrl_num_crrl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crrl_est_crrl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crrl_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crrl_cod_orco integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (crrl_cod_crrl) constraint informix.pk_bcacrrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacrrl from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaanrl row size = 120 number of columns = 15 index size
= 63 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaan00446.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaanrl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_cod_anrl serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_cod_depe integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_cod_eanr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_usu_env integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_usu_rec integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_cod_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_fec_anrl date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_fec_proc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_fec_canc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_val_ahor decimal(16')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_vta_envi decimal(16')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_vta_reci decimal(16')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_obs_anrl char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anrl_cod_ting char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (anrl_cod_anrl) constraint informix.pk_bcaanrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaanrl from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadanr row size = 90 number of columns = 9 index size =
39 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcada00447.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadanr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('danr_cod_anrl integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('danr_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('danr_cod_divc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('danr_cod_rubc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('danr_cod_prdr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('danr_val_envi decimal(16')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('danr_val_rece decimal(16')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('danr_obs_danr char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('danr_ban_danr smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (danr_cod_anrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.pk_bcadanr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadanr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaprcb row size = 38 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapr00448.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaprcb ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prcb_cod_prcb serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prcb_det_prcb char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prcb_num_prcb integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (prcb_cod_prcb) constraint informix.pk_bcaprcb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaprcb from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacdso row size = 138 number of columns = 17 index size
= 18 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacd00449.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacdso ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_cod_cdso serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_ani_cdso char(4) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_val_cdso decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_val_ut01 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_val_ut02 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_val_ut03 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_val_ut04 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_val_ut05 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_val_ut06 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_val_ut07 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_val_ut08 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_val_ut09 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_val_ut10 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_val_ut11 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_val_ut12 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cdso_val_util decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cdso_cod_cdso) constraint informix.pk_bcacdso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacdso from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaicli row size = 18 number of columns = 4 index size =
34 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaic00450.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaicli ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('icli_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('icli_cod_ting char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('icli_val_icli decimal(16')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('icli_cod_temd integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (icli_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaicli from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadect row size = 8 number of columns = 2 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcade00451.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadect ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dect_cod_depe integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dect_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dect_cod_depe) constraint informix.pk_bcadect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadect from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdadp row size = 21 number of columns = 4 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcda00452.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdadp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dadp_cod_dadp serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dadp_cod_anrl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dadp_cod_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dadp_val_dadp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dadp_cod_dadp) constraint informix.pk_afcdadp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdadp from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcasocr row size = 146 number of columns = 30 index size
= 105 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaso00453.unl number of rows = 1802 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcasocr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_socr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_num_socr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_esol integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_ccre integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_dtcr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_intv char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_tamo integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_lcred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cap_socr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cap_apro decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_fec_ingr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_tcse char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_tas_socr decimal(4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_num_cuot integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_prdr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_iden integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_val_extr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_num_extr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_eope integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_dcre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_dia_calc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_ocup char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_val_cuot decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_ban_mfec smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_nct_grac integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_ban_afin smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_tgar integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (socr_ban_afin IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (socr_cod_socr) constraint informix.pk_bcasocr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcasocr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcbeco row size = 133 number of columns = 3 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcbe00454.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcbeco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('beco_nom_beco char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('beco_ide_beco char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('beco_dir_beco char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (beco_ide_beco) constraint informix.pk_afcbeco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcbeco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcnutc row size = 16 number of columns = 4 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcnu00455.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcnutc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nutc_cod_tcli integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nutc_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nutc_num_nutc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nutc_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (nutc_cod_tcli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcnutc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacliegara row size = 309 number of columns = 21 index
size = ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacl00456.unl number of rows = 1587 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacliegara ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_num_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tide char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie char(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ape_clie varchar(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nom_clie char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_nac date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_sect integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_dir_domi char(55)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_uac date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_ingr date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_sali date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ema_clie char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cal_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_rep_lega varchar(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_repr char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_tide_repr char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacliegara from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadpfi row size = 680 number of columns = 20 index size
= 54 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadp00457.unl number of rows = 1641 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_dpfi serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_num_dpfi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_caja char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_dpfi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_tas_dpfi decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_val_dpfi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_fppf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_npg_inte integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_edpf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_fec_deve date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_det_dpfi char(300)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_nom_bene char(300)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_recl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_por_rete decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_sect integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (dpfi_cod_edpf IN (1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dpfi_cod_dpfi) constraint informix.pk_bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadpfi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctemd row size = 80 number of columns = 6 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcte00458.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctemd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('temd_cod_temd serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('temd_nom_temd char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('temd_est_temd integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('temd_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('temd_cod_recu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('temd_cod_rec1 integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (temd_cod_temd) constraint informix.pk_afctemd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctemd from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdact row size = 30 number of columns = 5 index size =
22 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcda00459.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdact ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dact_cod_anrl integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dact_cod_mcco integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dact_cod_serv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dact_val_envi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dact_val_rece decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dact_cod_anrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdact from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.temprovi row size = 41 number of columns = 4 index size
= 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = tempr00460.unl number of rows = 6162 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.temprovi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('val_prov decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cuenta char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_tcdv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.temprovi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdces row size = 102 number of columns = 5 index size
= 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdc00461.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdces ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dces_cod_cesa integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dces_det_dces char(70)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dces_val_dces decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dces_mod_dces integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dces_ref_dces char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdces from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afchpol row size = 34 number of columns = 5 index size =
0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afchp00462.unl number of rows = 235931 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afchpol ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hpol_cod_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hpol_fec_hpol datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hpol_val_ante decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hpol_val_actu decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hpol_usu_ante integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afchpol from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaandv row size = 51 number of columns = 11 index size
= 49 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaan00463.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaandv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('andv_cod_andv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('andv_cod_tanx integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('andv_cod_tcdv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('andv_fecha date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('andv_cod_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('andv_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('andv_ban_andv char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('andv_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('andv_val_inte decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('andv_ofi_gene integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('andv_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (andv_cod_andv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaandv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcddep row size = 234 number of columns = 7 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdd00464.unl number of rows = 28543 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcddep ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddep_cod_ddep serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddep_cod_mcdv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddep_fec_ddep date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddep_val_ddep decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddep_nom_ddep char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddep_num_docu char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddep_obs_ddep char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ddep_cod_ddep) constraint informix.pk_afcddep')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcddep from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctdeu row size = 26 number of columns = 3 index size =
16 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctd00465.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctdeu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdeu_cod_tdeu serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdeu_des_tdeu char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdeu_sib_tdeu char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (tdeu_sib_tdeu) constraint informix.uk_afctdeu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tdeu_cod_tdeu) constraint informix.pk_afctdeu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctdeu from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcarsib row size = 594 number of columns = 14 index size
= 23 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcars00466.unl number of rows = 61 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcarsib ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_cod_rsib serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_des_rsib varchar(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_fec_rsib date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_tip_rsib char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_ndi_rsib integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_obs_rsib char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_nom_clas char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_sib_rsib char(5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_cod_modu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_cod_segm char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_tip_arch char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_esp_nomb char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_xsi_sche char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (rsib_sib_rsib')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (rsib_cod_rsib) constraint informix.pk_bcarsib')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcarsib from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afccega row size = 26 number of columns = 3 index size =
16 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcce00467.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afccega ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cega_cod_cega serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cega_des_cega char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cega_sib_cega char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (cega_sib_cega) constraint informix.uk_afccega')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cega_cod_cega) constraint informix.pk_afccega')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afccega from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctemi row size = 37 number of columns = 3 index size =
17 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcte00468.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctemi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('temi_cod_temi serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('temi_des_temi char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('temi_sib_temi char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (temi_sib_temi) constraint informix.uk_afctemi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (temi_cod_temi) constraint informix.pk_afctemi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctemi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afccrie row size = 37 number of columns = 3 index size =
17 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afccr00469.unl number of rows = 12 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afccrie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crie_cod_crie serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crie_des_crie char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crie_sib_crie char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (crie_sib_crie) constraint informix.uc_afccrie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (crie_cod_crie) constraint informix.pk_afccrie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afccrie from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctrla row size = 37 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctr00470.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctrla ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trla_cod_trla serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trla_des_trla char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trla_sib_trla char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (trla_cod_trla) constraint informix.pk_afctrla')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctrla from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afccltr row size = 14 number of columns = 4 index size =
37 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afccl00471.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afccltr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clrl_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clrl_cod_trla integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clrl_fec_clrl date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clrl_est_clrl smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (clrl_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.pk_afccltr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afccltr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcccob row size = 43 number of columns = 9 index size =
15 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afccc00472.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcccob ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccob_cod_ccob serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccob_sal_disp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccob_sal_cont decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccob_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccob_fec_umov date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccob_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccob_num_pago integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccob_dia_corte integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccob_int_cort char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ccob_cod_ccob) constraint informix.pk_afcccob')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcccob from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcttpr row size = 141 number of columns = 8 index size
= 34 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctt00473.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcttpr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttpr_cod_ttpr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttpr_des_ttpr char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttpr_est_ttpr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttpr_usu_perm char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttpr_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttpr_cod_tasi char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttpr_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttpr_cod_mone integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (ttpr_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ttpr_cod_ttpr) constraint informix.pk_afcttpr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcttpr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcmcco row size = 244 number of columns = 24 index size
= 61 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcmc00474.unl number of rows = 2349 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcmcco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_mcco serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_num_mcco char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_fec_mcco date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_val_mcco decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_det_mcco varchar(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_ref_mcco char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cta_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_proc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_ttpr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_num_chqs decimal(16)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_prdr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_eacd smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_val_paga decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_fec_paga date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_fec_venc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_serv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_fec_serv date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_est_calf char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_fec_calf date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_val_prov decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (mcco_cod_mcco) constraint informix.pk_afcmcco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcmcco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcmcpa row size = 299 number of columns = 24 index size
= 52 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcmc00475.unl number of rows = 4809 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcmcpa ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_mcpa serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_mcco integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_prdr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_modu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_esta smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_fec_mcpa date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_sal_mcpa decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_val_mcpa decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_iva_mcpa decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_det_mcpa varchar(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_ref_mcpa char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_num_mcpa char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_fec_serv date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_serv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_val_paga decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_fec_paga date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_ttpr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_ban_tamo integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_val_desc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (mcpa_cod_mcpa) constraint informix.pk_afcmcpa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcmcpa from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdmco row size = 149 number of columns = 12 index size
= 53 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdm00476.unl number of rows = 4454 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdmco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmco_cod_mcco integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmco_cod_tfpg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmco_cod_pape integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmco_val_dmco decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmco_fec_paga date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmco_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmco_cod_tran integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmco_cod_ttpr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmco_cod_tcdv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmco_cod_pago integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmco_det_dmco char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmco_cod_esta integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dmco_cod_mcco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdmco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdmcp row size = 234 number of columns = 15 index size
= 45 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdm00477.unl number of rows = 6428 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdmcp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_cod_dmcp serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_mcpa integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_fec_dmcp date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_cod_comp integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_det_dmcp varchar(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_ref_dmcp char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_num_dmcp char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_val_dmcp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_cod_tfpg integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_cod_tran integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_fec_paga date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_cod_ttpr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_cod_esta integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdmcp from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afccrce row size = 137 number of columns = 9 index size
= 54 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afccr00478.unl number of rows = 79 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afccrce ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crce_cod_crce serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crce_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crce_obs_crce char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crce_ecr_ante integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crce_ecr_actu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crce_fec_crce date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crce_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crce_sal_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crce_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (crce_cod_crce) constraint informix.pk_afccrce')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afccrce from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcasoci row size = 230 number of columns = 11 index size
= 27 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaso00479.unl number of rows = 614 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcasoci ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soci_num_soci serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soci_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soci_usu_soci char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soci_fec_ing date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soci_fec_sal date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soci_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soci_com_soci char(120)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soci_act_soci integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0 not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soci_ban_soci char(1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soci_pass_soci char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soci_ipa_soci char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (soci_cod_clie) constraint informix.uc_bcasoci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (soci_num_soci) constraint informix.pk_bcasoci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcasoci from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcescp row size = 24 number of columns = 2 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afces00480.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcescp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('escp_cod_escp serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('escp_nom_escp char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (escp_cod_escp) constraint informix.pk_afcescp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcescp from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctsoc row size = 36 number of columns = 4 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcts00481.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctsoc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsoc_cod_tsoc smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsoc_nom_tsoc char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsoc_sri_tsoc char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsoc_sib_tsoc char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tsoc_cod_tsoc) constraint informix.pk_afctsoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctsoc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctpag row size = 34 number of columns = 3 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctp00482.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctpag ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpag_cod_tpag smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpag_nom_tpag char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpag_sri_tpag char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tpag_cod_tpag) constraint informix.pk_afctpag')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctpag from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcgcob row size = 73 number of columns = 11 index size
= 68 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcgc00483.unl number of rows = 28 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcgcob ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcob_cod_gcob serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcob_cod_rubr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcob_cod_plaz integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcob_cod_mont integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcob_cod_ccre integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcob_cod_lcre integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcob_val_gcob decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcob_cod_tprm smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcob_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcob_nom_proc char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcob_cod_star integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (gcob_cod_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('constraint informix.uc_afcgcob')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gcob_cod_gcob) constraint informix.pk_afcgcob')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcgcob from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.temporalclie row size = 4 number of columns = 1 index
size = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = tempo00484.unl number of rows = 2989 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.temporalclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.temporalclie from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcsoop row size = 12 number of columns = 3 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcso00485.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcsoop ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soop_cod_optr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soop_num_soci integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soop_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcsoop from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcescl row size = 42 number of columns = 3 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afces00486.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcescl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('escl_cod_escl smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('escl_nom_escl char(20) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('escl_sib_escl char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (escl_cod_escl) constraint informix.pk_afcescl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcescl from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afclces row size = 218 number of columns = 6 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afclc00487.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afclces ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lces_cod_lces serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lces_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lces_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lces_det_lces char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lces_fec_lces date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lces_est_adic smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (lces_cod_lces) constraint informix.pk_afclces')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afclces from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afccocu row size = 37 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcco00488.unl number of rows = 6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afccocu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cocu_cod_cocu serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cocu_sib_cocu char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cocu_des_cocu char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cocu_cod_cocu) constraint informix.pk_afccocu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afccocu from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcrban row size = 61 number of columns = 10 index size
= 71 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcrb00489.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcrban ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rban_cod_rban serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rban_cod_banc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rban_cod_tcba char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rban_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rban_num_rban char(25)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rban_sal_rban decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rban_fec_regi date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rban_est_rban smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rban_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rban_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (rban_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (rban_cod_rban) constraint informix.pk_afcrban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcrban from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdcal row size = 58 number of columns = 8 index size =
32 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdc00490.unl number of rows = 2718720 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdcal ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_fec_calf date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_divc_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_val_dcal decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_num_divc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_cod_ediv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_val_inte decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_val_deve decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (dcal_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.uc_afcdcal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdcal from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afchdpf row size = 80 number of columns = 14 index size
= 27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afchd00491.unl number of rows = 287594 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afchdpf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_cod_hdpf serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_cod_dpfi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_val_dpfi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_plz_hdpf integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_val_inte decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_val_prov decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_fec_hdpf datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_est_dpfi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_fec_venc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_tas_hdpf decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_plz_orig integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (hdpf_cod_hdpf) constraint informix.pk_afchdpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afchdpf from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacrfi row size = 294 number of columns = 9 index size
= 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacr00492.unl number of rows = 630 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacrfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crfi_cod_secu serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crfi_cod_crfi varchar(5) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crfi_des_crfi varchar(250) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crfi_por_rete decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crfi_fec_ini date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crfi_fec_fin date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crfi_ing_porc varchar(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crfi_cta_comp varchar(8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crfi_cod_form char(5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacrfi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctviv row size = 31 number of columns = 5 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctv00493.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctviv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tviv_cod_tviv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tviv_sib_tviv char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tviv_des_tviv char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tviv_est_tviv smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tviv_ban_tviv smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tviv_cod_tviv) constraint informix.pk_afctviv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctviv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afchidv row size = 45 number of columns = 10 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afchi00494.unl number of rows = 7477 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afchidv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hidv_cod_hidv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hidv_cod_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hidv_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hidv_fec_acti date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hidv_fec_acta date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hidv_fec_anti date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hidv_fec_anta date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hidv_sal_cont decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hidv_cod_eacd integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hidv_eac_ante integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (hidv_cod_hidv) constraint informix.pk_afchidv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afchidv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.comp_sal_cta row size = 92 number of columns = 8 index
size = ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = comp_00495.unl number of rows = 44 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.comp_sal_cta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nom_ccon char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sal_peri decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sal_mes_debe decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sal_mes_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cod_tcue char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.comp_sal_cta from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afchdir row size = 40 number of columns = 8 index size =
0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afchd00496.unl number of rows = 67975 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afchdir ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdir_cod_hdir serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdir_cod_divc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdir_cod_rubr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdir_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdir_val_ante decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdir_val_dirb decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdir_fec_hdir date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdir_est_hdir char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afchdir from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdagc row size = 34 number of columns = 6 index size =
36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcda00497.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdagc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dagc_cod_dagc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dagc_cod_anrl integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dagc_num_cred integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dagc_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dagc_val_envi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dagc_val_reci decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dagc_cod_dagc) constraint informix.pk_afcdagc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdagc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afchofc row size = 28 number of columns = 6 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcho00498.unl number of rows = 3232 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afchofc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hofc_cod_hofc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hofc_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hofc_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hofc_cod_ofct integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hofc_ofc_ante integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hofc_fec_hofc datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (hofc_cod_hofc) constraint informix.pk_afchofc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afchofc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaofic row size = 374 number of columns = 19 index size
= 42 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaof00499.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaofic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_nom_ofic char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_tofi char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_ciud integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_dir_ofic char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_emp_gere integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_emp_cont integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cpa_cont char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_sib_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_sib integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_ema_ofic char(80)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_tman integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_coop integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_hor_dife datetime hour to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_nom_fele char(90)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_pass_fele char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_jef_caja integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_jef_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_mon_caja decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ofic_cod_ofic) constraint informix.pk_bcaofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaofic from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.uaf1_clientes row size = 272 number of columns = 10
index size ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('= 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = uaf1_00500.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.uaf1_clientes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tide char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_nom_clie char(120)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_sib_pais char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_dir_clie char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_sib_ciud char(4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_sib_ocup char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_val_ingr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_sib_coop char(4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_fec_cort char(8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.uaf1_clientes from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.uaf2_productos row size = 60 number of columns = 8 index
size ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('= 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = uaf2_00501.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.uaf2_productos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tide char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_tip_ctas char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_num_cuet char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_sib_ofic char(8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_fec_ingr char(8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_sib_coop char(4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_fec_cort char(8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.uaf2_productos from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.uaf0_socios row size = 17 number of columns = 3 index
size = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = uaf0_00502.unl number of rows = 43 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.uaf0_socios ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.uaf0_socios from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.uaf0_socios1 row size = 17 number of columns = 3 index
size = ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = uaf0_00503.unl number of rows = 69 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.uaf0_socios1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.uaf0_socios1 from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctsco row size = 98 number of columns = 6 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcts00504.unl number of rows = 7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctsco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsco_cod_tsco serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsco_des_tsco char(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsco_sri_tsco char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsco_ban_tsco smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsco_val_tsco decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsco_cod_tcsr char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tsco_cod_tsco) constraint informix.pk_afctsco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctsco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctsis row size = 22 number of columns = 2 index size =
7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcts00505.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctsis ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsis_cod_tsis char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsis_nom_tsis char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tsis_cod_tsis) constraint informix.pk_afctsis')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctsis from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctcsr row size = 79 number of columns = 5 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctc00506.unl number of rows = 8 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctcsr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcsr_cod_tcsr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcsr_des_tcsr char(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcsr_sri_tcsr char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcsr_ban_tcsr smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcsr_cod_tcli char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tcsr_cod_tcsr) constraint informix.pk_afctcsr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctcsr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaccon1120 row size = 134 number of columns = 8 index
size = ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcacc00507.unl number of rows = 6968 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaccon1120 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ctas serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon char(15) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_nom_ccon char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_tcue char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_natu char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cla_ccon char(5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaccon1120 from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcauid row size = 34 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcau00508.unl number of rows = 7 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcauid ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('auid_cod_auid serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('auid_des_auid char(25) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('auid_cod_sib char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('auid_ban_auid smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (auid_cod_auid) constraint informix.pk_afcauid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcauid from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcgtbi row size = 119 number of columns = 8 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcgt00509.unl number of rows = 11 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcgtbi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtbi_cod_gtbi serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtbi_des_gtbi char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtbi_sib_gtbi char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtbi_ban_gtbi smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtbi_cod_ctas char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtbi_cco_deud char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtbi_cco_acre char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtbi_cco_otra char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gtbi_cod_gtbi) constraint informix.pk_afcgtbi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcgtbi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcgtti row size = 119 number of columns = 8 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcgt00510.unl number of rows = 36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcgtti ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtti_cod_gtti serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtti_des_gtti char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtti_sib_gtti char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtti_ban_gtbi smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtti_cod_ctas char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtti_cco_deud char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtti_cco_acre char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtti_cco_otra char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gtti_cod_gtti) constraint informix.pk_afcgtti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcgtti from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcliqu row size = 54 number of columns = 3 index size =
0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcli00511.unl number of rows = 108 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcliqu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('liqu_des_liqu char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('liqu_val_liqu decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('liqu_cod_tran char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcliqu from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afciinv row size = 33 number of columns = 8 index size =
24 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcii00512.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afciinv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('iinv_cod_iinv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('iinv_cod_minv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('iinv_val_iinv decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('iinv_fec_iinv date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('iinv_cod_tasi char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('iinv_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('iinv_num_docu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('iinv_cod_tdoc char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (iinv_cod_iinv) constraint informix.pk_afciinv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afciinv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcastmp row size = 34 number of columns = 9 index size =
39 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcast00513.unl number of rows = 2336 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcastmp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('stmp_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('stmp_dpv_debi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('stmp_mes_debi smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('stmp_ani_debi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('stmp_fec_debi date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('stmp_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('stmp_val_debi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('stmp_fec_serv date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('stmp_cod_didv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (stmp_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.pk_bcastmp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcastmp from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdapo row size = 21 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcda00514.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdapo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dapo_cod_dapo serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dapo_cod_anrl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dapo_cod_trcj integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dapo_val_dapo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dapo_cod_dapo) constraint informix.pk_afcdapo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdapo from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdicl row size = 362 number of columns = 6 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdi00515.unl number of rows = 12 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdicl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dicl_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dicl_des_dire char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dicl_cor_dire char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dicl_ima_croq char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dicl_usu_dicl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dicl_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dicl_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdicl from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctpsr row size = 124 number of columns = 6 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctp00516.unl number of rows = 24 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctpsr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpsr_cod_tpsr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpsr_des_tpsr char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpsr_cod_sri char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpsr_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpsr_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpsr_cod_form char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tpsr_cod_tpsr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctpsr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcasuco row size = 195 number of columns = 6 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcasu00517.unl number of rows = 25 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcasuco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('suco_cod_suco integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('suco_des_suco varchar(120) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('suco_tip_comp varchar(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('suco_ban_suco smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('suco_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('suco_sri_suco char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (suco_cod_suco) constraint informix.pk_bcasuco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcasuco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcateim row size = 203 number of columns = 25 index size
= 76 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcate00518.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcateim ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_cod_teim serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_cod_comp integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_fec_ingr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('idif_ruc_info varchar(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('suco_cod_suco integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpie_cod_tpie varchar(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_fec_pago date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpco_cod_tpco varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('diad_cod_diad varchar(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_nore_anio varchar(4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('core_cod_core varchar(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_nor_corr varchar(6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_nor_veri varchar(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_nro_idfi varchar(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_val_cif decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_raz_sopr varchar(60) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsie_cod_tsie varchar(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_baim_tar0 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_baim_iva decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('piva_cod_secu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_mon_iva decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_baim_ice decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pice_cod_pice integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('teim_mon_ice decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (teim_cod_teim) constraint informix.pk_bcateim')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcateim from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcprof row size = 63 number of columns = 5 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcpr00519.unl number of rows = 706 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcprof ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prof_cod_prof serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prof_nom_prof char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prof_sib_prof char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prof_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prof_est_prof smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (prof_cod_prof) constraint informix.pk_afcprof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcprof from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcrfpe row size = 513 number of columns = 15 index size
= 27 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcrf00520.unl number of rows = 3033 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcrfpe ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_cod_rfpe serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_nom_rfpe char(100) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_num_tele char(10) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_num_celu char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_dir_domi char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_fec_actu date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_ide_rfpe char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_ema_rfpe char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_com_rfpe char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_ban_vali smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_usu_veri integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_fec_veri date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_cli_codi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (rfpe_cod_rfpe) constraint informix.pk_afcrfpe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcrfpe from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdeop row size = 120 number of columns = 8 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcde00521.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdeop ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deop_cod_deop serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deop_cod_eope integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deop_des_deop char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deop_ban_deop smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deop_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deop_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deop_pri_deop smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deop_dws_name char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (deop_cod_deop) constraint informix.pk_afcdeop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdeop from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdecr row size = 70 number of columns = 6 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcde00522.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdecr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decr_cod_decr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decr_cod_deop integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decr_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decr_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decr_fec_ingr date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decr_nom_arch char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (decr_cod_decr) constraint informix.pk_afcdecr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdecr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcriec row size = 60 number of columns = 4 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcri00523.unl number of rows = 37 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcriec ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('riec_cod_riec serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('riec_des_riec char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('riec_ban_riec smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('riec_cod_ineg integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (riec_cod_riec) constraint informix.pk_afcriec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcriec from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdrie row size = 149 number of columns = 11 index size
= 40 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdr00524.unl number of rows = 7282 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdrie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drie_cod_drie serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drie_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drie_cod_riec integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drie_cod_ineg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drie_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drie_fec_actu date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drie_val_drie decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drie_des_drie char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drie_est_drie smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drie_ref_drie char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drie_fec_drie date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (drie_cod_riec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (drie_cod_drie) constraint informix.pk_afcdrie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdrie from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdrso row size = 149 number of columns = 11 index size
= 40 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdr00525.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdrso ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drso_cod_drie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drso_cod_socr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drso_cod_riec integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drso_cod_ineg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drso_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drso_fec_actu date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drso_val_drso decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drso_des_drso char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drso_est_drso smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drso_ref_drso char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drso_fec_drso date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (drso_cod_drie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdrso from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcrbso row size = 61 number of columns = 10 index size
= 22 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcrb00526.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcrbso ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbso_cod_rban integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbso_cod_banc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbso_cod_tcba char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbso_cod_socr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbso_num_rbso char(25)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbso_sal_rbso decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbso_fec_regi date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbso_est_rbso smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbso_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbso_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (rbso_cod_rban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcrbso from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcddri row size = 143 number of columns = 8 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdd00527.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcddri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddri_cod_ddri serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddri_cod_drie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddri_val_ddri decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddri_des_ddri char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddri_est_ddri smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddri_ref_ddri char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddri_fec_ddri date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddri_val_pond char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ddri_cod_ddri) constraint informix.pk_afcddri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcddri from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdcre row size = 217 number of columns = 6 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdc00528.unl number of rows = 31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdcre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcre_cod_dcre serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcre_des_dcre char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcre_sib_dcre char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcre_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcre_est_dcre smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcre_cod_ccre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dcre_cod_dcre) constraint informix.pk_afcdcre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdcre from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afccalr row size = 41 number of columns = 6 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcca00529.unl number of rows = 26 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afccalr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calr_cod_calr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calr_syp_calr char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calr_mdy_calr char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calr_fit_calr char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calr_sib_calr char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (calr_cod_calr) constraint informix.pk_afccalr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afccalr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdidv row size = 55 number of columns = 10 index size
= 53 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdi00530.unl number of rows = 8964 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdidv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('didv_cod_didv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('didv_num_didv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('didv_cod_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('didv_cod_edid integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('didv_fec_venc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('didv_val_ahor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('didv_val_paga decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('didv_val_proy decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('didv_fec_paga date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('didv_cod_rubr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (didv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (didv_cod_didv) constraint informix.pk_afcdidv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdidv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdpta row size = 224 number of columns = 14 index size
= 33 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdp00531.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdpta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpta_cod_dpta serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpta_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpta_num_tarj char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpta_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpta_fec_venc date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpta_nom_tarj char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpta_cod_tasi char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpta_cup_dpta decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpta_ban_dpta smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpta_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpta_fec_reno date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpta_usu_reno integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpta_obs_dpta char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpta_cod_ttad integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dpta_cod_dpta) constraint informix.pk_afcdpta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdpta from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcencr row size = 46 number of columns = 9 index size =
36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcen00532.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcencr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('encr_cod_encr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('encr_num_cred integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('encr_cod_dpvi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('encr_val_encr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('encr_por_encr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('encr_fec_encr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('encr_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('encr_fec_modi date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('encr_cod_picn integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (encr_cod_encr) constraint informix.pk_afcencr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcencr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadpfi0331 row size = 476 number of columns = 19 index
size = ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadp00533.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadpfi0331 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_dpfi serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_num_dpfi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_caja char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_dpfi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_tas_dpfi decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_val_dpfi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_fppf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_npg_inte integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_edpf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_fec_deve date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_det_dpfi char(300)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_nom_bene char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_recl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_por_rete decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadpfi0331 from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaesep row size = 487 number of columns = 11 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaes00534.unl number of rows = 56 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaesep ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esep_cod_esep serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esep_des_grup char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esep_des_sgru char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esep_des_desc char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esep_val_esep decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esep_cod_ejer integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esep_cod_peri integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esep_ejer_ante integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esep_peri_ante integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esep_fec_esep date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esep_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (esep_cod_esep) constraint informix.pk_bcaesep')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaesep from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatcdv row size = 137 number of columns = 25 index size
= 99 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatc00535.unl number of rows = 12 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_tcdv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_tcap integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_fcin integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_ttpf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_fec_crea date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_fec_udev date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_atcd integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_des_tcdv char(40) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_aho_mini decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cco_acti integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cco_prov integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cco_gast integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cco_inac integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cco_dxcf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_mod_oper char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cal_dias smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_fec_upgi date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_ctr_trab integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_val_inic decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_bse_inac smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_est_tcdv smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_usu_modi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_fec_modi date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_tpdv integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tcdv_cod_tcdv) constraint informix.pk_bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatcdv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcthtas row size = 22 number of columns = 5 index size
= 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcth00536.unl number of rows = 372 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcthtas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('htas_cod_htas serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('htas_ini_htas decimal(4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('htas_fin_htas decimal(4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('htas_fec_htas datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('htas_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcthtas from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctcom row size = 56 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctc00537.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcom_cod_tcom serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcom_des_tcom char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcom_ban_tcom smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tcom_cod_tcom) constraint informix.pk_afctcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctcom from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdsco row size = 25 number of columns = 5 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcds00538.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdsco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsco_cod_dsco serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsco_cod_socr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsco_cod_tcom integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsco_fec_dsco date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsco_val_dsco decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dsco_cod_dsco) constraint informix.pk_afcdsco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdsco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcarefi row size = 413 number of columns = 22 index size
= 35 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcare00539.unl number of rows = 2760 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcarefi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_cod_refi serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_fec_ingr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_ruc_coop varchar(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('setr_cod_setr varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_num_iden varchar(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpco_cod_tpco varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_num_sees varchar(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_num_sepe varchar(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_num_secu varchar(7)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_num_auto char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_fec_emis datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_per_exec integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_cod_pgpf integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_ban_refi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_ban_cele smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_nom_arch char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_ban_ambt smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_ban_emis smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_ban_ocon char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_cla_acce char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_cel_refi smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (refi_cod_refi) constraint informix.pk_bcarefi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcarefi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaprdr row size = 604 number of columns = 33 index size
= 75 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapr00540.unl number of rows = 362 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaprdr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_cod_prdr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_ide_prdr varchar(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_cod_ccre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_cod_intv char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_nom_prdr varchar(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_con_prdr varchar(80)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_dir_prdr varchar(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_tel_prdr varchar(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_fax_prdr varchar(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_paw_prdr varchar(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_ema_prdr varchar(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_tas_prdr decimal(2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_num_esta varchar(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_num_loca varchar(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_num_auto varchar(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_num_seci varchar(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_num_secf varchar(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_num_secu varchar(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_fec_venc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_cod_lcre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_fec_cort date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_cod_tpco varchar(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_cod_tide char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_num_colu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_nom_colu char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_num_crco char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_nat_juri char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_ban_fele smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_cod_suco integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_cod_crfi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_ban_cesp smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_ban_rete smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (prdr_ban_rete IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (prdr_cod_prdr) constraint informix.pk_bca_prove')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaprdr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcpotv row size = 105 number of columns = 12 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcpo00541.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcpotv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('potv_cod_potv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('potv_des_potv char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('potv_cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('potv_ban_potv smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('potv_fec_potv date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('potv_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('potv_val_potv decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('potv_por_potv decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('potv_ban_tipo smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('potv_ban_iva smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('potv_ban_ice smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('potv_ban_irbp smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (potv_cod_potv) constraint informix.pk_afcpotv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcpotv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcacoop row size = 540 number of columns = 28 index size
= 34 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaco00542.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcacoop ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_cod_coop integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_nom_coop char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_sib_coop smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_sib_codi char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_logotipo byte')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_ruc_coop char(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_num_acmi varchar(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_cod_tiin integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_ide_repr varchar(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_ide_cont varchar(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_rep_empl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_con_empl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_fi1_resp char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_fi2_resp char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_fi3_resp char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_fec_acmi date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_cod_segm char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_cod_tsis char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_cod_tsco integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_cod_sri char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_ban_cele integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_con_espe char(5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_pag_webc char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_ema_mark char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_lim_indi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 15.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_lim_vincu decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 10.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_val_sbu decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 400.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coop_age_rete char(2) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''SI''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (coop_age_rete IN (''SI'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (coop_cod_coop) constraint informix.pk_bcacoop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcacoop from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcpeps row size = 481 number of columns = 9 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcpe00543.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcpeps ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peps_cod_peps serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peps_ide_peps char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peps_nom_peps char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peps_nom_prof char(300)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peps_nom_enti char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peps_est_peps char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peps_fec_peps date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peps_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peps_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (peps_cod_peps) constraint informix.pk_afcpeps')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcpeps from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcclpe row size = 16 number of columns = 4 index size =
31 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afccl00544.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcclpe ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clpe_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clpe_cod_peps integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clpe_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clpe_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (clpe_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcclpe from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afccatc row size = 32 number of columns = 8 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcca00545.unl number of rows = 244 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afccatc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catc_cod_catc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catc_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catc_tcl_ante integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catc_tcl_actu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catc_num_ante integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catc_num_actu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catc_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catc_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (catc_cod_catc) constraint informix.pk_afccatc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afccatc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdtlv row size = 233 number of columns = 20 index size
= 18 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdt00546.unl number of rows = 6852 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdtlv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_cod_dtlv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_cod_tlve integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_cod_dcom integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_cod_prin char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_des_dtlv char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_val_dtlv decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_cod_iva integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_por_iva decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_val_iva decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_cod_ice integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_por_ice decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_val_ice decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_cod_irbp integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_por_irbp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_val_irbp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_num_dtlv decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_val_unit decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_cod_tipo char(3) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''VTA''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_ban_iva char(1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_val_desc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (dtlv_ban_iva IN (''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dtlv_cod_dtlv) constraint informix.pk_afcdtlv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdtlv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdccr row size = 121 number of columns = 11 index size
= 26 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdc00547.unl number of rows = 121 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdccr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dccr_cod_dccr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dccr_cod_ccre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dccr_num_para integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dccr_ctas_deud char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dccr_ctas_acre char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dccr_des_dccr char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dccr_ban_dccr smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dccr_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dccr_fec_modi date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dccr_cod_eope char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dccr_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (dccr_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dccr_cod_dccr) constraint informix.pk_afcdccr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdccr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.uaf4_bancos row size = 225 number of columns = 9 index
size = ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = uaf4_00548.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.uaf4_bancos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_nom_coop char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_num_cuet char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_sib_pais char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_sib_ofic char(9)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_sib_ciud char(4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_cod_tran char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_num_tran char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_val_uaf decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.uaf4_bancos from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatlve row size = 692 number of columns = 45 index size
= 35 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatl00549.unl number of rows = 6834 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatlve ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_cod_tlve serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_cod_comp integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_fec_ingr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_ruc_coop varchar(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_cod_setr varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_num_idpr varchar(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_cod_tpco varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_fec_reco date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_num_coem integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_fec_emis date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_baim_tar0 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_iva_pres varchar(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_baim_iva decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_cod_secu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_mon_iva decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_baim_ice decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_cod_pice integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_mon_ice decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_mon_ivbi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_cod_pibi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_ret_ivbi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_mon_ivse decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_ret_ivse decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_ret_ice decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_num_sees char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_num_sepe char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_fec_ccoe datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_fec_acoe date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_num_auto char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_ban_cele smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_nom_arch char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_ret_fecr date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_ret_sees char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_ret_sepe char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_ret_secu char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_ret_auto char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_fec_feem date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_ban_ambt smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_ban_emis smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_ban_ocon char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_cla_acce char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_cel_tlve smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_cod_modu integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_cod_tpsr integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tlve_cod_tlve) constraint informix.pk_bcatlve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatlve from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.uaf3_transacciones row size = 375 number of columns = 23
index ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('size = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = uaf3_00550.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.uaf3_transacciones ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tide char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_fec_tran char(8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_num_tran char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_num_ctas char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_val_debi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_val_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_val_efec decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_val_chqs decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_val_tota decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_sib_mone char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_cod_tran char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_nom_clie char(120)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_sib_pais char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_nom_coop char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_num_cuet char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_sib_ofic char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_sib_ciud char(6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_sib_coop char(4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_fec_cort char(8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_cod_prod char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_cod_csw char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('uaf_imp_isd integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.uaf3_transacciones from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdcam row size = 39 number of columns = 7 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdc00551.unl number of rows = 246 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdcam ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcam_cod_dcam serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcam_cod_deef integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcam_fec_dcam date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcam_cod_mcdv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcam_cod_modu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcam_num_deno char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcam_cod_camb integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dcam_cod_dcam) constraint informix.pk_afcdcam')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdcam from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctope row size = 81 number of columns = 5 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcto00552.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctope ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tope_cod_tope serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tope_des_tope char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tope_sib_tope char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tope_cod_segm char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tope_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tope_cod_tope) constraint informix.pk_afctope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctope from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcctvc row size = 24 number of columns = 6 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcct00553.unl number of rows = 260 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcctvc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctvc_cod_ctvc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctvc_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctvc_tvi_ante integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctvc_cod_tvin integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctvc_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctvc_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ctvc_cod_ctvc) constraint informix.pk_afcctvc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcctvc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcccxc row size = 28 number of columns = 6 index size =
8 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afccc00554.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcccxc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccxc_fec_ccxc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccxc_lim_infe integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccxc_lim_supe integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccxc_est_calf char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccxc_val_pond decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccxc_cod_modu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (ccxc_est_calf) constraint informix.idx_afcccxc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcccxc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcausua row size = 187 number of columns = 9 index size
= 25 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaus00555.unl number of rows = 28 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcausua ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_cod_usua serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_cod_empl integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_cod_perf char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_nom_usua char(25) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_passwd char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_fec_uac date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default today')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_num_agen integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_ban_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_imp_pred char(100) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (usua_cod_empl) constraint informix.uc_bcausua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (usua_num_agen >= 0 ) constraint informix.ckx_bcausua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (usua_cod_usua) constraint informix.pk_bcausua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcausua from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaorec row size = 146 number of columns = 11 index size
= 26 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaor00556.unl number of rows = 1064 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaorec ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orec_cod_orec serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orec_cod_ooem char(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orec_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orec_nom_bene char(100) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orec_val_orec decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orec_fec_orec datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orec_ctr_emis smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orec_cod_chqs integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orec_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orec_ctr_migr integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orec_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaorec from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcfval_103 row size = 248 number of columns = 15 index
size = ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcfv00557.unl number of rows = 10 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcfval_103 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cod_fval serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_101 smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_102 smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_104 char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_202 char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_201 char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_302 char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_303 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_304 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_307 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_198 char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_199 char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_fec_fval date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cod_form char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (fval_cod_fval) constraint informix.pk_afcfval_103')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcfval_103 from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcelab row size = 138 number of columns = 17 index size
= 66 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcel00558.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcelab ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_cod_elab serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_nom_elab char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_ide_elab char(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_sum_elab char(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_ban_elab smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_val_elab decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_est_elab integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_ciud_elab char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_cod_clie integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1 not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_fec_subi date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_mes_carg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_anio_carg integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_val_paga decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_usu_paga integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elab_fec_paga date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (elab_mes_carg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.uc_afcelab')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (elab_est_elab IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (elab_cod_elab) constraint informix.pk_afcelab')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcelab from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapibi row size = 42 number of columns = 7 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapi00559.unl number of rows = 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapibi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pibi_cod_pibi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pibi_des_pibi varchar(10) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pibi_cta_comp varchar(8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pibi_cta_vent varchar(8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pibi_ban_tipo varchar(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pibi_cod_sri char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pibi_ban_cesp char(5) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (pibi_cod_pibi) constraint informix.pk_bcapibi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapibi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afccaca row size = 143 number of columns = 20 index size
= 13 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcca00560.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afccaca ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_fec_cacc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_cod_mcco integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_sal_mcco decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_est_cacc char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_val_prov decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_cod_serv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_val_acti decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_val_venc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_val_deve decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_dias_venc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_val_dema decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_val_cast decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_pro_cons decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_val_capt decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_fec_serv datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_num_cuot integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_val_mora decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_por_preq decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacc_por_pcon decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cacc_fec_cacc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afccaca from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdssc row size = 38 number of columns = 7 index size =
36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcds00561.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdssc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dssc_cod_dssc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dssc_cod_socr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dssc_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dssc_fec_dssc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dssc_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dssc_val_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dssc_sal_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dssc_cod_dssc) constraint informix.pk_afcdssc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdssc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaopag row size = 15974 number of columns = 16 index
size = 9 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaop00562.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaopag ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin1_opag char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin2_opag char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin3_opag char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin4_opag char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin5_opag char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin6_opag char(1370)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin7_opag char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin8_opag char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin9_opag char(1500)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin10_opag char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin11_opag char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin12_opag char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin13_opag char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin14_opag char(600)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_lin15_opag char(1500)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opag_num_for integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaopag from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcgrup row size = 122 number of columns = 7 index size
= 27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcgr00563.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcgrup ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grup_cod_grup serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grup_num_grup integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grup_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grup_fec_grup date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grup_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grup_ban_grup smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grup_des_grup char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (grup_cod_grup) constraint informix.pk_afcgrup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcgrup from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctgru row size = 68 number of columns = 6 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctg00564.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctgru ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgru_cod_tgru serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgru_des_tgru char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgru_ban_tgru smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgru_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgru_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgru_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tgru_cod_tgru) constraint informix.pk_afctgru')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctgru from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcgcli row size = 22 number of columns = 6 index size =
49 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcgc00565.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcgcli ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcli_cod_grup integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcli_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcli_cod_tgru integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcli_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcli_fec_gcli date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcli_ban_gcli smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gcli_cod_grup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcgcli from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadetd row size = 94 number of columns = 11 index size
= 54 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcade00566.unl number of rows = 886 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadetd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('detd_cod_detd serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('detd_cod_rubc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('detd_num_cred integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('detd_cod_divc integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('detd_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('detd_des_detd varchar(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('detd_fec_ingr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('detd_val_detd decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('detd_ban_detd smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('detd_usu_modi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('detd_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (detd_cod_detd) constraint informix.pk_bcadetd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadetd from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcgcab row size = 12 number of columns = 3 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcgc00567.unl number of rows = 1088 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcgcab ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcab_cod_gcab serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcab_fec_gcab date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcab_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gcab_cod_gcab) constraint informix.pk_afcgcab')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcgcab from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcgccr row size = 545 number of columns = 31 index size
= 18 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcgc00568.unl number of rows = 146918 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcgccr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_cod_gccr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_cod_gcab integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_num_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_ape_clie char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_nom_clie char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_dir_clie char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_nom_sect char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_num_tele char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_num_cuot integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_est_cred char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_val_capi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_val_inte decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_val_otro decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_val_mora decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_val_deud decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_fec_venc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_num_dias integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_cod_dest integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_cod_vinc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_usu_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_cod_lcre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_cod_ofct integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_cod_ccre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_cap_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_sal_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_cod_depe integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_des_gara char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_cod_eope integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_est_calf char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gccr_cod_gccr) constraint informix.pk_afcgccr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcgccr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcgtes row size = 51 number of columns = 7 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcgt00569.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcgtes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtes_cod_gtes serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtes_abr_gtes char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtes_des_gtes char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtes_ban_gtes smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtes_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtes_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtes_rec_gtes integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gtes_cod_gtes) constraint informix.pk_afcgtes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcgtes from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcgdco row size = 1057 number of columns = 13 index
size = 45 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcgd00570.unl number of rows = 13512 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcgdco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_cod_gdco serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_cod_esta integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_fec_gdco datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_fec_comp date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_cod_tipo integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_det_gdco char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_val_gdco decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_ant_gtes integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_fec_ante date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_usu_ante integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gdco_cod_gdco) constraint informix.pk_afcgdco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcgdco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdrcp row size = 57 number of columns = 9 index size =
44 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdr00571.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdrcp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drcp_cod_drco serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drcp_cod_mcpa integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drcp_cod_rubr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drcp_num_drcp integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drcp_fec_venc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drcp_tas_drcp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drcp_val_drcp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drcp_cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drcp_cod_ediv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (drcp_cod_mcpa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (drcp_cod_ediv IN (1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (drcp_cod_drco) constraint informix.pk_afcdrcp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdrcp from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afclcos row size = 182 number of columns = 8 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afclc00572.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afclcos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcos_cod_lcos serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcos_tid_lcos char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcos_ide_lcos char(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcos_nom_lcos char(150) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcos_ban_lcos smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcos_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcos_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcos_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (lcos_ban_lcos IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (lcos_cod_lcos) constraint informix.pk_afclcos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afclcos from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctpdv row size = 62 number of columns = 5 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctp00573.unl number of rows = 10 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctpdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpdv_cod_tpdv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpdv_des_tpdv char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpdv_sib_tpdv char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpdv_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpdv_ban_tpdv smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (tpdv_ban_tpdv IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tpdv_cod_tpdv) constraint informix.pk_afctpdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctpdv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcccdv row size = 62 number of columns = 5 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afccc00574.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcccdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccdv_cod_ccdv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccdv_des_ccdv char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccdv_sib_ccdv char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccdv_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccdv_ban_ccdv smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (ccdv_ban_ccdv IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ccdv_cod_ccdv) constraint informix.pk_afcccdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcccdv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcttad row size = 62 number of columns = 5 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctt00575.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcttad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttad_cod_ttad serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttad_des_ttad char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttad_sib_ttad char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttad_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttad_ban_ttad smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (ttad_ban_ttad IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ttad_cod_ttad) constraint informix.pk_afcttad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcttad from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaemdp row size = 47 number of columns = 11 index size
= 54 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaem00576.unl number of rows = 39 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaemdp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emdp_cod_empl integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emdp_cod_depa integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emdp_cod_tdpd integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emdp_cod_ereg integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emdp_cod_jefe smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emdp_fec_ing date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emdp_fec_sal date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emdp_fec_sbs date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emdp_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emdp_cod_emdp serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emdp_val_suel decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (emdp_cod_emdp) constraint informix.pk_bcaemdp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaemdp from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdisc row size = 156 number of columns = 10 index size
= 18 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdi00577.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdisc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('disc_cod_disc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('disc_des_disc char(130) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('disc_ban_disc smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('disc_sib_disc char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('disc_ban_porc smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('disc_ban_tide smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('disc_ban_iden smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('disc_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('disc_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('disc_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (disc_ban_disc IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (disc_sib_disc IN (''01'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (disc_cod_disc) constraint informix.pk_afcdisc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdisc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctcem row size = 172 number of columns = 8 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctc00578.unl number of rows = 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctcem ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcem_cod_tcem serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcem_des_tcem char(150) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcem_sib_tcem char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcem_ban_tcem smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcem_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcem_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcem_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcem_ban_fina smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (tcem_ban_tcem IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (tcem_ban_fina IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tcem_cod_tcem) constraint informix.pk_afctcem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctcem from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcemof row size = 53 number of columns = 6 index size =
40 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcem00579.unl number of rows = 24 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcemof ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emof_cod_emof serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emof_cod_empl integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emof_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emof_des_emof char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emof_por_comp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 100.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emof_ban_prin smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (emof_cod_empl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (emof_ban_prin IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (emof_cod_emof) constraint informix.pk_afcemof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcemof from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctres row size = 50 number of columns = 7 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctr00580.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctres ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tres_cod_tres serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tres_des_tres char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tres_sib_tres char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tres_ban_tres smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tres_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tres_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tres_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (tres_sib_tres IN (''01'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (tres_ban_tres IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tres_cod_tres) constraint informix.pk_afctres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctres from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcpsms row size = 736 number of columns = 15 index size
= 22 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcps00581.unl number of rows = 6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcpsms ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_cod_psms serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_cod_smse integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_est_psms smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_cod_plan smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_nom_plan char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_nom_var1 char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_nom_var2 char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_nom_var3 char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_nom_var4 char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_nom_clas char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_txt_var1 char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_txt_var2 char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_txt_var3 char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_txt_var4 char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_cod_gtes integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (psms_cod_smse')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (psms_cod_psms) constraint informix.pk_afcpsms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcpsms from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afclsms row size = 73 number of columns = 10 index size
= 27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcls00582.unl number of rows = 11112 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afclsms ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lsms_cod_lsms serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lsms_fec_lsms date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lsms_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lsms_cod_plan smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lsms_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lsms_num_tele char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lsms_res_lsms smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lsms_des_lsms char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lsms_fec_serv datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lsms_num_cred char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (lsms_cod_lsms) constraint informix.pk_afclsms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afclsms from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaagar row size = 23 number of columns = 7 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcaag00583.unl number of rows = 1052 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaagar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('agar_cod_agar serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('agar_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('agar_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('agar_fec_agar date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('agar_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('agar_ope_agar char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('agar_sib_agar char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check ((agar_ope_agar = ''I'' ) OR (agar_ope_agar = ''D'' ) )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (agar_cod_agar) constraint informix.pk_bcaagar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaagar from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcserv row size = 142 number of columns = 15 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcse00584.unl number of rows = 1 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcserv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_cod_serv serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_des_serv char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_cco_gast integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_cco_prov integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_cco_ingr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_usu_perm char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_est_serv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_dia_serv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_num_cuot integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_cod_tasi char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_val_cuot decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_ban_obli smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('serv_num_prio integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (serv_cod_serv) constraint informix.pk_afcserv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcserv from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afclpwe row size = 31 number of columns = 4 index size =
0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afclp00585.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afclpwe ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lpwe_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lpwe_fec_lpwe datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lpwe_ban_soci integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lpwe_ip_lpwe char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afclpwe from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afchtso row size = 118 number of columns = 7 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcht00586.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afchtso ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('htso_cod_htso serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('htso_des_htso char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('htso_est_htso integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('htso_fec_htso date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('htso_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('htso_usu_resp char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('htso_tip_htso char(2) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''1''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (htso_cod_htso) constraint informix.pk_afchtso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afchtso from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afchere row size = 60 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afche00587.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afchere ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('here_cod_here serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('here_des_here char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('here_est_here smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('here_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (here_cod_here) constraint informix.pk_afchere')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afchere from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afchreq row size = 1128 number of columns = 15 index
size = 54 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afchr00588.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afchreq ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_cod_hreq serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_cod_htso integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_fec_hreq datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_usu_asig integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_ema_requ char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_tel_requ char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_pri_hreq integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_des_hreq char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_est_hreq integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_fec_creq datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_usu_treq integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_est_conf smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_est_entr smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hreq_url_crea char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (hreq_cod_hreq) constraint informix.pk_afchreq')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afchreq from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afchdre row size = 1042 number of columns = 10 index
size = 45 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afchd00589.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afchdre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdre_cod_hdre serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdre_cod_hreq integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdre_num_deta smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdre_cod_htso integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdre_des_hdre char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdre_fec_hdre datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdre_usu_hdre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdre_fec_fina datetime year to second not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdre_usu_fina integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdre_est_hdre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (hdre_cod_hdre) constraint informix.pk_afchdre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afchdre from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcgaul row size = 46 number of columns = 9 index size =
36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcga00590.unl number of rows = 132 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcgaul ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gaul_cod_gaul serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gaul_num_gtia integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gaul_fec_gaul date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gaul_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gaul_val_gaul decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gaul_cod_dpfi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gaul_val_dpfi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gaul_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gaul_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (gaul_cod_gaul) constraint informix.pk_afcgaul')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcgaul from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcfval row size = 1442 number of columns = 149 index
size = 9 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcfv00591.unl number of rows = 6 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcfval ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cod_fval serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_31 char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_101 smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_102 smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_104 char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_202 char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_201 char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_411 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_401 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_421 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_402 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_412 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_422 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_423 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_424 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_413 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_403 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_414 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_404 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_405 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_415 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_406 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_416 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_407 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_417 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_418 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_408 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_429 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_409 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_419 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_431 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_441 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_442 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_453 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_443 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_454 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_444 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_434 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_480 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_481 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_482 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_483 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_484 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_485 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_499 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_510 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_500 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_520 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_501 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_521 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_511 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_512 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_502 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_522 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_513 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_503 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_523 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_514 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_504 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_524 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_515 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_505 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_525 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_526 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_527 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_506 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_516 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_507 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_517 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_508 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_518 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_509 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_519 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_529 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_541 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_531 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_532 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_542 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_543 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_544 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_554 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_535 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_545 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_555 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_563 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_564 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_601 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_602 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_603 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_604 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_605 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_606 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_607 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_608 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_609 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_610 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_611 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_612 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_613 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_614 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_615 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_617 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_618 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_619 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_620 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_621 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_699 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_721 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_723 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_725 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_727 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_729 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_731 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_799 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_800 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_801 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_859 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_890 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_897 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_898 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_899 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_880 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_902 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_903 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_904 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_999 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_905 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_906 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_907 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_925 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_908 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_910 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_912 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_909 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_911 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_913 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_915 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_918 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_916 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_919 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_917 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_920 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_198 char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_199 char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_922 integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cam_921 integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_fec_fval date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cod_form char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (fval_cod_fval) constraint informix.pk_afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcfval from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadfcr row size = 135 number of columns = 21 index size
= 137 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadf00592.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadfcr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_cod_dfcr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_des_dfcr char(30) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_cap_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_tas_cred decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_num_cuot integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_cod_intv char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_cod_dtcr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_cod_dcre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_por_segd decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_cod_tcse char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_cod_tamo integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_cod_ccre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_cod_mone integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_cod_lcre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_cod_eope integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_cod_ocup char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_ban_dfcr smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_dia_calc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcr_cod_ocu1 char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (dfcr_des_dfcr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dfcr_cod_dfcr) constraint informix.pk_bcadfcr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadfcr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcrfca row size = 138 number of columns = 10 index size
= 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcrf00593.unl number of rows = 23 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcrfca ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfca_cod_rfca serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfca_ani_rfca integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfca_per_rfca integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfca_gru_rfca char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfca_des_fcaj char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfca_val_rfca decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfca_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfca_fec_serv date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfca_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfca_num_rfca integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcrfca from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctlnc row size = 460 number of columns = 30 index size
= 27 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctl00594.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctlnc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_cod_tlnc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_cod_comp integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_fec_ingr date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_ruc_coop char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_cod_setr char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_num_idpr char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_cod_tpco char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_num_sees char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_num_sepe char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_num_secu char(9)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_num_auto char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_fec_auto datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_cod_tlve integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_tlv_secu char(17)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_mod_tpco char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_fec_tlve date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_bas_impo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_val_impu decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_ban_cele smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_usu_envi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_nom_arch char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_ban_ambt smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_ban_emis smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_ban_ocon char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_cla_acce char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_cel_tlnc smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_cod_tipo char(3) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''VTA''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_cod_tpsr integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlnc_cod_piva integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tlnc_cod_tlnc) constraint informix.pk_afctlnc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctlnc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcddic row size = 89 number of columns = 12 index size
= 17 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdd00595.unl number of rows = 13152773 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcddic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_num_divc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_fec_calf date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_fec_divc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_cod_ediv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_cap_divc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_int_plaz decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_int_deve decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_val_mora decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_val_segd decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_val_otro decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ddic_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcddic from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdtlc row size = 232 number of columns = 14 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdt00596.unl number of rows = 4946 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdtlc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_cod_dtlc serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_cod_tlco integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_cod_prod char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_det_dtlc char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_can_prod decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_cod_ctas integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_val_dtlc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_val_desc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_ban_iva char(1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_cod_iva integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_mon_iva decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_cod_reti integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_tip_rete char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_mon_rete decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (dtlc_ban_iva IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dtlc_cod_dtlc) constraint informix.pk_afcdtlc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdtlc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdtre row size = 117 number of columns = 14 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdt00597.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdtre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtre_cod_dtre serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtre_cod_tlco integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtre_cod_tide char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtre_ide_idpr char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtre_cod_pais char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtre_cod_tpco char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtre_num_sees char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtre_num_sepe char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtre_num_secu char(9)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtre_fec_dtre date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtre_num_auto char(49)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtre_val_dtre decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtre_cod_iva integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtre_mon_iva decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dtre_cod_dtre) constraint informix.pk_afcdtre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdtre from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afclimr row size = 716 number of columns = 23 index size
= 27 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcli00598.unl number of rows = 19 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afclimr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_cod_limr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_des_limr char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_obs_limr char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_for_calc char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_cod_dmon integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_ani_limr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_mes_limr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_def_lim1 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_def_lim2 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_def_lim3 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_def_lim4 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_def_lim5 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_fec_defi date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_fec_apro date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_usu_apro integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_act_apro char(25)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_dwo_name char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_dwo_limr char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_pre_empl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_rep_empl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_ban_limr smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (limr_cod_limr) constraint informix.pk_afclimr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afclimr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcvind row size = 60 number of columns = 10 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcvi00599.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcvind ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vind_cod_vind serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vind_cod_indi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vind_val_indi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vind_ani_indi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vind_mes_indi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vind_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vind_fec_vind date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vind_val_nume decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vind_val_deno decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vind_val_vola decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (vind_cod_vind) constraint root.pk_afcvind')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcvind from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcaindi row size = 4552 number of columns = 16 index
size = 18 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcain00600.unl number of rows = 20 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcaindi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_cod_indi serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tind_cod_tind integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_nom_indi varchar(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_nom1_indi varchar(100) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_for1_indi char(1000) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_nom2_indi varchar(100) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_for2_indi char(1000) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_des_indi varchar(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_val_indi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_for1_resp char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_for2_resp char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_val_for1 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_val_for2 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_ban_indi smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_val_tend decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0.0000')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_ban_tend smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (indi_cod_indi) constraint informix.pk_bcaindi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcaindi from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afccavo row size = 204 number of columns = 26 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcca00601.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afccavo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_cod_cavo serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_num_cavo integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_fec_cavo date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_fon1 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_cal1 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_pro1 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_fon2 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_cal2 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_pro2 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_fon3 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_cal3 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_pro3 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_fon4 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_cal4 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_pro4 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_fon5 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_cal5 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_pro5 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_fec_serv date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_fec_repr date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_med1 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_med2 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_med3 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_med4 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cavo_val_med5 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cavo_cod_cavo) constraint informix.pk_afccavo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afccavo from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcband row size = 43 number of columns = 10 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcba00602.unl number of rows = 8 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcband ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('band_cod_band serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('band_val_inic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('band_val_fina integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('band_val_band decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('band_ban_band smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('band_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('band_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('band_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('band_por_gast integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('band_por_ingr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (band_cod_band) constraint informix.pk_afcband')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcband from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcbrec row size = 80 number of columns = 8 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcbr00603.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcbrec ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brec_cod_brec serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brec_val_brec decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brec_des_brec char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brec_cod_ineg integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brec_val_band integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brec_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brec_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brec_esc_brec char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (brec_cod_brec) constraint informix.pk_afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcbrec from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcbrco row size = 139 number of columns = 14 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcbr00604.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcbrco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brco_cod_brco serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brco_val_7 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brco_val_15 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brco_val_30 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brco_val_60 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brco_val_90 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brco_val_180 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brco_val_360 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brco_val_99999 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brco_des_brco char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brco_cod_ineg integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brco_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brco_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('brco_esc_brco char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (brco_cod_brco) constraint informix.pk_afcbrco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcbrco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcbprm row size = 21 number of columns = 4 index size =
17 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcbp00605.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcbprm ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bprm_val_mora decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bprm_dia_bprm integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bprm_mes_bprm integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bprm_ani_bprm integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (bprm_dia_bprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcbprm from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afchicr row size = 171 number of columns = 16 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afchi00606.unl number of rows = 130 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afchicr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_cod_hicr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_des_ecre char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_des_ccre char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_fec_ultp date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_val_pago decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_fec_venc decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_cap_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_des_lcre char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_cod_calf char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_dia_venc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_val_inte decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_val_mora decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_val_otro decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (hicr_cod_hicr) constraint informix.pk_afchicr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afchicr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcbcos row size = 23 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcbc00607.unl number of rows = 78549 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcbcos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcos_cod_bcos serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcos_ide_bcos char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcos_ban_bcos smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcos_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (bcos_cod_bcos) constraint informix.pk_afcbcos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcbcos from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcsigc row size = 86 number of columns = 6 index size =
0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcsi00608.unl number of rows = 35 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcsigc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sigc_des_tcdv char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sigc_des_sigc char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sigc_cod_tcdv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sigc_val_disp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sigc_val_cont decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sigc_num_sigc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcsigc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afccode row size = 80 number of columns = 8 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcco00609.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afccode ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('code_cod_code serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('code_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('code_val_code decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('code_cod_tipo char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('code_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('code_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('code_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('code_msj_code char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (code_cod_code) constraint informix.pk_afccode')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afccode from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcatlco row size = 1047 number of columns = 69 index
size = 61 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcatl00610.unl number of rows = 4808 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcatlco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_cod_tlco serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_cod_comp integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_fec_ingr date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_cod_usua integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ruc_coop varchar(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('suco_cod_suco integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_dev_iva varchar(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('setr_cod_setr varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_num_idpr varchar(13) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpco_cod_tpco varchar(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_fec_reco date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_num_sees varchar(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_num_sepe varchar(3) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_num_seco char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_fec_emis date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_num_auto varchar(49)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_fec_cadu date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_baim_tar0 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_baim_iva decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('piva_cod_secu integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_mon_iva decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_baim_ice decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pice_cod_pice integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_mon_ice decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_mon_ivbi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pibi_cod_pibi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ret_ivbi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_mon_ivse decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pise_cod_pise integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ret_ivse decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ret_sees varchar(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ret_sepe varchar(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ret_secu varchar(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ret_auto char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ret_feem datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_com_ncnd varchar(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_fec_como date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ncnd_sees varchar(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ncnd_sepe varchar(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ncnd_secu varchar(7)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ncnd_auto varchar(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_con_sust varchar(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_mon_tron decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_mon_trgr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_cod_dcom integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_pag_loca char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_cod_pais char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_apl_codt char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_pag_esrn char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_for_pago char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_baim_ngi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_baim_eiva decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_rbi_iv10 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_rse_iv20 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ret_iv50 decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ban_cele integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_nom_arch char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ban_ambt smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ban_emis smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_ban_ocon char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_cla_acce char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlco_cel_tlco smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tllc_ban_cele integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tllc_nom_arch char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tllc_ban_ambt smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tllc_ban_emis smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tllc_cla_acce char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tllc_num_auto char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tllc_fec_auto datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tlco_cod_tlco) constraint informix.pk_bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcatlco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcttar row size = 121 number of columns = 7 index size
= 28 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctt00612.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcttar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttar_cod_ttar serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttar_des_ttar char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttar_sib_ttar char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttar_ban_ttar smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttar_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default today')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttar_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttar_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (ttar_sib_ttar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (ttar_ban_ttar IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ttar_cod_ttar) constraint informix.pk_afcttar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcttar from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcctar row size = 371 number of columns = 8 index size
= 28 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcct00613.unl number of rows = 12 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcctar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctar_cod_ctar serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctar_nom_ctar char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctar_des_ctar char(300)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctar_sib_ctar char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctar_ban_ctar smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctar_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default today')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctar_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctar_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (ctar_sib_ctar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (ctar_ban_ctar IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ctar_cod_ctar) constraint informix.pk_afcctar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcctar from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcstar row size = 391 number of columns = 10 index size
= 44 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcst00614.unl number of rows = 228 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcstar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('star_cod_star serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('star_cod_ttar integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('star_nom_star char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('star_des_star char(300)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('star_sib_star char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('star_val_star decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('star_ban_star smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('star_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default today')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('star_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('star_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (star_sib_star')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (star_ban_star IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (star_cod_star) constraint informix.pk_afcstar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcstar from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afclcoa row size = 224 number of columns = 10 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afclc00615.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afclcoa ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcoa_cod_lcoa serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcoa_num_secu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcoa_num_juic char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcoa_ide_lcoa char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcoa_nom_lcoa char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcoa_val_rete decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcoa_fec_carg date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcoa_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcoa_ban_lcoa smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcoa_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (lcoa_ban_lcoa IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (lcoa_cod_lcoa) constraint informix.pk_afclcoa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afclcoa from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcsacr row size = 17 number of columns = 3 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcsa00616.unl number of rows = 1048 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcsacr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacr_cod_sacr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacr_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacr_val_sacr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (sacr_cod_sacr) constraint informix.pk_afcsacr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcsacr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afccotr row size = 42 number of columns = 7 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcco00617.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afccotr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cotr_cod_cotr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cotr_tip_cotr char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cotr_hor_inic char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cotr_hor_fin char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cotr_num_cort smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cotr_ban_cotr smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cotr_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (cotr_ban_cotr IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cotr_cod_cotr) constraint informix.pk_afccotr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afccotr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcgrfa row size = 60 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcgr00618.unl number of rows = 45 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcgrfa ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grfa_cod_grfa serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grfa_des_grfa char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grfa_ban_grfa smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grfa_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (grfa_ban_grfa IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (grfa_cod_grfa) constraint root.pk_afcgrfa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcgrfa from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcctrt row size = 163 number of columns = 5 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcct00619.unl number of rows = 36 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcctrt ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctrt_cod_ctrt serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctrt_des_ctrt char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctrt_ban_ctrt smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctrt_sib_ctrt char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctrt_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (ctrt_ban_ctrt IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ctrt_cod_ctrt) constraint informix.pk_afcctrt')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcctrt from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdtrt row size = 66 number of columns = 10 index size
= 24 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdt00620.unl number of rows = 1922 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdtrt ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtrt_cod_dtrt serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtrt_num_tran char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtrt_val_dtrt decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtrt_num_dtrt integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtrt_fec_dtrt datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtrt_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtrt_val_conf decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtrt_usu_conf integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtrt_fec_conf datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtrt_cod_tasi char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dtrt_cod_dtrt) constraint informix.pk_afcdtrt')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdtrt from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctrtr row size = 458 number of columns = 36 index size
= 78 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctr00621.unl number of rows = 2480 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctrtr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_trtr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_cban integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_val_trtr decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_num_trtr char(25)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_fec_dep date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_fec_ing date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_est_dep integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_des_trtr char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_tran integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_tasi char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_usu_modi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_fec_modi date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_mban integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_nct_orde char(20) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_tct_orde char(20) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_nct_bene char(20) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_tct_bene char(20) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_nom_bene char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_refe integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_ctrt integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_tid_bene char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_ide_bene char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_banc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_ema_trtr char(80)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_val_comi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_nom_orde char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_ofi_tran integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_proc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_auxi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_est_fina integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_conf char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_con2 char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_fptr integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (trtr_cod_trtr) constraint informix.pk_afctrtr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctrtr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcectr row size = 59 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcec00622.unl number of rows = 27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcectr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ectr_cod_ectr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ectr_des_ectr char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ectr_ban_ectr smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ectr_sib_ectr char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (ectr_ban_ectr IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (ectr_cod_ectr) constraint informix.pk_afcectr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcectr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadpvi1019 row size = 261 number of columns = 30 index
size = ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadp00623.unl number of rows = 6874 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadpvi1019 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_dpvi serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_tcdv integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_tfir integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_num_firm integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_eacd smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_num_dpvi char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_ofi_cier integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_cier date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_upgi date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_sal_disp decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_sal_cont decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cla_cdav char(22)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_umcd date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_aho_mini decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_udev date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_uina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_acti date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_fec_venc date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_dia_plaz integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_tas_dpvi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_dia_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_dpv_debi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_usu_inac integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_intv char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_ccdv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_sect integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_nom_dpvi char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadpvi1019 from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcprfa row size = 1704 number of columns = 23 index
size = 104 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcpr00625.unl number of rows = 642 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcprfa ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_cod_prfa serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_ide_prfa char(70) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_cod_grup integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_ide_prod char(15) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_nom_prfa char(200) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_ref_dato char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_ref_dat2 char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_ref_dat3 char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_ref_dat4 char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_tip_dato char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_lon_dato integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_tip_prfa char(2) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''T''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_dat_espe char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_tit_reci char(120)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_ban_esta smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_cta_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_cta_comi char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_ban_reca char(4) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_val_perm char(50) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_esq_prfa char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_com_prfa char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (prfa_ide_prfa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (prfa_ban_esta IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (prfa_dat_espe IN (''S'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (prfa_cod_prfa) constraint informix.pk_afcprfa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcprfa from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctrfa row size = 3710 number of columns = 33 index
size = 54 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctr00626.unl number of rows = 729 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctrfa ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_cod_trfa serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_cod_iden char(64)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_cod_tran char(64)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_nom_trfa char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_ban_comi smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_val_comi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_val_trfa decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_val_tota decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_des_trfa char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_cod_rubr char(64)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trta_fec_cier datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trta_fec_comp datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trat_fec_tran datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_num_auto char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_num_fact char(17)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_num_secu char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_sec_swit char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_cod_pago char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_cod_trtx char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_cod_oper char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_cod_prod char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_cod_term char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_url_fact char(60)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_xml_add char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_xml_reci char(2000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_cod_tfpg integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_ban_trfa smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_pap_reve integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_usu_reve integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_ban_comp smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_ref_trfa char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (trfa_ban_comi IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (trfa_ban_trfa IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (trfa_cod_trfa) constraint informix.pk_afctrfa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctrfa from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcsctd row size = 40 number of columns = 8 index size =
21 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcsc00628.unl number of rows = 115528 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcsctd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_cod_peri integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_fec_sctd date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_sal_debe decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_sal_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_cod_cont char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_cod_gere char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (sctd_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcsctd from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcliqe row size = 668 number of columns = 8 index size
= 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcli00629.unl number of rows = 28 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcliqe ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('liqe_cod_liqe serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('liqe_gru_liqe char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('liqe_sib_liqe char(6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('liqe_des_liqe char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('liqe_for_liqe char(500)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('liqe_ban_form smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('liqe_ban_liqe smallint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('liqe_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (liqe_ban_form IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (liqe_ban_liqe IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (liqe_cod_liqe) constraint informix.pk_afcliqe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcliqe from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcfptr row size = 121 number of columns = 7 index size
= 32 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcfp00630.unl number of rows = 11 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcfptr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fptr_cod_fptr serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fptr_sib_fptr char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fptr_des_fptr char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fptr_ban_fptr smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fptr_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fptr_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fptr_cod_modu integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default 7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('unique (fptr_sib_fptr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (fptr_ban_fptr IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (fptr_cod_fptr) constraint informix.pk_afcfptr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcfptr from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdvco row size = 36 number of columns = 4 index size =
0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdv00631.unl number of rows = 47 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdvco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dvco_cod_dvco serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dvco_ide_dvco char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dvco_num_dvco char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dvco_fec_emis date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdvco from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcadpfi0228 row size = 680 number of columns = 20 index
size = ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcadp00632.unl number of rows = 817 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcadpfi0228 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_dpfi serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_num_dpfi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_ofic integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_caja char(2) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_mone integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_dpfi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_tas_dpfi decimal(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_val_dpfi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_fppf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_npg_inte integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_edpf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_fec_deve date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_det_dpfi char(300)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_nom_bene char(300)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_recl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_por_rete decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_sect integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcadpfi0228 from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.bcapgpf0228 row size = 41 number of columns = 9 index
size = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = bcapg00633.unl number of rows = 1991 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.bcapgpf0228 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_pgpf serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_dpfi integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_num_pgpf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_rubr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_fec_inic date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_fec_fina date not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_val_pgpf decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_edpf integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.bcapgpf0228 from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.d01saldos row size = 134 number of columns = 16 index
size = 47 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = d01sa00636.unl number of rows = 2321 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.d01saldos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuenta char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('numerocuenta char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('identificacion char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('saldoinicial decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valoringreso decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valoregreso decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('interes decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasa decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechatransa char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaemision char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechavencimiento char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plazo integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('oficina integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mes integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anio integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.d01saldos from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afchomo row size = 511 number of columns = 11 index size
= 18 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcho00637.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afchomo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('homo_cod_homo serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('homo_nom_tide char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('homo_ide_homo char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('homo_ape_homo char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('homo_nom_homo char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('homo_nac_homo char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('homo_ban_homo smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('homo_fec_carg date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('homo_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('homo_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('homo_abr_opci char(3) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''HOM''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (homo_ban_homo IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (homo_abr_opci IN (''HOM'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (homo_cod_homo) constraint root.pk_afchomo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afchomo from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afclhom row size = 27 number of columns = 4 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afclh00638.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afclhom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lhom_cod_lhom serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lhom_fec_lhom date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lhom_ide_homo char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lhom_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (lhom_cod_lhom) constraint root.pk_afclhom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afclhom from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcclho row size = 34 number of columns = 6 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afccl00639.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcclho ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clho_cod_clho serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clho_fec_clho date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clho_ide_clho char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clho_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clho_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clho_abr_opci char(3) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('default ''HOM''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (clho_abr_opci IN (''HOM'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (clho_cod_clho) constraint root.pk_afcclho')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcclho from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afccore row size = 69 number of columns = 7 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcco00640.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afccore ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('core_cod_core serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('core_des_core char(50) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('core_sib_core char(1) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('core_ban_esta smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('core_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('core_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('core_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (core_ban_esta IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (core_cod_core) constraint informix.pk_afccore')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afccore from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdcor row size = 527 number of columns = 8 index size
= 27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdc00641.unl number of rows = 26 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdcor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcor_cod_dcor serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcor_cod_core integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcor_des_dcor char(500) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcor_sib_dcor char(5) not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcor_ban_esta smallint not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcor_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcor_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcor_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (dcor_ban_esta IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dcor_cod_dcor) constraint informix.pk_afcdcor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdcor from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcerec row size = 57 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcer00642.unl number of rows = 2 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcerec ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('erec_cod_erec serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('erec_des_erec char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('erec_ban_esta smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('erec_sib_erec char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (erec_ban_esta IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (erec_cod_erec) constraint informix.pk_afcerec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcerec from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctrre row size = 58 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afctr00643.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctrre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trre_cod_trre serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trre_des_trre char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trre_ban_esta smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trre_sib_erec char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (trre_ban_esta IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (trre_cod_trre) constraint informix.pk_afctrre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctrre from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdrec row size = 71 number of columns = 14 index size
= 72 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdr00644.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdrec ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drec_cod_drec serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drec_cod_fptr integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drec_cod_clie integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drec_fec_recl date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drec_cod_loca integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drec_cod_dcor integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drec_cod_erec integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drec_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drec_fec_reso date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drec_cod_trre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drec_val_mont decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drec_val_inte decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drec_val_tota decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drec_usu_reso integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (drec_cod_drec) constraint informix.pk_afcdrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdrec from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdreo row size = 1020 number of columns = 6 index size
= 36 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdr00645.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdreo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dreo_cod_dreo serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dreo_cod_drec integer not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dreo_obs_dreo char(1000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dreo_fec_obse date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dreo_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dreo_cod_trre integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dreo_cod_dreo) constraint informix.pk_afcdreo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdreo from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcedad row size = 42 number of columns = 4 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afced00650.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcedad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('edad_cod_edad serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('edad_des_desc char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('edad_val_inic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('edad_val_fina integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (edad_cod_edad) constraint informix.pk_afcedad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcedad from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.comp_sal_ctab13 row size = 224 number of columns = 14
index size ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('= 17 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = comp_00651.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.comp_sal_ctab13 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nom_ccon char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('niv_ccon char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('est_ccon integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cod_tcue char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ele_ccon char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sal_peri decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sal_mes_debe decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sal_mes_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cod_ofic integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cla_ccon char(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nat_ccon char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.comp_sal_ctab13 from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE root.ccon row size = 169 number of columns = 3 index size = 9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = ccon_00653.unl number of rows = 1190 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table root.ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('id serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_nom char(150)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (id) constraint root.pk_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on root.ccon from public as root;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE root.afccacf row size = 56 number of columns = 8 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcca00654.unl number of rows = 24 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table root.afccacf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacf_cod_cacf serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacf_nom_cacf char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacf_val_inic decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacf_val_fina decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacf_val_cacf integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacf_ban_cacf smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacf_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacf_usu_modi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cacf_cod_cacf) constraint root.pk_afccacf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on root.afccacf from public as root;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afclpdp row size = 22 number of columns = 5 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afclp00655.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afclpdp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lpdp_cod_lpdp serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lpdp_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lpdp_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lpdp_fec_modi datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lpdp_ban_lpdp smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (lpdp_ban_lpdp IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (lpdp_cod_lpdp) constraint root.pk_afclpdp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afclpdp from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcrbal row size = 76 number of columns = 5 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcrb00656.unl number of rows = 4 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcrbal ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbal_cod_rbal serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbal_des_rbal char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbal_val_mini decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbal_val_maxi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbal_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (rbal_cod_rbal) constraint informix.pk_afcrbal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcrbal from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afctedu row size = 98 number of columns = 7 index size =
9 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcte00657.unl number of rows = 5 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afctedu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tedu_cod_tedu serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tedu_des_tedu char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tedu_ban_tedu smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tedu_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tedu_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tedu_fec_serv date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tedu_cla_dws char(50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (tedu_ban_tedu IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (tedu_cod_tedu) constraint root.pk_afctedu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afctedu from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afceduc row size = 24 number of columns = 6 index size =
27 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afced00658.unl number of rows = 0 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afceduc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('educ_cod_educ serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('educ_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('educ_cod_tedu integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('educ_fec_educ date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('educ_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('educ_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (educ_cod_educ) constraint root.pk_afceduc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afceduc from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcbals row size = 222 number of columns = 6 index size
= 18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcba00659.unl number of rows = 159 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcbals ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bals_cod_bals serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bals_ind_seps char(8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bals_nom_seps char(200)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bals_ban_bals smallint')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bals_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bals_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (bals_ban_bals IN (0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (bals_cod_bals) constraint root.pk_afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcbals from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afccump row size = 10 number of columns = 3 index size =
18 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afccu00660.unl number of rows = 3 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afccump ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cump_cod_cump serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cump_des_cump char(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cump_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('check (cump_des_cump IN (''SI'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (cump_cod_cump) constraint root.pk_afccump')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afccump from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ TABLE informix.afcdbal row size = 115 number of columns = 11 index size
= 36 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('}')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('{ unload file name = afcdb00661.unl number of rows = 135 }')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create table informix.afcdbal ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbal_cod_dbal serial not null ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbal_cod_bals integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbal_cod_cump integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbal_val_nume decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbal_val_deno decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbal_val_resu decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbal_fec_dbal date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbal_fec_serv datetime year to second')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbal_cod_usua integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbal_des_tipo char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbal_des_camp char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('primary key (dbal_cod_dbal) constraint root.pk_afcdbal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke all on informix.afcdbal from public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapctb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapctb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapctb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapctb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapctb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.track_01 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.track_01 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.track_01 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.track_01 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.track_01 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.track_02 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.track_02 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.track_02 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.track_02 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.track_02 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.track_03 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.track_03 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.track_03 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.track_03 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.track_03 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaopen to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaopen to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaopen to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaopen to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaopen to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatjor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatjor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatjor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatjor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatjor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaapp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaapp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaapp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaapp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaapp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaproc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaproc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaproc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaproc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaproc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatmpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatmpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatmpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatmpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatmpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcavaft to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcavaft to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcavaft to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcavaft to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcavaft to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcathdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcathdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcathdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcathdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcathdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadfes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadfes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadfes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadfes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadfes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaftnt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaftnt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaftnt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaftnt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaftnt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.tmpsact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.tmpsact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.tmpsact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.tmpsact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.tmpsact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacoac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacoac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacoac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacoac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacoac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaestr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaestr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaestr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaestr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaestr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaseqn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaseqn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaseqn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaseqn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaseqn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcactrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcactrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcactrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcactrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcactrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaenti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaenti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaenti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaenti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaenti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatprv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatprv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatprv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatprv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatprv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcasaux to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcasaux to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcasaux to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcasaux to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcasaux to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.pbcattbl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.pbcattbl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.pbcattbl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.pbcattbl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.pbcattbl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.pbcatcol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.pbcatcol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.pbcatcol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.pbcatcol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.pbcatcol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.pbcatfmt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.pbcatfmt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.pbcatfmt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.pbcatfmt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.pbcatfmt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.pbcatvld to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.pbcatvld to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.pbcatvld to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.pbcatvld to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.pbcatvld to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.pbcatedt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.pbcatedt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.pbcatedt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.pbcatedt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.pbcatedt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcagrup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcagrup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcagrup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcagrup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcagrup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadsem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadsem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadsem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadsem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadsem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatsec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatsec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatsec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatsec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatsec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaprov to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaprov to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaprov to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaprov to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaprov to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcamenu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcamenu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcamenu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcamenu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcamenu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaperf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaperf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaperf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaperf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaperf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatasi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatasi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatasi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatasi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatasi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatdin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatdin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatdin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatdin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatdin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatcar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatcar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatcar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatcar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatcar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcasexo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcasexo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcasexo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcasexo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcasexo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaeciv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaeciv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaeciv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaeciv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaeciv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcating to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcating to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcating to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcating to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcating to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaunid to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaunid to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaunid to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaunid to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaunid to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcautel to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcautel to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcautel to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcautel to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcautel to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcattel to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcattel to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcattel to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcattel to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcattel to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatide to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatide to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatide to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatide to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatide to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaintr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaintr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaintr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaintr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaintr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatofi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatofi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatofi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatofi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatofi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaocu1 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaocu1 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaocu1 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaocu1 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaocu1 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcafcdi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcafcdi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcafcdi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcafcdi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcafcdi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatman to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatman to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatman to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatman to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatman to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatben to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatben to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatben to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatben to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatben to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatcfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatcfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatcfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatcfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatcfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcabbdd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcabbdd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcabbdd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcabbdd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcabbdd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatcue to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatcue to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatcue to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatcue to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatcue to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcanatu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcanatu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcanatu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcanatu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcanatu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatdoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatdoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatdoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatdoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatdoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcamone to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcamone to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcamone to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcamone to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcamone to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaedpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaedpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaedpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaedpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaedpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaimpu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaimpu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaimpu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaimpu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaimpu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcamese to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcamese to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcamese to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcamese to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcamese to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaediv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaediv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaediv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaediv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaediv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapasd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapasd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapasd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapasd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapasd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatese to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatese to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatese to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatese to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatese to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaccre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaccre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaccre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaccre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaccre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatamo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatamo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatamo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatamo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatamo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatgar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatgar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatgar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatgar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatgar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaintv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaintv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaintv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaintv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaintv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacgti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacgti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacgti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacgti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacgti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatvin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatvin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatvin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatvin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatvin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaecre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaecre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaecre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaecre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaecre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadepe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadepe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadepe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadepe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadepe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcattpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcattpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcattpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcattpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcattpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatfpg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatfpg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatfpg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatfpg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatfpg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcafcin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcafcin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcafcin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcafcin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcafcin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatcap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatcap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatcap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatcap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatcap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatlib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatlib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatlib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatlib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatlib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapicn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapicn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapicn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapicn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapicn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatfir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatfir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatfir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatfir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatfir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatanx to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatanx to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatanx to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatanx to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatanx to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaeacd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaeacd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaeacd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaeacd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaeacd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaitrv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaitrv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaitrv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaitrv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaitrv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapago to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapago to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapago to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapago to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapago to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatfor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatfor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatfor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatfor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatfor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapaco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapaco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapaco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapaco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapaco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatcba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatcba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatcba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatcba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatcba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaecba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaecba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaecba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaecba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaecba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcamdep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcamdep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcamdep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcamdep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcamdep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatico to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatico to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatico to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatico to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatico to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatdep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatdep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatdep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatdep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatdep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcabech to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcabech to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcabech to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcabech to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcabech to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaimpc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaimpc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaimpc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaimpc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaimpc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatdtc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatdtc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatdtc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatdtc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatdtc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatdpd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatdpd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatdpd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatdpd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatdpd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatsob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatsob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatsob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatsob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatsob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatmba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatmba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatmba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatmba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatmba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatcli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatcli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatcli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatcli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatcli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcamlbr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcamlbr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcamlbr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcamlbr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcamlbr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapott to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapott to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapott to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapott to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapott to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcalcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcalcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcalcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcalcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcalcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaffin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaffin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaffin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaffin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaffin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcamodu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcamodu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcamodu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcamodu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcamodu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaprms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaprms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaprms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaprms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaprms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaopci to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaopci to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaopci to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaopci to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaopci to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcavprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcavprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcavprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcavprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcavprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaciud to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaciud to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaciud to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaciud to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaciud to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcasect to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcasect to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcasect to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcasect to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcasect to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadepa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadepa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadepa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadepa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadepa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaclna to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaclna to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaclna to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaclna to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaclna to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcabanc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcabanc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcabanc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcabanc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcabanc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadpvi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadpvi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadpvi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadpvi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadpvi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacred to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacred to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacred to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacred to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacred to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcagtia to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcagtia to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcagtia to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcagtia to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcagtia to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacaja to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacaja to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacaja to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacaja to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacaja to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapape to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapape to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapape to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapape to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapape to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacont to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacont to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacont to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacont to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacont to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacomp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacomp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacomp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacomp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacomp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaccom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaccom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaccom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaccom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaccom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadeef to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadeef to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadeef to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadeef to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadeef to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaottr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaottr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaottr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaottr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaottr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapgpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapgpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapgpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapgpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapgpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaejer to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaejer to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaejer to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaejer to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaejer to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaccon to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaccon to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaccon to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaccon to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaccon to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaperi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaperi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaperi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaperi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaperi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacons to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacons to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacons to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacons to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacons to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcarubr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcarubr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcarubr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcarubr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcarubr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacomi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacomi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacomi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacomi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacomi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcabloq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcabloq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcabloq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcabloq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcabloq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaooem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaooem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaooem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaooem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaooem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatrcj to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatrcj to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatrcj to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatrcj to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatrcj to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcafxtc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcafxtc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcafxtc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcafxtc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcafxtc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcachra to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcachra to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcachra to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcachra to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcachra to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcamban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcamban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcamban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcamban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcamban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapres to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapres to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapres to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapres to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapres to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadchv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadchv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadchv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadchv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadchv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcamcdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcamcdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcamcdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcamcdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcamcdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcalibr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcalibr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcalibr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcalibr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcalibr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadivc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadivc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadivc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadivc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadivc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatafo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatafo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatafo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatafo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatafo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacamb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacamb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacamb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacamb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacamb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaocu2 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaocu2 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaocu2 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaocu2 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaocu2 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaocup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaocup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaocup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaocup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaocup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatran to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatran to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatran to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatran to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatran to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadepg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadepg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadepg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadepg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadepg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaoptr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaoptr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaoptr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaoptr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaoptr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaplaz to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaplaz to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaplaz to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaplaz to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaplaz to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcamont to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcamont to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcamont to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcamont to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcamont to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaccco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaccco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaccco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaccco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaccco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcafpsd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcafpsd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcafpsd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcafpsd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcafpsd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatcse to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatcse to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatcse to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatcse to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatcse to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcafppf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcafppf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcafppf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcafppf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcafppf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaflib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaflib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaflib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaflib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaflib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadtcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadtcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadtcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadtcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadtcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaaper to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaaper to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaaper to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaaper to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaaper to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaausu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaausu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaausu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaausu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaausu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaimpr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaimpr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaimpr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaimpr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaimpr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaacli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaacli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaacli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaacli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaacli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatene to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatene to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatene to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatene to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatene to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatele to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatele to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatele to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatele to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatele to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadecl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadecl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadecl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadecl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadecl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadtra to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadtra to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadtra to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadtra to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadtra to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadfcd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadfcd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadfcd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadfcd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadfcd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcateof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcateof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcateof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcateof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcateof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacfam to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacfam to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacfam to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacfam to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacfam to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcabene to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcabene to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcabene to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcabene to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcabene to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcajorn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcajorn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcajorn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcajorn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcajorn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacoti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacoti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacoti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacoti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacoti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaimag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaimag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaimag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaimag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaimag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcajcop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcajcop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcajcop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcajcop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcajcop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadefe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadefe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadefe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadefe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadefe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcasact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcasact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcasact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcasact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcasact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcancue to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcancue to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcancue to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcancue to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcancue to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaimru to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaimru to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaimru to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaimru to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaimru to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacrau to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacrau to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacrau to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacrau to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacrau to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcarvpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcarvpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcarvpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcarvpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcarvpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaanpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaanpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaanpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaanpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaanpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcactip to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcactip to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcactip to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcactip to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcactip to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaimpa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaimpa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaimpa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaimpa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaimpa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaprpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaprpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaprpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaprpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaprpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadeip to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadeip to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadeip to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadeip to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadeip to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaprdi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaprdi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaprdi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaprdi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaprdi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadirb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadirb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadirb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadirb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadirb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapdte to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapdte to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapdte to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapdte to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapdte to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcagtcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcagtcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcagtcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcagtcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcagtcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacocr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacocr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacocr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacocr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacocr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacrpg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacrpg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacrpg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacrpg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacrpg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacpcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacpcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacpcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacpcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacpcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcagbie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcagbie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcagbie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcagbie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcagbie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapose to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapose to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapose to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapose to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapose to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcagpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcagpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcagpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcagpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcagpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcagtit to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcagtit to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcagtit to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcagtit to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcagtit to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaobcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaobcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaobcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaobcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaobcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadbau to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadbau to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadbau to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadbau to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadbau to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapddb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapddb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapddb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapddb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapddb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacous to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacous to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacous to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacous to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacous to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatasa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatasa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatasa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatasa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatasa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatxcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatxcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatxcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatxcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatxcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcameac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcameac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcameac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcameac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcameac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcavpcn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcavpcn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcavpcn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcavpcn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcavpcn to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcabpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcabpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcabpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcabpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcabpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatpln to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaddte to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaddte to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaddte to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaddte to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaddte to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacpan to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacpan to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacpan to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacpan to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacpan to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadaut to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadaut to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadaut to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadaut to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadaut to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatadv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatadv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatadv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatadv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatadv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaclib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaclib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaclib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaclib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaclib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatcdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatcdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatcdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatcdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatcdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaerro to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaerro to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaerro to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaerro to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaerro to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadefz to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadefz to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadefz to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadefz to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadefz to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcafadv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcafadv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcafadv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcafadv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcafadv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadbpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadbpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadbpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadbpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadbpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadpap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadpap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadpap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadpap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadpap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.tmpdcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.tmpdcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.tmpdcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.tmpdcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.tmpdcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaprdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaprdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaprdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaprdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaprdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaustr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaustr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaustr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaustr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaustr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaform to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaform to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaform to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaform to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaform to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcavpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcavpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcavpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcavpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcavpre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcactap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcactap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcactap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcactap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcactap to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacpar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacpar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacpar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacpar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacpar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaefba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaefba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaefba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaefba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaefba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaobct to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaobct to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaobct to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaobct to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaobct to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadmba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadmba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadmba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadmba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadmba to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcasald to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcasald to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcasald to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcasald to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcasald to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcabxco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcabxco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcabxco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcabxco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcabxco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadecb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadecb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadecb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadecb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadecb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacobs to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacobs to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacobs to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacobs to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacobs to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatndd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatndd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatndd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatndd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatndd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadimp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadimp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadimp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadimp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadimp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacsob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacsob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacsob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacsob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacsob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcasdct to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcasdct to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcasdct to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcasdct to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcasdct to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcachcj to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcachcj to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcachcj to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcachcj to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcachcj to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaconc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaconc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaconc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaconc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaconc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadtot to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadtot to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadtot to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadtot to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadtot to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaotcl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaotcl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaotcl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaotcl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaotcl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcasacp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcasacp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcasacp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcasacp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcasacp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacsac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacsac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacsac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacsac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacsac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadoem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadoem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadoem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadoem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadoem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcandoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcandoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcandoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcandoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcandoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcafchq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcafchq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcafchq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcafchq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcafchq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcarant to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcarant to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcarant to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcarant to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcarant to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcagcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcagcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcagcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcagcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcagcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaineg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaineg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaineg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaineg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaineg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcading to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcading to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcading to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcading to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcading to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcafsal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcafsal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcafsal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcafsal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcafsal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacsal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacsal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacsal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacsal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacsal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaordc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaordc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaordc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaordc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaordc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaacce to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaacce to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaacce to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaacce to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaacce to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcarols to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcarols to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcarols to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcarols to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcarols to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaotde to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaotde to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaotde to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaotde to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaotde to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaremq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaremq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaremq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaremq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaremq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcanoti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcanoti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcanoti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcanoti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcanoti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacatr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacatr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacatr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacatr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacatr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaacer to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaacer to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaacer to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaacer to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaacer to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcarb11 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcarb11 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcarb11 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcarb11 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcarb11 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadpor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadpor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadpor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadpor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadpor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapais to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapais to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapais to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapais to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapais to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaeope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaeope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaeope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaeope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaeope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaiope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaiope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaiope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaiope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaiope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaorig to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaorig to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaorig to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaorig to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaorig to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacfir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacfir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacfir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacfir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacfir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaavpic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaavpic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaavpic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaavpic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaavpic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaesol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaesol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaesol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaesol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaesol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapgre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapgre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapgre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapgre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapgre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaendc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaendc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaendc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaendc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaendc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcagchq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcagchq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcagchq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcagchq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcagchq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcachqs to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcachqs to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcachqs to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcachqs to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcachqs to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcafret to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcafret to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcafret to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcafret to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcafret to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaegch to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaegch to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaegch to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaegch to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaegch to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaesfe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaesfe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaesfe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaesfe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaesfe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaesac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaesac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaesac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaesac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaesac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaeesf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaeesf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaeesf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaeesf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaeesf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcarang to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcarang to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcarang to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcarang to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcarang to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadmon to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadmon to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadmon to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadmon to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadmon to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcamoni to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcamoni to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcamoni to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcamoni to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcamoni to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcavari to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcavari to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcavari to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcavari to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcavari to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadvar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadvar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadvar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadvar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadvar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatind to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatind to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatind to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatind to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatind to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatafi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatafi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatafi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatafi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatafi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaddep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaddep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaddep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaddep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaddep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaeafi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaeafi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaeafi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaeafi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaeafi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadtac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadtac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadtac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadtac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadtac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaacti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaacti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaacti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaacti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaacti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadepr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadepr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadepr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadepr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadepr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaacem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaacem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaacem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaacem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaacem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaaeac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaaeac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaaeac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaaeac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaaeac to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcahact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcahact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcahact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcahact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcahact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcamonc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcamonc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcamonc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcamonc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcamonc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaplcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaplcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaplcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaplcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaplcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatasc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatasc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatasc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatasc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatasc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaofus to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaofus to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaofus to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaofus to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaofus to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaesrf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaesrf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaesrf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaesrf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaesrf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaoffa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaoffa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaoffa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaoffa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaoffa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatiin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatiin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatiin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatiin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatiin to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afccpof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afccpof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afccpof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afccpof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afccpof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaempl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaempl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaempl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaempl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaempl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcahesu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcahesu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcahesu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcahesu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcahesu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcataud to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcataud to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcataud to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcataud to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcataud to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatica to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatica to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatica to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatica to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatica to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacarg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacarg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacarg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacarg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacarg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcarlab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcarlab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcarlab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcarlab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcarlab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaereg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaereg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaereg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaereg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaereg to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapaca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapaca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapaca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapaca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapaca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapcal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapcal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapcal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapcal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapcal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcarcla to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcarcla to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcarcla to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcarcla to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcarcla to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcagara to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcagara to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcagara to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcagara to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcagara to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaclie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaclie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaclie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaclie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaclie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdsoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdsoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdsoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdsoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdsoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcprso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcprso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcprso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcprso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcprso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcainan to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcainan to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcainan to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcainan to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcainan to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacalf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacalf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacalf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacalf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacalf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaabdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaabdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaabdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaabdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaabdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcconf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcconf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcconf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcconf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcconf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctinv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctinv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctinv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctinv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctinv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcloca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcloca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcloca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcloca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcloca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcinve to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcinve to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcinve to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcinve to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcinve to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcminv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcminv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcminv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcminv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcminv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaeanr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaeanr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaeanr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaeanr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaeanr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaorco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaorco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaorco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaorco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaorco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacrrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacrrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacrrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacrrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacrrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaanrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaanrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaanrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaanrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaanrl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadanr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadanr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadanr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadanr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadanr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaprcb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaprcb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaprcb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaprcb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaprcb to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacdso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacdso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacdso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacdso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacdso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaicli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaicli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaicli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaicli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaicli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadect to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadect to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadect to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadect to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadect to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdadp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdadp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdadp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdadp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdadp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcasocr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcasocr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcasocr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcasocr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcasocr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcbeco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcbeco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcbeco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcbeco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcbeco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcnutc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcnutc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcnutc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcnutc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcnutc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacliegara to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacliegara to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacliegara to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacliegara to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacliegara to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctemd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctemd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctemd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctemd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctemd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdact to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.temprovi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.temprovi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.temprovi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.temprovi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.temprovi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdces to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdces to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdces to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdces to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdces to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afchpol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afchpol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afchpol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afchpol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afchpol to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaandv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaandv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaandv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaandv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaandv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcddep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcddep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcddep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcddep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcddep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctdeu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctdeu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctdeu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctdeu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctdeu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcarsib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcarsib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcarsib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcarsib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcarsib to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afccega to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afccega to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afccega to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afccega to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afccega to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctemi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctemi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctemi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctemi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctemi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afccrie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afccrie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afccrie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afccrie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afccrie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctrla to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctrla to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctrla to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctrla to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctrla to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afccltr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afccltr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afccltr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afccltr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afccltr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcccob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcccob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcccob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcccob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcccob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcttpr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcttpr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcttpr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcttpr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcttpr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcmcco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcmcco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcmcco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcmcco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcmcco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcmcpa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcmcpa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcmcpa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcmcpa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcmcpa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdmco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdmco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdmco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdmco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdmco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdmcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdmcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdmcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdmcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdmcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afccrce to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afccrce to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afccrce to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afccrce to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afccrce to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcasoci to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcasoci to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcasoci to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcasoci to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcasoci to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcescp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcescp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcescp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcescp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcescp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctsoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctsoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctsoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctsoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctsoc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctpag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctpag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctpag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctpag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctpag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcgcob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcgcob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcgcob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcgcob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcgcob to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.temporalclie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.temporalclie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.temporalclie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.temporalclie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.temporalclie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcsoop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcsoop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcsoop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcsoop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcsoop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcescl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcescl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcescl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcescl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcescl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afclces to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afclces to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afclces to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afclces to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afclces to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afccocu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afccocu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afccocu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afccocu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afccocu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcrban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcrban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcrban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcrban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcrban to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdcal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdcal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdcal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdcal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdcal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afchdpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afchdpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afchdpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afchdpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afchdpf to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctviv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctviv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctviv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctviv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctviv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afchidv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afchidv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afchidv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afchidv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afchidv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.comp_sal_cta to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.comp_sal_cta to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.comp_sal_cta to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.comp_sal_cta to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.comp_sal_cta to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afchdir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afchdir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afchdir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afchdir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afchdir to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdagc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdagc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdagc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdagc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdagc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afchofc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afchofc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afchofc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afchofc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afchofc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaofic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaofic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaofic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaofic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaofic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.uaf1_clientes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.uaf1_clientes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.uaf1_clientes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.uaf1_clientes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.uaf1_clientes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.uaf2_productos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.uaf2_productos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.uaf2_productos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.uaf2_productos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.uaf2_productos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.uaf0_socios to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.uaf0_socios to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.uaf0_socios to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.uaf0_socios to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.uaf0_socios to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.uaf0_socios1 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.uaf0_socios1 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.uaf0_socios1 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.uaf0_socios1 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.uaf0_socios1 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctsco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctsco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctsco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctsco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctsco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctsis to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctsis to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctsis to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctsis to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctsis to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctcsr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctcsr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctcsr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctcsr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctcsr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaccon1120 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaccon1120 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaccon1120 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaccon1120 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaccon1120 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcauid to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcauid to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcauid to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcauid to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcauid to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcgtbi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcgtbi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcgtbi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcgtbi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcgtbi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcgtti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcgtti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcgtti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcgtti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcgtti to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcliqu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcliqu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcliqu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcliqu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcliqu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afciinv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afciinv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afciinv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afciinv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afciinv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcastmp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcastmp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcastmp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcastmp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcastmp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdapo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdapo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdapo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdapo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdapo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdicl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdicl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdicl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdicl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdicl to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctpsr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctpsr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctpsr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctpsr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctpsr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcprof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcprof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcprof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcprof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcprof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcrfpe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcrfpe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcrfpe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcrfpe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcrfpe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdeop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdeop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdeop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdeop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdeop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdecr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdecr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdecr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdecr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdecr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcriec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcriec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcriec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcriec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcriec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdrie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdrie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdrie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdrie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdrie to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdrso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdrso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdrso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdrso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdrso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcrbso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcrbso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcrbso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcrbso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcrbso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcddri to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcddri to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcddri to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcddri to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcddri to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdcre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afccalr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afccalr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afccalr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afccalr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afccalr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdidv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdidv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdidv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdidv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdidv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdpta to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdpta to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdpta to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdpta to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdpta to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcencr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcencr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcencr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcencr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcencr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadpfi0331 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadpfi0331 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadpfi0331 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadpfi0331 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadpfi0331 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaesep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaesep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaesep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaesep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaesep to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcatcdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcatcdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcatcdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcatcdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcatcdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcthtas to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcthtas to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcthtas to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcthtas to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcthtas to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctcom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdsco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdsco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdsco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdsco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdsco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcpotv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcpotv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcpotv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcpotv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcpotv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcacoop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcacoop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcacoop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcacoop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcacoop to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcpeps to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcpeps to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcpeps to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcpeps to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcpeps to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcclpe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcclpe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcclpe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcclpe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcclpe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afccatc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afccatc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afccatc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afccatc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afccatc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdtlv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdtlv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdtlv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdtlv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdtlv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdccr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdccr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdccr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdccr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdccr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.uaf4_bancos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.uaf4_bancos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.uaf4_bancos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.uaf4_bancos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.uaf4_bancos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.uaf3_transacciones to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.uaf3_transacciones to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.uaf3_transacciones to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.uaf3_transacciones to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.uaf3_transacciones to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdcam to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdcam to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdcam to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdcam to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdcam to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctope to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcctvc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcctvc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcctvc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcctvc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcctvc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcccxc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcccxc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcccxc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcccxc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcccxc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcausua to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcausua to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcausua to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcausua to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcausua to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaorec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaorec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaorec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaorec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaorec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcfval_103 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcfval_103 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcfval_103 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcfval_103 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcfval_103 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcelab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcelab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcelab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcelab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcelab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afccaca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afccaca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afccaca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afccaca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afccaca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdssc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdssc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdssc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdssc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdssc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaopag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaopag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaopag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaopag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaopag to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcgrup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcgrup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcgrup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcgrup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcgrup to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctgru to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctgru to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctgru to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctgru to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctgru to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcgcli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcgcli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcgcli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcgcli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcgcli to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadetd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadetd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadetd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadetd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadetd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcgcab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcgcab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcgcab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcgcab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcgcab to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcgccr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcgccr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcgccr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcgccr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcgccr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcgtes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcgtes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcgtes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcgtes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcgtes to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcgdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcgdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcgdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcgdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcgdco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdrcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdrcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdrcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdrcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdrcp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afclcos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afclcos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afclcos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afclcos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afclcos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctpdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctpdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctpdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctpdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctpdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcccdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcccdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcccdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcccdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcccdv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcttad to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcttad to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcttad to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcttad to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcttad to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaemdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaemdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaemdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaemdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaemdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdisc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdisc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdisc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdisc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdisc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctcem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctcem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctcem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctcem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctcem to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcemof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcemof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcemof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcemof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcemof to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctres to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctres to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctres to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctres to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctres to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcpsms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcpsms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcpsms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcpsms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcpsms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afclsms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afclsms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afclsms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afclsms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afclsms to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaagar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaagar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaagar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaagar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaagar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcserv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcserv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcserv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcserv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcserv to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afchtso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afchtso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afchtso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afchtso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afchtso to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afchere to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afchere to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afchere to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afchere to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afchere to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afchreq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afchreq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afchreq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afchreq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afchreq to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afchdre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afchdre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afchdre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afchdre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afchdre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcgaul to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcgaul to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcgaul to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcgaul to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcgaul to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcfval to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcfval to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcfval to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcfval to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcfval to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadfcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadfcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadfcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadfcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadfcr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcrfca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcrfca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcrfca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcrfca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcrfca to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctlnc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctlnc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctlnc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctlnc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctlnc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcddic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcddic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcddic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcddic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcddic to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdtlc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdtlc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdtlc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdtlc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdtlc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdtre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdtre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdtre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdtre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdtre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afclimr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afclimr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afclimr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afclimr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afclimr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcvind to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcvind to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcvind to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcvind to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcvind to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcaindi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcaindi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcaindi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcaindi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcaindi to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afccavo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afccavo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afccavo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afccavo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afccavo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcband to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcband to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcband to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcband to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcband to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcbrec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcbrec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcbrec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcbrec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcbrec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcbrco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcbrco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcbrco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcbrco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcbrco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcbprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcbprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcbprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcbprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcbprm to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afchicr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afchicr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afchicr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afchicr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afchicr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcbcos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcbcos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcbcos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcbcos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcbcos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcsigc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcsigc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcsigc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcsigc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcsigc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afccode to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afccode to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afccode to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afccode to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afccode to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcttar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcttar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcttar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcttar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcttar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcctar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcctar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcctar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcctar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcctar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcstar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcstar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcstar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcstar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcstar to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afclcoa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afclcoa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afclcoa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afclcoa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afclcoa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcsacr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcsacr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcsacr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcsacr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcsacr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afccotr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afccotr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afccotr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afccotr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afccotr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcgrfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcgrfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcgrfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcgrfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcgrfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcctrt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcctrt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcctrt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcctrt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcctrt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdtrt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdtrt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdtrt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdtrt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdtrt to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctrtr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctrtr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctrtr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctrtr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctrtr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcectr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcectr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcectr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcectr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcectr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadpvi1019 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadpvi1019 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadpvi1019 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadpvi1019 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadpvi1019 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcprfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcprfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcprfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcprfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcprfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctrfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctrfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctrfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctrfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctrfa to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcsctd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcsctd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcsctd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcsctd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcsctd to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcliqe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcliqe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcliqe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcliqe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcliqe to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcfptr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcfptr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcfptr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcfptr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcfptr to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdvco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdvco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdvco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdvco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdvco to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcadpfi0228 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcadpfi0228 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcadpfi0228 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcadpfi0228 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcadpfi0228 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.bcapgpf0228 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.bcapgpf0228 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.bcapgpf0228 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.bcapgpf0228 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.bcapgpf0228 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.d01saldos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.d01saldos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.d01saldos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.d01saldos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.d01saldos to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afchomo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afchomo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afchomo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afchomo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afchomo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afclhom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afclhom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afclhom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afclhom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afclhom to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcclho to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcclho to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcclho to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcclho to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcclho to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afccore to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afccore to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afccore to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afccore to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afccore to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdcor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdcor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdcor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdcor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdcor to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcerec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcerec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcerec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcerec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcerec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctrre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctrre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctrre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctrre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctrre to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdrec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdrec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdrec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdrec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdrec to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdreo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdreo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdreo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdreo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdreo to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcedad to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcedad to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcedad to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcedad to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcedad to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.comp_sal_ctab13 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.comp_sal_ctab13 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.comp_sal_ctab13 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.comp_sal_ctab13 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.comp_sal_ctab13 to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on root.ccon to public as root;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on root.ccon to public as root;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on root.ccon to public as root;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on root.ccon to public as root;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on root.ccon to public as root;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on root.afccacf to public as root;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on root.afccacf to public as root;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on root.afccacf to public as root;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on root.afccacf to public as root;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on root.afccacf to public as root;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afclpdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afclpdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afclpdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afclpdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afclpdp to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcrbal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcrbal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcrbal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcrbal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcrbal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afctedu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afctedu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afctedu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afctedu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afctedu to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afceduc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afceduc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afceduc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afceduc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afceduc to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcbals to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcbals to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcbals to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcbals to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcbals to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afccump to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afccump to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afccump to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afccump to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afccump to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant select on informix.afcdbal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant update on informix.afcdbal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant insert on informix.afcdbal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant delete on informix.afcdbal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant index on informix.afcdbal to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_cta_provision(lp_cuenta INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de c�lculo de saldo promedio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE saldo DECIMAL; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de retorno ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE fecha datetime year to second;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE tasi CHAR;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE tipodoc CHAR(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor DECIMAL; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE numdocu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera todas las cuentas que tiene el producto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT bcaprdv.prdv_fec_prdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaprdv.prdv_val_prdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaprdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE prdv_cod_dpvi = dpvi_cod_dpvi and prdv_cod_dpvi = lp_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND DATE(prdv_fec_prdv) BETWEEN lda_fecini AND lda_fecfin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF tasi= ''C'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET saldo = saldo + valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET saldo = saldo - valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN numcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_id() RETURNING integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_id integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_id = (SELECT DBINFO(''sessionid'') ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasexo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE bcasexo.sexo_cod_sexo = ''M'');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_id;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_name_pc(ai_sesion_id INT')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_name_pc CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_name_pc = (SELECT hostname FROM sysmaster:syssessions WHERE sid =
ai_sesion_id);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN li_name_pc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cod_soci(acod_soci INT) returning int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_max_soci int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_max_soci = null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if not exists(select soci_num_soci from bcasoci where soci_num_soci =
acod_soci) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_max_soci = (select Max(soci_num_soci) from bcasoci);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_max_soci is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_max_soci = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_max_soci = li_max_soci + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_max_soci = acod_soci;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_max_soci;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_activa_socio(afecsal DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF afecsal IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET aact = aact + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN aact;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_prm_pfijo(lp_codigo_moneda INTEGER)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING CHAR(5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de retorno de select')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nombre CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE c_dinami CHAR(5);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables (parametros dinamicos) de retorno de procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nomdpmy1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE plzdpmy1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nomdpgst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valdpmy1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valdpgst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE coddpmy1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE coddpgst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables (parametros) de retorno de procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nom1402')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE val1402')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Inicializa variables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET valdptse')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nomdpprv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nomdpgst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nomdpmen')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nomdpmy1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nomdpmy2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nomdpmy3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nomdpmy4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nomdpmy5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera todos los parametros dinamicos segun el parametro de moneda ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT prms_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaprms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE prms_cod_prms = vprm_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND prms_cod_prms = prdi_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND prms_cod_modu =14')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND SUBSTR(prdi_cod_prdi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --Almacena nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF c_dinami = ''DPMY1'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomdpmy1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''DPMY2'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomdpmy2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''DPMY3'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomdpmy3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''DPMY4'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomdpmy4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''DPMY5'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomdpmy5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''DPGST'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomdpgst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''DPPRV'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomdpprv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''DPMEN'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomdpmen')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''DPTSE'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomdptse')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera parametros de formatos de certificados y cancelaciones (1402')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT prms_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaprms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE prms_cod_prms = vprm_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND prms_cod_modu = 14')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --Almacena nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF codigo = 1402 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nom1402')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF codigo = 1403 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nom1403')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN coddpmy1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coddpmy4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coddpprv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_infor_pfijo()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING CHAR(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE codigo integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT prms_des_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaprms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE prms_cod_prms = vprm_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND prms_cod_modu = 14')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND prms_cod_prms BETWEEN 1400 AND 1499')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF codigo = 1400 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nom1400')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF codigo = 1401 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nom1401')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN nom1400')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_prm_conta(an_cod_cont Integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let val1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let val2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nom1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select paco_des_paco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapaco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where paco_cod_paco =cpar_cod_paco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cpar_cod_cont = an_cod_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by paco_cod_paco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if codigo = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let nom1 = nombre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let val1 = valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif codigo = 2 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let nom2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif codigo = 3 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let nom3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif codigo = 4 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let nom4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif codigo = 5 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let nom5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif codigo = 6 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let nom6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif codigo = 7 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let nom7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif codigo = 8 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let nom8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif codigo = 9 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let nom9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let val = null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return nom1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nom6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_r_bal_compro(ai_mes1 integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tcue char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select vprm_val_vprm from bcavprm where vprm_cod_prms
= 101);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ccon_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri < ai_mes1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ccon_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri between ai_mes1 and ai_mes2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp tt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from tt')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table tt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_nivel_cta(ac_cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_digitos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if not exists(select ccon_cod_ctas from bcaccon where ccon_cod_ccon =
ac_cod_ccon and ccon_cod_ejer = ai_cod_ejer) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_digitos = length(ac_cod_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_suma = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ncue_num_digi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ncue_cod_ejer = ai_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_suma = li_suma + li_num_digi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl = li_ctrl + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_suma = li_digitos then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_ctrl;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_r_situa_gene(ada_fecha date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_ini date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_mes = Month(ada_fecha);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fec_ini = li_mes || ''/01/'' || year(ada_fecha);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_cont = (select vprm_val_vprm from bcavprm where vprm_cod_prms
= 100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select ejer_cod_ejer from bcaejer where ejer_cod_cont
= li_cod_cont and ejer_ani_ejer = Year(ada_fecha));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ejer is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dcom_cod_ctas codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from tmpdcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dcom_fec_dcom between lda_fec_ini and ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sact_cod_ctas codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri < li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dcom_cod_ctas codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where comp_cod_comp = dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_fec_comp between lda_fec_ini and ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_mayori = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_cod_tasi = ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dcom_cod_ctas codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where comp_cod_comp = dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_fec_comp between lda_fec_ini and ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_mayori = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_cod_tasi = ''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp t_movi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ac_cod_ccon = Trim(ac_cod_ccon) || ''*'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ccon_cod_ccon matches ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ccon_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table t_movi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_r_esta_finan(ada_fecha date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_gdos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_minimo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_minimo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select vprm_val_vprm from bcavprm where vprm_cod_prms
= 101);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ejer is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select first 2 ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ncue_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_minimo = li_minimo + li_num_digi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri < Month(ada_fecha)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and length(ccon_cod_ccon) between li_minimo and ai_maximo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and substr(ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_fec_dcom <= ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and month(dcom_fec_dcom) = month(ada_fecha)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and length(ccon_cod_ccon) between li_minimo and ai_maximo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and substr(ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(dcom_valor) debe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_cod_comp = dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_cod_tasi = ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_fec_comp <= ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and length(ccon_cod_ccon) between li_minimo and ai_maximo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and substr(ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_cod_comp = dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_cod_tasi = ''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_fec_comp <= ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and length(ccon_cod_ccon) between li_minimo and ai_maximo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and substr(ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp t_e_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_uti_per = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon in (''4''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_uti_per = ld_uti_per + sp_saldo_cuenta(li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into t_e_fina values (4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into t_e_fina values (5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_gdos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from t_e_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_nivel = sp_nivel_cta(cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_nivel = 2 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl2 = li_ctrl2 + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_gdos = ''D'' || li_ctrl2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_gtres = '''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_nivel = 3 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl3 = li_ctrl3 + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_gtres = ''T'' || li_ctrl3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table t_e_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_r_esta_finan_r(ada_fecha date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_gdos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_minimo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_minimo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select vprm_val_vprm from bcavprm where vprm_cod_prms
= 101);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ejer is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select first 2 ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ncue_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_minimo = li_minimo + li_num_digi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri < Month(ada_fecha)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and length(ccon_cod_ccon) between li_minimo and ai_maximo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and substr(ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_fec_dcom <= ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and month(dcom_fec_dcom) = month(ada_fecha)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and length(ccon_cod_ccon) between li_minimo and ai_maximo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and substr(ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(dcom_valor) debe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_cod_comp = dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_cod_tasi = ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_fec_comp <= ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and length(ccon_cod_ccon) between li_minimo and ai_maximo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and substr(ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_cod_comp = dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_cod_tasi = ''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_fec_comp <= ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and length(ccon_cod_ccon) between li_minimo and ai_maximo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and substr(ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp t_e_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_gdos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from t_e_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_nivel = sp_nivel_cta(cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_nivel = 2 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl2 = li_ctrl2 + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_gdos = ''D'' || li_ctrl2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_gtres = '''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_nivel = 3 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl3 = li_ctrl3 + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_gtres = ''T'' || li_ctrl3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table t_e_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cotiza_inte(ai_cod_mone int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_coti decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_anio int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ldat_fec_coti datetime year to second;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Recupera el a�o de ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_anio = (select ejer_ani_ejer from bcaejer where ejer_cod_ejer =
ai_cod_ejer);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Recupera m�xima fecha de cotizaci�n')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ldat_fec_coti = (select Max(coti_fec_coti) from bcacoti ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where Year(coti_fec_coti) = li_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and coti_cod_mone = ai_cod_mone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Recupera valor de cotizaci�n')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_val_coti = (select coti_val_inte from bcacoti ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where coti_cod_mone = ai_cod_mone and coti_fec_coti = ldat_fec_coti);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Retorna valor de cotizaci�n')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_val_coti is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_coti = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_val_coti;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_saldo_promedio(producto INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de c�lculo de saldo promedio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de retorno ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE s_prom_cuenta DECIMAL; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE f_inicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera todas las cuentas que tiene el producto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT bcadpvi.dpvi_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE dpvi_cod_tcdv = producto AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_eacd IN (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET f_inicio = lp_fdesde;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET totaldias = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET s_prom_cuenta = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --Recupera saldo anterior al c�lculo del saldo promedio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT bcasald.sald_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sald_cod_dpvi = cuenta AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_fec_sald <lp_fdesde;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF saldo IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --Recupera los saldos de la cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT bcasald.sald_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcasald.sald_fec_sald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO saldo_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sald_cod_dpvi = cuenta AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_fec_sald BETWEEN lp_fdesde AND lp_fhasta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ndias = f_fin - f_inicio +1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET totaldias = totaldias + ndias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET s_prom_cuenta = s_prom_cuenta + (saldo*ndias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET f_inicio = f_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET saldo = saldo_ant;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --C�lculo para el �ltimo registro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET f_fin = lp_fhasta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ndias = f_fin - f_inicio +1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET totaldias = totaldias + ndias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET s_prom_cuenta = s_prom_cuenta + (saldo*ndias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if s_prom_cuenta <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET s_prom_cuenta = s_prom_cuenta/totaldias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_borrar(cuenta INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DECIMAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de c�lculo de saldo promedio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE saldo_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de retorno ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ndias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE s_prom_cuenta DECIMAL; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE f_inicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET f_inicio = lp_fdesde;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET totaldias = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET s_prom_cuenta = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --Recupera los saldos de la cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT bcasald.sald_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sald_cod_dpvi = cuenta AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_fec_sald < lp_fdesde;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF saldo IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT bcasald.sald_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcasald.sald_fec_sald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO saldo_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sald_cod_dpvi = cuenta AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_fec_sald BETWEEN lp_fdesde AND lp_fhasta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ndias = f_fin - f_inicio +1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET totaldias = totaldias + ndias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET s_prom_cuenta = s_prom_cuenta + (saldo*ndias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET f_inicio = f_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Si no hay mas registros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET saldo = saldo_ant;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Si no hay mas registros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET f_fin = lp_fhasta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ndias = f_fin - f_inicio +1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET totaldias = totaldias + ndias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET s_prom_cuenta = s_prom_cuenta + (saldo*ndias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET f_inicio = f_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_r_anx_provision(lp_producto INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de retorno ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor DECIMAL; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE numcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera todas las cuentas que tiene el producto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv = lp_producto and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_eacd IN(1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --Verifico la condicion de socios y clientes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF lp_socios= 1THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT bcasoci.soci_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasoci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE clie_cod_clie = soci_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_dpvi = cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF socios <> 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET aceptado = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET aceptado = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF aceptado = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(prdv_val_prdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaprdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE prdv_cod_dpvi = cuenta AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prdv_fec_prdv <= lp_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF lp_prov = 1 AND valor >= 0 THEN--provisiones positivas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF lp_activos = 1 AND estado = 1THEN --activos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN numcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF lp_activos = 2 AND estado = 2 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN numcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN numcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF lp_prov = 0 AND valor < 0 THEN --provisiones negativas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF lp_activos = 1 AND estado = 1THEN --activos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN numcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF lp_activos = 2 AND estado = 2 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN numcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN numcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_saldop_cliente(cliente INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CHAR(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE s_prom_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nproducto CHAR(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ncuenta CHAR(11);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE f_inicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE apellido VARCHAR(60);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nombres CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET apellido =60;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nombres =30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO apellido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = cliente;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera todas los productos que tiene el cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO nproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE tcdv_cod_tcdv = dpvi_cod_tcdv AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie = cliente AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_eacd IN (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ORDER BY 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- C�lculo para todo el a�o ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOR mes = 1 TO lp_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Fecha inicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET f_inicio = MDY(mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Fecha final de cada mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF (mes = 1) or (mes = 3) or (mes = 5) or (mes = 7) or (mes = 8)
or (mes = 10) or (mes = 12)THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- meses de 31 dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET f_fin = MDY(mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET dias = 31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF (mes = 4) or (mes = 6) or(mes = 9) or (mes = 11) THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- meses de 30 dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET f_fin = MDY(mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET dias = 30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF (mes = 2) THEN --Febrero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF MOD(lp_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET f_fin = MDY(mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET dias = 29;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET f_fin = MDY(mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET dias = 28;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Verifico si hay movimiento en el mes indicado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE sald_cod_dpvi = cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF contador > 0 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET s_prom_cuenta = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Busco el saldo anterior al mes en c�lculo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sald_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO saldo_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sald_cod_dpvi = cuenta AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_fec_sald = (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(sald_fec_sald)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_cod_dpvi = cuenta and sald_fec_sald <f_inicio);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF saldo_ant IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET saldo_ant = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --Recupera los saldos de la cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sald_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO saldo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sald_cod_dpvi = cuenta AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_fec_sald BETWEEN f_inicio AND f_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ndias = f_fecha - f_inicio ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET s_prom_cuenta = s_prom_cuenta + (saldo_ant*ndias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET f_inicio = f_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET saldo_ant = saldo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --C�lculo para el �ltimo registro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ndias = f_fin - f_inicio +1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET s_prom_cuenta = s_prom_cuenta + (saldo_ant*ndias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET s_prom_cuenta = s_prom_cuenta/dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET s_prom_cuenta = Round (s_prom_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET s_prom_cuenta = 0.00;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN nproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOR;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF lp_mes <12 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOR mes = lp_mes+ 1 TO 12')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET s_prom_cuenta = 0.00;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN nproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOR;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_patrocinio(lp_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cliente INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE pago_int DECIMAL;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE f_inicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera todas los productos que tiene el cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET f_inicio = MDY(1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET f_fin = MDY(12')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--lp_socio 1 socios 2 socios y clientes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--lp_activo 1 activos 2 activos e inactivos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF lp_socio = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF lp_activo = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Socios activos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT DISTINCT clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE clie_cod_clie = cred_cod_clie AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = soci_cod_clie AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soci_act_soci = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(divc_int_plaz) + sum(divc_int_deve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO pago_int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadipa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dipa_cod_divc = divc_cod_divc AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dipa_cod_pape = pape_cod_pape AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = cred_num_cred AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_clie = cliente AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' DATE(pape_fec_pape) BETWEEN f_inicio AND f_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF pago_int<> 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --Socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT DISTINCT clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE clie_cod_clie = cred_cod_clie AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = soci_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(divc_int_plaz) + sum(divc_int_deve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO pago_int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadipa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dipa_cod_divc = divc_cod_divc AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dipa_cod_pape = pape_cod_pape AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = cred_num_cred AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_clie = cliente AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' DATE(pape_fec_pape) BETWEEN f_inicio AND f_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF pago_int<> 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF lp_socio = 2 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF lp_activo = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Socios activos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT DISTINCT clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE soci_cod_clie = clie_cod_clie AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soci_act_soci = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(divc_int_plaz) + sum(divc_int_deve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO pago_int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadipa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dipa_cod_divc = divc_cod_divc AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dipa_cod_pape = pape_cod_pape AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = cred_num_cred AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_clie = cliente AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' DATE(pape_fec_pape) BETWEEN f_inicio AND f_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF pago_int<> 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT DISTINCT clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE clie_cod_clie = cred_cod_clie AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = soci_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(divc_int_plaz) + sum(divc_int_deve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO pago_int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadipa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dipa_cod_divc = divc_cod_divc AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dipa_cod_pape = pape_cod_pape AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = cred_num_cred AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_clie = cliente AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' DATE(pape_fec_pape) BETWEEN f_inicio AND f_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF pago_int<> 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_prms_carteras()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING CHAR(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE val_prm CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_prm integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_prm CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion1 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor1 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion2 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor2 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion3 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor3 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion4 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor4 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion5 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor5 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion6 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor6 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion7 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor7 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion8 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor8 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion9 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor9 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT prms_des_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO des_prm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaprms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE prms_cod_prms = vprm_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND prms_cod_modu = 17')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND prms_cod_prms BETWEEN 1700 AND 1719')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF cod_prm = 1700 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1701 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1702 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1703 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1704 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1705 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1706 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1707 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1708 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_r_cta_provision(lp_cuenta INTEGER)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de c�lculo de saldo promedio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE saldo DECIMAL; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de retorno ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE fecha DATE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE tasi CHAR;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE tipodoc CHAR(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor DECIMAL; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE numdocu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera todas las cuentas que tiene el producto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT bcaprdv.prdv_fec_prdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaprdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE prdv_cod_dpvi = dpvi_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdv_cod_dpvi = lp_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF tasi= ''C'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET saldo = saldo + valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET saldo = saldo - valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN numcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_val_prm_conta(ai_cod_usua int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_cont = (select cous_cod_cont from bcacous ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cous_cod_usua = ai_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cous_ban_cous = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cous_con_acti = 1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_tipo = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_cod_cont;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select cpar_val_paco from bcacpar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cpar_cod_cont = li_cod_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cpar_cod_paco = 1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_cod_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_opera_hora(ad_fecha DATE)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Variables de consulta y retorno')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nom_clie CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ape_clie VARCHAR(60);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE fec_pape DATETIME YEAR TO
SECOND;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_caja CHAR(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_tdoc CHAR(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE capital')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE seguro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE locales')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Recupera todos los movimientos seg�n fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie.clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie.clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie.clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('caja_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcaclie.clie_cod_clie = bcacred.cred_cod_clie ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = divc_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cod_divc = pape_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_usua = caja_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_tdoc in (''CDT''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Date(pape_fec_pape) = ad_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Recupera valor de papeletas por cada rubro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpap_val_dpap into capital from bcadpap where dpap_cod_pape =
cod_pape and dpap_cod_tasi = ''C'' and dpap_cod_rubr = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpap_val_dpap into interes from bcadpap where dpap_cod_pape =
cod_pape and dpap_cod_tasi = ''C'' and dpap_cod_rubr = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpap_val_dpap into mora from bcadpap where dpap_cod_pape =
cod_pape and dpap_cod_tasi = ''C'' and dpap_cod_rubr = 4;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpap_val_dpap into notifica from bcadpap where dpap_cod_pape =
cod_pape and dpap_cod_tasi = ''C'' and dpap_cod_rubr = 7;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpap_val_dpap into seguro from bcadpap where dpap_cod_pape =
cod_pape and dpap_cod_tasi = ''C'' and dpap_cod_rubr = 8;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpap_val_dpap into judicial from bcadpap where dpap_cod_pape =
cod_pape and dpap_cod_tasi = ''C'' and dpap_cod_rubr = 9;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dpap_val_dpap) into otros from bcadpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpap_cod_tasi = ''C'' and dpap_cod_rubr = rubr_cod_rubr and rubr_cod_modu
= 17;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select pdte_val_pdte into efectivo from bcapdte')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select pdte_val_pdte into locales from bcapdte')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(pdte_val_pdte) into plazas from bcapdte')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sprom_cuenta(cuenta int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de c�lculo de saldo promedio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldo_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de retorno ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ndias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define borrar1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define f_inicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let f_inicio=lp_fdesde;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let totaldias=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let s_prom_cuenta=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera saldo anterior a la fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select bcasald.sald_dispo into saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sald_cod_dpvi = cuenta and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sald_fec_sald < lp_fdesde;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let saldo=isNull(saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select bcasald.sald_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sald_cod_dpvi = cuenta and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sald_fec_sald between lp_fdesde and lp_fhasta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ndias=f_fin-f_inicio+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let totaldias=totaldias+ndias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let borrar1=saldo*ndias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let s_prom_cuenta=s_prom_cuenta+(saldo*ndias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let f_inicio=f_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Si no hay mas registros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let saldo=saldo_ant;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let f_fin=lp_fhasta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ndias=f_fin-f_inicio+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let totaldias=totaldias+ndias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let borrar1=saldo*ndias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let s_prom_cuenta=s_prom_cuenta+(saldo*ndias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let f_inicio=f_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_temdepe(as_ciudad char(20))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ciud=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select prov_cod_prov into li_cod_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaprov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where prov_cod_prov = ciud_cod_prov and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciud_cod_ciud = ofic_cod_ciud and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_ofic = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_prov is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ciud_cod_ciud into li_cod_ciud from bcaciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ciud_nom_ciud like as_ciudad;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ciud = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if as_ciudad is null or as_ciudad = '''' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let as_ciudad=''NO DEFINIDA'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select MAX(ciud_cod_ciud) into li_maximo from bcaciud;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_maximo is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_maximo=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcaciud values(li_maximo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ciud=li_maximo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_cod_ciud;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_scnat_actividad(ai_persona integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(180)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_numero integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_socio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_ocupac char(180);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_asocio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cod_oc integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_acliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Creaci�n del cursor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_asocio=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_acliente=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach c_actividad for ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select unique ocup_des_ocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_ocupac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where acli_cod_ocup = ocup_cod_ocup and acli_cod_tact = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(clie_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where acli_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acli_cod_ocup = cod_oc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri = ai_persona and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where acli_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acli_cod_ocup = cod_oc and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri = ai_persona and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli <> 1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if d_socio <>0 or d_cliente<>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=d_numero+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if d_numero<6 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_ocupac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_asocio=d_asocio+d_socio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_acliente=d_acliente+d_cliente;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_ocupac= OTRAS;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_ocupac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('exit foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_gscnj_actividad(ai_persona integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(180)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_numero integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_socio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_ocupac char(180);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_asocio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cod_oc integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigo char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_acliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Creaci�n del cursor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_asocio=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_acliente=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach c_actividad for ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select unique ocup_des_ocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_ocupac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where acli_cod_ocup = ocup_cod_ocup and acli_cod_tact = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(clie_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where acli_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acli_cod_ocup = cod_oc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri = ai_persona and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where acli_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acli_cod_ocup = cod_oc and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri = ai_persona and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli <> 1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if d_socio <>0 or d_cliente<>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=d_numero+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if d_numero<6 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_socio<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Socios; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_ocupac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_cliente<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Clientes; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_ocupac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_asocio=d_asocio+d_socio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_acliente=d_acliente+d_cliente;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_ocupac= OTRAS;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_socio<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Socios; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_ocupac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_cliente<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Clientes; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_ocupac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('exit foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_gscnat_depe()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(180)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_numero integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_socio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_depe char(180);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigo char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_asocio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cod_depe integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_acliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Creaci�n del cursor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Creaci�n del cursor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_asocio=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_acliente=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach c_actividad for ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select unique depe_nom_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depe_cod_depe=decl_cod_depe and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_clna=decl_cod_clna ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_clna = decl_cod_clna and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decl_cod_depe=cod_depe and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(clie_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_clna = decl_cod_clna and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decl_cod_depe=cod_depe and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli <> 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----validaci�n de las variables de socio y clientes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if d_socio <>0 or d_cliente<>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=d_numero+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if d_numero<6 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_socio<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Socios; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_cliente<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Clientes; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_asocio=d_asocio+d_socio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_acliente=d_acliente+d_cliente;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_depe= OTRAS;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_socio<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Socios; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_cliente<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Clientes; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('exit foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_gscnat_sectort()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(180)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_numero integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_socio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_sector char(180);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigo char(20); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_asocio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cod_sector integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_acliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Creaci�n del cursor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_asocio=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_acliente=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach c_sector for ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select unique sect_des_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clna_cod_sect=sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_sect = cod_sector and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(clie_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = clna_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_sect = cod_sector and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli <> 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if d_socio <>0 or d_cliente<>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=d_numero+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if d_numero<6 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_socio<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Socios; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_cliente<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Clientes; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_asocio=d_asocio+d_socio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_acliente=d_acliente+d_cliente;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_sector= OTROS;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_socio<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Socios; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_cliente<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Clientes; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('exit foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_gscnj_sectordo(ai_persona integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(180)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_numero integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_socio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_sector char(180);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigo char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_asocio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cod_sector integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_acliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Creaci�n del cursor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_asocio=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_acliente=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach c_sector for ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select unique sect_des_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_sect=sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_sect = cod_sector and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri =ai_persona;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(clie_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_sect = cod_sector and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli <> 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri = ai_persona;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if d_socio <>0 or d_cliente<>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=d_numero+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if d_numero<6 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_socio<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Socios; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_cliente<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Clientes; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_asocio=d_asocio+d_socio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_acliente=d_acliente+d_cliente;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_sector= OTROS;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_socio<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Socios; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (d_cliente<>0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let codigo=Clientes; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('exit foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_pcr(producto INTEGER)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de c�lculo de saldo promedio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de retorno ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE s_prom_cuenta DECIMAL; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE f_inicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera todas las cuentas que tiene el producto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT bcadpvi.dpvi_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE dpvi_cod_tcdv = producto AND dpvi_cod_eacd IN (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET totaldias = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET s_prom_cuenta = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --Recupera saldo anterior al c�lculo del saldo promedio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT bcasald.sald_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sald_cod_dpvi = cuenta AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_fec_sald < today;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF saldo IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_movi_hora(ad_fecha DATE)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Variables de consulta y retorno')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nom_clie CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ape_clie VARCHAR(60);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE fec_pape DATETIME YEAR TO
SECOND;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_caja CHAR(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_tdoc CHAR(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE det_mcdv CHAR(300);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cheque_l')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_tran VARCHAR(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_caja CHAR(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ingreso =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let egreso =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Recupera todos los movimientos seg�n fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct bcamcdv.mcdv_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapape.pape_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_det_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi.dpvi_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapape.pape_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran.tran_des_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja.caja_des_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE pape_cod_pape = mcdv_cod_pape and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_caja = caja_cod_caja and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_fec_mcdv =ad_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran = tran_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by mcdv_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Recupera los valores de cada transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bcaddte.ddte_val_ddte into efectivo from bcaddte where
bcaddte.ddte_cod_mcdv = cod_mcdv and bcaddte.ddte_cod_tfpg = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bcaddte.ddte_val_ddte into cheque_l from bcaddte where
bcaddte.ddte_cod_mcdv = cod_mcdv and bcaddte.ddte_cod_tfpg = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bcaddte.ddte_val_ddte into cheque_p from bcaddte where
bcaddte.ddte_cod_mcdv = cod_mcdv and bcaddte.ddte_cod_tfpg in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Selecciona nombre de la transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF cod_tran = 8 or cod_tran =11 or cod_tran = 13 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ingreso = val_mcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET egreso =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF cod_tran = 6 or cod_tran = 9 or cod_tran = 10 or cod_tran =12 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET egreso =val_mcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ingreso =0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cheque_p')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RESUME;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_movi_hora_caja(ad_fecha DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Variables de consulta y retorno')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nom_clie CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ape_clie VARCHAR(60);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE fec_pape DATETIME YEAR TO
SECOND;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_caja CHAR(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_tdoc CHAR(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE det_mcdv CHAR(300);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cheque_l')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_tran VARCHAR(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_caja CHAR(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ingreso =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let egreso =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Recupera todos los movimientos seg�n fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct bcamcdv.mcdv_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapape.pape_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_det_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi.dpvi_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapape.pape_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran.tran_des_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja.caja_des_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE pape_cod_pape = mcdv_cod_pape and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_caja = caja_cod_caja and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_fec_mcdv =ad_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran = tran_cod_tran and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_caja = ad_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by mcdv_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Recupera los valores de cada transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bcaddte.ddte_val_ddte into efectivo from bcaddte where
bcaddte.ddte_cod_mcdv = cod_mcdv and bcaddte.ddte_cod_tfpg = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bcaddte.ddte_val_ddte into cheque_l from bcaddte where
bcaddte.ddte_cod_mcdv = cod_mcdv and bcaddte.ddte_cod_tfpg = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bcaddte.ddte_val_ddte into cheque_p from bcaddte where
bcaddte.ddte_cod_mcdv = cod_mcdv and bcaddte.ddte_cod_tfpg in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Selecciona nombre de la transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF cod_tran = 8 or cod_tran =11 or cod_tran = 13 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ingreso = val_mcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET egreso =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF cod_tran = 6 or cod_tran = 9 or cod_tran = 10 or cod_tran =12 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET egreso =val_mcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ingreso =0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cheque_p')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RESUME;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_movi_clie(ad_fecha DATE)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Variables de consulta y retorno')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nom_clie CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ape_clie VARCHAR(60);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE fec_pape DATETIME YEAR TO
SECOND;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_caja CHAR(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_tdoc CHAR(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE det_mcdv CHAR(300);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cheque_l')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_tran VARCHAR(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_caja CHAR(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ingreso =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let egreso =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Recupera todos los movimientos seg�n fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct bcamcdv.mcdv_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapape.pape_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_det_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi.dpvi_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapape.pape_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran.tran_des_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja.caja_des_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE pape_cod_pape = mcdv_cod_pape and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_caja = caja_cod_caja and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_fec_mcdv =ad_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran = tran_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by mcdv_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Recupera los valores de cada transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bcaddte.ddte_val_ddte into efectivo from bcaddte where
bcaddte.ddte_cod_mcdv = cod_mcdv and bcaddte.ddte_cod_tfpg = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bcaddte.ddte_val_ddte into cheque_l from bcaddte where
bcaddte.ddte_cod_mcdv = cod_mcdv and bcaddte.ddte_cod_tfpg = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bcaddte.ddte_val_ddte into cheque_p from bcaddte where
bcaddte.ddte_cod_mcdv = cod_mcdv and bcaddte.ddte_cod_tfpg in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Selecciona nombre de la transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF cod_tran = 8 or cod_tran =11 or cod_tran = 13 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ingreso = val_mcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET egreso = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF cod_tran = 6 or cod_tran = 9 or cod_tran = 10 or cod_tran =12 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET egreso =val_mcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ingreso =0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cheque_p')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RESUME;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_movi_clie_caja(ad_fecha DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Variables de consulta y retorno')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nom_clie CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ape_clie VARCHAR(60);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE fec_pape DATETIME YEAR TO
SECOND;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_caja CHAR(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_tdoc CHAR(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE det_mcdv CHAR(300);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cheque_l')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_tran VARCHAR(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_caja CHAR(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ingreso =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let egreso =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Recupera todos los movimientos seg�n fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct bcamcdv.mcdv_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapape.pape_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_det_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi.dpvi_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapape.pape_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran.tran_des_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja.caja_des_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE pape_cod_pape = mcdv_cod_pape and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_caja = caja_cod_caja and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_fec_mcdv =ad_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran = tran_cod_tran and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_caja = ad_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by mcdv_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Recupera los valores de cada transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bcaddte.ddte_val_ddte into efectivo from bcaddte where
bcaddte.ddte_cod_mcdv = cod_mcdv and bcaddte.ddte_cod_tfpg = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bcaddte.ddte_val_ddte into cheque_l from bcaddte where
bcaddte.ddte_cod_mcdv = cod_mcdv and bcaddte.ddte_cod_tfpg = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bcaddte.ddte_val_ddte into cheque_p from bcaddte where
bcaddte.ddte_cod_mcdv = cod_mcdv and bcaddte.ddte_cod_tfpg in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Selecciona nombre de la transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF cod_tran = 8 or cod_tran =11 or cod_tran = 13 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ingreso = val_mcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET egreso = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF cod_tran = 6 or cod_tran = 9 or cod_tran = 10 or cod_tran =12 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET egreso =val_mcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ingreso =0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cheque_p')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RESUME;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_estado_depos(cliente INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE fec_mcdv DATE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_tdoc CHAR(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE num_docu INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_tran INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_tcdv CHAR(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ape_clie VARCHAR(60);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nom_clie CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE num_mcdv CHAR(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET saldo =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obtenci�n del ultimo saldo menor a la fecha inicial ingresada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpvi_cod_dpvi into cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpvi_cod_clie = cliente and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_tcdv = cod_tcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sald_dispo into ult_saldo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sald_fec_sald in (select max(sald_fec_sald) from bcasald ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_fec_sald < fec_ini')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sald_cod_dpvi =cod_dpvi) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sald_cod_dpvi = cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ult_saldo is null THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ult_saldo =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET saldo = ult_saldo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera los movimientos de un cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT bcamcdv.mcdv_fec_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_num_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran.tran_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv.mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatcdv.tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO fec_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE ( bcadpvi.dpvi_cod_clie = bcaclie.clie_cod_clie ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcamcdv.mcdv_cod_dpvi = bcadpvi.dpvi_cod_dpvi ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcatcdv.tcdv_cod_tcdv = bcadpvi.dpvi_cod_tcdv ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcatran.tran_cod_tran = bcamcdv.mcdv_cod_tran ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( ( bcaclie.clie_cod_clie = cliente ) AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcadpvi.dpvi_cod_tcdv = cod_tcdv ) AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcamcdv.mcdv_fec_mcdv between fec_ini and fec_fin ) ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF cod_tran = 8 or cod_tran = 13 or cod_tran = 11 or cod_tran = 35
THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET saldo = saldo + val_mcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF cod_tran = 6 or cod_tran = 9 or cod_tran = 10 or cod_tran = 12
THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET saldo=saldo -val_mcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN fec_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WITH RESUME;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_estado_prov(cliente INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING DATETIME YEAR TO SECOND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE f_provision DATETIME YEAR TO SECOND;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_tdoc CHAR(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE num_docu INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_tasi CHAR(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE num_cliente INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_tcdv CHAR(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE apellido VARCHAR(60);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nombres CHAR(30); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET saldo =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera las provisiones de un cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT bcaclie.clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatcdv.tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaprdv.prdv_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaprdv.prdv_num_docu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaprdv.prdv_val_prdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaprdv.prdv_cod_tasi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaprdv.prdv_fec_prdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO num_cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' num_docu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaprdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE ( bcadpvi.dpvi_cod_clie = bcaclie.clie_cod_clie ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcadpvi.dpvi_cod_dpvi = bcaprdv.prdv_cod_dpvi ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcatcdv.tcdv_cod_tcdv = bcadpvi.dpvi_cod_tcdv ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( ( bcaclie.clie_cod_clie = cliente) AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcatcdv.tcdv_cod_tcdv = cod_tcdv ) ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- C�lculo de saldos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF cod_tasi =D THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET saldo = saldo+valor_prdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN f_provision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WITH RESUME;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_saldo_cuenta_c(ai_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_tcue char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--
*************************************************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Saldo de cuentas para movimientos de cuentas consolidadas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--
*************************************************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if not exists(select ccco_cod_ctas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccco_cod_ctas = ai_cod_ctas) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_saldo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_cod_tcue = (select ccco_cod_tcue from bcaccco where ccco_cod_ctas
= ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select ccon_cod_ejer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_peri = Month(ada_fecha);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = (select sum(csac_sal_debi) - sum(csac_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where csac_cod_mese < Month(ada_fecha)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and csac_cod_ctas = ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldo is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if lc_cod_tcue = ''M'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_debe = (select sum(cdco_val_cdco)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccom_cod_ccom = cdco_cod_ccom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cdco_cod_tasi = ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccom_cod_mese = li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccom_fec_ccom < ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cdco_cod_ctas = ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_habe = (select sum(cdco_val_cdco)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccom_cod_ccom = cdco_cod_ccom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cdco_cod_tasi = ''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccom_cod_mese = li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccom_fec_ccom < ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cdco_cod_ctas = ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_debe is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_debe = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_habe is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_habe = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = ld_saldo + ld_debe - ld_habe;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_saldo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_mov_ctas_cons(ada_fec_ini date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nom_ctas char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_tdoc char(03);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_benefi char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--************************************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Consulta de movimientos de cuentas consolidadas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--************************************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_aux_cta = '''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccom_fec_ccom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (case cdco_cod_tasi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''D'' then cdco_val_cdco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''C'' then cdco_val_cdco * -1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end) as valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccom_cod_ccom = cdco_cod_ccom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cdco_cod_ctas = ccco_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccco_cod_tcue = ''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccom_fec_ccom between ada_fec_ini and ada_fec_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccco_cod_ccon between ac_cta_ini and ac_cta_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lc_aux_cta <> lc_cod_ccon then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_total = sp_saldo_cuenta_c (li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_aux_cta = lc_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return lc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_r_b_compro_cage(ai_ejercicio integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_detalle char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obtiene codigo de moneda nacional')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_moneda = (select vprm_val_vprm from bcavprm where vprm_cod_prms =
2);')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-----------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Balance de Comprobaci�n Consolidado por agencias')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
----------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum( sacp_sal_debi ) as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum( sacp_sal_cred ) as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(''''' as detalle')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select distinct ccco_nom_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where length(ccco_cod_ccon) = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('substr(x.ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select sum(sacp_sal_debi - sacp_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasacp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sacp_cod_ctas = ccco_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sacp_cod_mese < ai_mes1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccco_cod_ccon = x.ccco_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('length( ccco_cod_ccon) <= ai_nivel) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasacp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaccco x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( sacp_cod_ctas = x.ccco_cod_ctas ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( sacp_cod_mese between ai_mes1 and ai_mes2 ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( length ( x.ccco_cod_ccon ) <= ai_nivel ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccco_cod_mone = li_moneda ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( ccco_cod_tcue = ''A'' )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UNION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum( sacp_sal_debi ) as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum( sacp_sal_cred ) as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cons_cod_cons as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cons_des_cons as detalle')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select distinct ccco_nom_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where length(ccco_cod_ccon) = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('substr(x.ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select sum(sacp_sal_debi - sacp_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasacp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sacp_cod_ctas = ccco_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sacp_cod_mese < ai_mes1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccco_cod_ccon = x.ccco_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('length( ccco_cod_ccon) <= ai_nivel) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasacp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaccco x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacons')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( sacp_cod_ctas = x.ccco_cod_ctas ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( sacp_cod_cons = cons_cod_cons ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( sacp_cod_mese between ai_mes1 and ai_mes2 ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( length ( x.ccco_cod_ccon ) <= ai_nivel ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccco_cod_mone = li_moneda ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( ccco_cod_tcue = ''M'' ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ORDER BY 1 ASC ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp b_compro_cage;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Verifica si existe cuentas en otra moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_total = (select count(distinct sacp_cod_ctas) from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sacp_cod_ctas = ccco_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_mone <> li_moneda and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_mese between ai_mes1 and ai_mes2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('length(ccco_cod_ccon ) <= ai_nivel );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('If li_total > 0 Then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum( sacp_sal_debi )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum( sacp_sal_cred )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cons_cod_cons')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cons_des_cons')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasacp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacons')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccco_cod_ctas = sacp_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_mone <> li_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_cons = cons_cod_cons and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_mese between ai_mes1 and ai_mes2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('length( ccco_cod_ccon ) <= ai_nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('call sp_tmpsacp_2(lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('End If;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from b_compro_cage')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table b_compro_cage;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_r_b_pergan_cage(ai_ejercicio integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_ingreso char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_detalle char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nombre char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_tipo')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Balance de p�rdidas y ganancias consolidado por agencias')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obtiene codigo de moneda nacional')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_moneda = (select vprm_val_vprm from bcavprm where vprm_cod_prms =
2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT ccco_cod_ccon as codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccco_nom_ccon as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(sacp_sal_debi - sacp_sal_cred ) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(''''' as detalle')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select distinct ccco_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where length(ccco_cod_ccon) = 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(x.ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasacp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccco x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( sacp_cod_ctas = x.ccco_cod_ctas ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( sacp_cod_mese <= ai_mesf ) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( x.ccco_cod_ccon >=''4'') AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( x.ccco_cod_ccon <''6'') AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( length(x.ccco_cod_ccon)<= ai_nivel ) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccco_cod_mone = li_moneda ) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccco_cod_tcue = ''A'' )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UNION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT ccco_cod_ccon as codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccco_nom_ccon as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(sacp_sal_debi - sacp_sal_cred ) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cons_cod_cons as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cons_des_cons as detalle')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select distinct ccco_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where length(ccco_cod_ccon) = 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(x.ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasacp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccco x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacons')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( sacp_cod_ctas = x.ccco_cod_ctas ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( sacp_cod_mese <= ai_mesf ) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( sacp_cod_cons = cons_cod_cons ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( x.ccco_cod_ccon >=''4'') AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( x.ccco_cod_ccon <''6'') AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( length(x.ccco_cod_ccon)<= ai_nivel ) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccco_cod_mone = li_moneda ) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccco_cod_tcue = ''M'' )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ORDER BY 1 ASC ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp b_pergan_cage;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obtiene cuenta de ingreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cont_cta_ingr into lc_ingreso from bcacont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Verifica si existe cuentas en otra moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_total = ( select count(distinct sacp_cod_ctas ) from bcasacp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sacp_cod_ctas = ccco_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_mese <= ai_mesf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_mone <> li_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('length(ccco_cod_ccon ) <= ai_nivel );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('If li_total > 0 Then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccco_cod_ctas = sacp_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_mone <> li_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_mese <= ai_mesf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_cons = cons_cod_cons and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('length(ccco_cod_ccon) <= ai_nivel and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_tcue = ''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('call sp_tmpsacp_1(lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('End If;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from b_pergan_cage')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table b_pergan_cage;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_r_s_gene_cage(ai_ejercicio integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_ingreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_detalle char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_gasto')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
----')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Estado de S. General consolidado por agencias')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
----')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obtiene codigo de moneda nacional')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_moneda = (select vprm_val_vprm from bcavprm where vprm_cod_prms =
2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT ccco_cod_ccon as codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccco_nom_ccon as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(sacp_sal_debi - sacp_sal_cred ) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(''''' as detalle')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select distinct ccco_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where length(ccco_cod_ccon) = 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(x.ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select distinct ccco_nom_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where length(ccco_cod_ccon) = 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(x.ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasacp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaccco x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( sacp_cod_ctas = x.ccco_cod_ctas ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( sacp_cod_mese <= ai_mesf ) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( x.ccco_cod_ccon not like ''4%'') AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( x.ccco_cod_ccon not like ''5%'') AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( length(x.ccco_cod_ccon) <= ai_nivel ) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccco_cod_mone = li_moneda ) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccco_cod_tcue = ''A'' )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UNION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT ccco_cod_ccon as codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccco_nom_ccon as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(sacp_sal_debi - sacp_sal_cred ) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cons_cod_cons as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cons_des_cons as detalle')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select distinct ccco_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where length(ccco_cod_ccon) = 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(x.ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select distinct ccco_nom_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where length(ccco_cod_ccon) = 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(x.ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasacp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaccco x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacons')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( sacp_cod_ctas = x.ccco_cod_ctas ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( sacp_cod_mese <= ai_mesf ) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( sacp_cod_cons = cons_cod_cons ) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( x.ccco_cod_ccon not like ''4%'') AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( x.ccco_cod_ccon not like ''5%'') AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( length(x.ccco_cod_ccon) <= ai_nivel ) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccco_cod_mone = li_moneda ) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccco_cod_tcue = ''M'' )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ORDER BY 1 ASC ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp s_gene_cage;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obtiene cuenta de ingreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cont_cta_ingr into lc_ingreso from bcacont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('If Trim(lc_ingreso) = ''4'' Then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_gasto = ''5'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_gasto = ''4'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('End If')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Gastos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sacp_sal_debi - sacp_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_gasto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasacp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sacp_cod_ctas = ccco_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_mese <= ai_mesf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_ccon = lc_gasto;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sacp_sal_debi - sacp_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_ingreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasacp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sacp_cod_ctas = ccco_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_mese <= ai_mesf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_ccon = lc_ingreso;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_total = (select count(distinct sacp_cod_ctas ) from bcasacp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sacp_cod_ctas = ccco_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_mese <= ai_mesf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_mone <> li_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('length ( ccco_cod_ccon ) <= ai_nivel );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('If li_total > 0 Then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccco_cod_ctas = sacp_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_mone <> li_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_cons = cons_cod_cons and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_mese <= ai_mesf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('length(ccco_cod_ccon) <= ai_nivel and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_tcue = ''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('call sp_tmpsacp(lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('End If;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from s_gene_cage')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table s_gene_cage;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_r_saldo_cta_c(ac_cta_ini char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_ccon char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nom_ctas char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_des_mese char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_debitos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--
*****************************************************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Procedure para reporte de saldo por cuenta CONSOLIDACION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--
*****************************************************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccco_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccco_cod_ccon >= ac_cta_ini')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccco_cod_ccon <= ac_cta_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_sal_cta_mes_c(li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select *')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lc_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from t_saldo_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_subtotal = ld_debitos - ld_creditos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return lc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' drop table t_saldo_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_nexo(ejercicio integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cartera char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_plu_mone char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_clave char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_mone integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT ''CARTERA ACTIVA '' as cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''A'' as clave')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(divc_cap_divc) as valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mone_plu_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(Select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon = Substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = ejercicio ) as codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(Select ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon = Substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = ejercicio ) as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select sum(sact_sal_debi-sact_sal_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sact_cod_ctas = x.ccon_cod_ctas) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaccon x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcamone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcacred.cred_num_cred = bcadivc.divc_num_cred ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_tip_ccon = x.ccon_cod_ccon ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_cod_ecre in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_cod_mone = mone_cod_mone ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccon_cod_ejer = ejercicio ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccon_cod_mone = mone_cod_mone ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcadivc.divc_cod_ediv = 1 )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UNION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT ''CARTERA VENCIDA'' as cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''B'' as clave')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(divc_cap_divc) as valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mone_plu_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(Select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon = Substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = ejercicio ) as codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(Select ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon = Substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = ejercicio ) as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select sum(sact_sal_debi-sact_sal_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''1402''||Substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = ejercicio) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaccon x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcamone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcacred.cred_num_cred = bcadivc.divc_num_cred ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_tip_ccon = x.ccon_cod_ccon ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_cod_ecre in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_cod_mone = mone_cod_mone ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccon_cod_ejer = ejercicio ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccon_cod_mone = mone_cod_mone ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcadivc.divc_cod_ediv = 2 )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UNION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT ''CARTERA EN RIESGO'' as cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''C'' as clave')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(divc_cap_divc) as valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mone_plu_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(Select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon = Substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = ejercicio ) as codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(Select ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon = Substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = ejercicio ) as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select sum(sact_sal_debi-sact_sal_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''1405''||Substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = ejercicio ) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaccon x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcamone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcacred.cred_num_cred = bcadivc.divc_num_cred ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_tip_ccon = x.ccon_cod_ccon ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_cod_ecre in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_cod_mone = mone_cod_mone ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccon_cod_ejer = ejercicio ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( x.ccon_cod_mone = mone_cod_mone ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcadivc.divc_cod_ediv = 3 )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp ziza;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- ********* INTERES PROVISIONADO *************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT ''INTERES PROVISIONADO'' as cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''D'' as clave')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(divc_int_deve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_plu_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ls_cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcacred.cred_num_cred = bcadivc.divc_num_cred ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcacred.cred_cod_ecre in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcacred.cred_cod_mone = mone_cod_mone ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( ccon_cod_ccon = Substr(cred_tip_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( ccon_cod_ejer = ejercicio ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_aux_ccon = provision||Trim(Substr(ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Inter�s Provisionado Contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT sum(sact_sal_debi-sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ls_aux_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = ejercicio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO ziza VALUES(ls_cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- ******* Inter�s Vencido ***********')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT ''INTERES VENCIDO'' as cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''8'' as clave')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(divc_int_plaz)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mone_plu_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO ls_cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcamone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcacred.cred_num_cred = bcadivc.divc_num_cred ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_tip_ccon = ccon_cod_ccon ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_cod_ecre in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_cod_mone = mone_cod_mone ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( ccon_cod_ejer = ejercicio ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccon_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Inter�s Vencido Contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT sum(sact_sal_debi-sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = vencido and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = ejercicio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO ziza VALUES(''INTERES''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Inter�s por Vencer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT ''INTERES POR VENCER'' as cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''9'' as clave')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(divc_int_deve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mone_plu_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO ls_cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcamone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcacred.cred_num_cred = bcadivc.divc_num_cred ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_tip_ccon = ccon_cod_ccon ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_cod_ecre in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcacred.cred_cod_mone = mone_cod_mone ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( ccon_cod_ejer = ejercicio ) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( divc_cod_ediv = 3 ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccon_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inter�s por Vencer Contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT sum(sact_sal_debi-sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = vencer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = ejercicio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO ziza VALUES(''INTERES''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--*************** Retorna anexo ************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from ziza')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table ziza;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_cv_cgarantes(lp_fecha DATE)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de consulta select para garantes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE agarante VARCHAR(60);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ngarante CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE direccion CHAR(55);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE contador INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de retorno ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ncliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE direcciong1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE fecha DATE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE capital')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE plural CHAR(20);
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera todos los parametros segun el parametro de fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT distinct bcaclie.clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie.clie_nom_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum( bcadivc.divc_cap_divc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum( bcadivc.divc_int_plaz )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('min( bcadivc.divc_fec_venc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count( bcadivc.divc_cod_divc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mone_plu_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mone_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcamone ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcacred.cred_cod_clie = bcaclie.clie_cod_clie ) AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcadivc.divc_num_cred = bcacred.cred_num_cred ) AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_fec_venc < lp_fecha AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = mone_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' GROUP BY 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET contador = 0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera garantes de acuerdo al credito anterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT bcaclie.clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie.clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie.clie_dir_domi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO agarante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcagara')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE gara_num_cred = credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND gara_cod_clie = clie_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET contador = contador + 1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET garante2 = '' '';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ngarante2 = '' '';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET direcciong2 = '' '';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF contador = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET garante1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF contador = 2 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET garante2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF contador = 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET direcciong2 = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ngarante2 = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET garante2 = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET direcciong1 = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ngarante1 = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET garante1 = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_re_cgarantes(lp_fecha DATE)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de consulta select para garantes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE agarante VARCHAR(60);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ngarante CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE direccion CHAR(55);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE contador INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de retorno ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ncliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE direcciong1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE fecha DATE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE capital')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE plural CHAR(20);
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera todos los parametros segun el parametro de fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT distinct bcaclie.clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie.clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie.clie_nom_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum( bcadivc.divc_cap_divc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum( bcadivc.divc_int_plaz )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('min ( bcadivc.divc_fec_venc )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count ( bcadivc.divc_cod_divc )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mone_plu_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mone_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcamone ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcacred.cred_cod_clie = bcaclie.clie_cod_clie ) AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcadivc.divc_num_cred = bcacred.cred_num_cred ) AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cod_ediv in (2) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_fec_venc < lp_fecha AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = mone_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET contador = 0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera garantes de acuerdo al credito anterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT bcaclie.clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie.clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie.clie_dir_domi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO agarante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcagara')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE gara_num_cred = credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND gara_cod_clie = clie_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET contador = contador + 1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET garante2 = '' '';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ngarante2 = '' '';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET direcciong2 = '' '';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF contador = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET garante1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF contador = 2 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET garante2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF contador = 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET direcciong2 = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ngarante2 = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET garante2 = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET direcciong1 = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ngarante1 = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET garante1 = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_saldos_ctas_c(ai_cod_ctas Integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_tcue char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_mes char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_debe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--*******************************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Consulta de Saldos de cuentas consolidadas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--*******************************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_cod_tcue = (select ccco_cod_tcue from bcaccco where ccco_cod_ctas
= ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if lc_cod_tcue = ''A'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_cuenta = (select ccco_cod_ccon from bcaccco where ccco_cod_ctas
= ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_cuenta = trim(lc_cuenta) || ''*'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(csac_sal_debi) debe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(csac_sal_cred) haber')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from OUTER bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where csac_cod_mese = mese_cod_mese and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csac_cod_ctas = ccco_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = ai_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccco_cod_tcue = ''M'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese <= 12 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccco_cod_ccon matches lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_sal_debi debe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_sal_cred haber')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from OUTER bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where csac_cod_mese = mese_cod_mese and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese <= 12 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ctas = ai_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = ai_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp t_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(debe) debe ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(haber) haber')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from t_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp t_saldos_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' drop table t_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_sal_debi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_sal_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from OUTER bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where csac_cod_mese = mese_cod_mese and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese <= 12 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ctas = ai_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = ai_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp t_saldos_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select *')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lc_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ld_debe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ld_haber')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from t_saldos_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return lc_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table t_saldos_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_datos_consolidacion(ai_ejercicio integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--variables que retornan los valores')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_debe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ccon char(8);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--variables para saldos finales')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_debe_final')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--variables de control')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_peri_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--si es periodo final saco los saldos hasta diciembre y se suma los
saldos de los asientos de cierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select peri_mes_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_mes_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where peri_cod_peri = ai_periodo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_mes_peri < 13 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_peri_fin = ai_periodo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_peri_fin = ai_periodo - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT peri_mes_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_sal_debi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_sal_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ctas = sact_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri <= li_peri_fin and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ORDER BY ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_mes_peri = 13 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_debe_final')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi = ''D'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_cod_ejer = ai_periodo and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_ctas = li_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_cred_final')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi = ''C'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_cod_ejer = ai_periodo and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_ctas = li_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not ld_debe_final is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_debe = ld_debe + ld_debe_final;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not ld_cred_final is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cred = ld_cred + ld_cred_final;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_prms_variables()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING CHAR(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE val_prm CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_prm integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_prm CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion1 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor1 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion2 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor2 INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion3 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor3 INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion4 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor4 INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion5 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor5 INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion6 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor6 INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion7 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor7 DEC(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion8 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor8 INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion10 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor10 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion11 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor11 INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion12 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor12 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion13 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor13 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor14 char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descripcion14 char(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE fecha DATE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE fechaf DATE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion12')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descripcion14')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT PRMS_DES_PRMS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO DES_PRM')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM BCAPRMS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('PRMS_COD_PRMS = VPRM_COD_PRMS AND PRMS_COD_MODU = 17 AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(PRMS_COD_PRMS BETWEEN 1760 AND 1766 OR PRMS_COD_PRMS BETWEEN 1769 AND
1779)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF cod_prm = 1760 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1761 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm =1762 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1763 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1764 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1765 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1766 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1769 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1770 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1771 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion12')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1772 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1773 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1777 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let descripcion14')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET fecha = valor12;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET fechaf = valor13;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_r_b_compro_c(ai_ejercicio integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Balance de Comprobaci�n Consolidado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccco_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum( csac_sal_debi ) as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum( csac_sal_cred ) as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select distinct ccco_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where length(ccco_cod_ccon) = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(x.ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(csac_sal_debi - csac_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where csac_cod_ctas = ccco_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_mese < ai_mes1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccco_cod_ccon = x.ccco_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' length( ccco_cod_ccon) <= ai_nivel and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = ai_ejercicio) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM outer bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccco x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE csac_cod_ctas = x.ccco_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_mese between ai_mes1 and ai_mes2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' length ( x.ccco_cod_ccon ) <= ai_nivel and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ORDER BY ccco_cod_ccon ASC')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp b_compro;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from b_compro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table b_compro;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_r_bal_pergan_c(ai_ejercicio integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_ingreso char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nombre char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_moneda')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Balance de p�rdidas y ganancias consolidado')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT ccco_cod_ccon as codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccco_nom_ccon as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(csac_sal_debi - csac_sal_cred ) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select distinct ccco_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where length(ccco_cod_ccon) = 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('substr(x.ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccco x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE csac_cod_ctas = x.ccco_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_mese <= ai_mesf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' x.ccco_cod_ccon >=''4'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' x.ccco_cod_ccon <''6'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' length(x.ccco_cod_ccon)<= ai_nivel and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ORDER BY ccco_cod_ccon ASC ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp b_pergan;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obtiene cuenta de ingreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cont_cta_ingr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lc_ingreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cont_cod_cont = ejer_cod_cont and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ai_ejercicio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from b_pergan')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where saldo <> 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table b_pergan;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_r_situa_gene_c(ai_ejercicio integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_ingreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_gasto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_mesi integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Estado de situaci�n general consolidado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--si es periodo final')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--if ai_mesf = 13 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- let li_mesi = 13;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- let li_mesi = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT ccco_cod_ccon as codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccco_nom_ccon as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(csac_sal_debi - csac_sal_cred ) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select distinct ccco_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where length(ccco_cod_ccon) = 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('substr(x.ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select distinct ccco_nom_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where length(ccco_cod_ccon) = 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('substr(x.ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccco x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE csac_cod_ctas = x.ccco_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_mese <= ai_mesf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' x.ccco_cod_ccon not like ''4%'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' x.ccco_cod_ccon not like ''5%'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('length(x.ccco_cod_ccon) <= ai_nivel and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY ccco_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ORDER BY ccco_cod_ccon ASC ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp s_gene;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obtiene cuenta de ingreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cont_cta_ingr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lc_ingreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cont_cod_cont = ejer_cod_cont and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ai_ejercicio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('If Trim(lc_ingreso) = ''4'' Then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_gasto = ''5'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_gasto = ''4'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('End If')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Gastos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(csac_sal_debi - csac_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_gasto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where csac_cod_ctas = ccco_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_mese <= ai_mesf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccco_cod_ccon = lc_gasto and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = ai_ejercicio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(csac_sal_debi - csac_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_ingreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where csac_cod_ctas = ccco_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_mese <= ai_mesf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccco_cod_ccon = lc_ingreso and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = ai_ejercicio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Verifica si existe cuentas con otra moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from s_gene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table s_gene;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_prms_cart()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING CHAR(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE val_prm CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_prm integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_prm CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion1 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor1 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion2 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor2 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion3 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor3 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion4 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor4 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT prms_des_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO des_prm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaprms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE prms_cod_prms = vprm_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND prms_cod_modu = 17')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND prms_cod_prms BETWEEN 1779 AND 1782')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF cod_prm = 1779 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1780 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1781 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1782 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_saldo_indiv_cta(as_cod_ccon varchar(10)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon varchar(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_dia')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- ESTE PROCEDIMIENTO CALCULA EL SALDO DE UNA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- CUENTA CONTABLE A UNA DETERMINADA FECHA')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--OBTIENE EL SALDO INICIAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = ai_ejercicio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon) like as_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldo is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
--------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- SI LA FECHA INICIAL NO ES EL PRIMERO DE ENERO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- SOLO SE DEVUELVEN LOS SALDOS ENTRE LAS FECHAS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- QUE SE HAYA INGRESADO PARA EL REPORTE')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
--------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia = day(ada_fecha_ini);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_mes = month(ada_fecha_ini);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_dia > 1 and li_mes > 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- A�ADE % A LA CUENTA PARA SACAR TODAS LAS QUE TIENEN MOVIMIENTOS')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_cod_ccon = as_cod_ccon || ''%'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--OBTIENE LOS MOVIMIENTOS AL DEBE DE LA CUENTA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_movimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dcom_cod_comp = comp_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi = ''D'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(comp_fec_comp) between ada_fecha_ini and ada_fecha_fin and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon like ls_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_movimiento is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_movimiento = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--CALCULA EL NUEVO SALDO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = ld_saldo + ld_movimiento;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--OBTIENE LOS MOVIMIENTOS AL HABER DE LA CUENTA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_movimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dcom_cod_comp = comp_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi = ''C'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(comp_fec_comp) between ada_fecha_ini and ada_fecha_fin and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon like ls_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_movimiento is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_movimiento = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--CALCULA EL NUEVO SALDO DE LA CUENTA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = ld_saldo - ld_movimiento;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--SI EL SALDO ES MENOR QUE 0 SE INVIERTE EL SIGNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldo < 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = -ld_saldo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_saldo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_liquidez_estruc(ada_fecha_ini date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning varchar(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_ejercicio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_indicador')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obtiene el c�digo del ejercicio')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ejer_ani_ejer = year(ada_fecha_fin);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Inicializa las variables totales')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_a = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_b = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_c = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_d = 0;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Fondos disponibles - Remesas en Tr�nsito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 11 - 1105')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''1''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_a = ld_total_a + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Fondos interbancarios netos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 1201 - 2201')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''1201''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''2''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_a = ld_total_a + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Operaciones de reporto netas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 1202+130705-2102-2202')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''1202''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_a = ld_total_a + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Inversiones para negociar hasta 90 dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 130105 + 130110 + 130205 + 130210')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''130105''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''4''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_a = ld_total_a + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Inversiones disponibles para la venta hasta 90 d�as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 130305 + 130310 + 130405 + 130410')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''130305''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''5''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_a = ld_total_a + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''A''')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- DENOMINADOR PRIMERA LINEA')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
----------------------')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Dep�sitos a la vista')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 2101')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''2101''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''6''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_b = ld_total_b + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Dep�sitos a plazo hasta 90 d�as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 210305 + 210310')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''210305''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''7''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_b = ld_total_b + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obligaciones Inmediatas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 23')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''23''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''8''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_b = ld_total_b + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Aceptaciones en circulaci�n')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 24')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''24''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''9''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_b = ld_total_b + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obligaciones financieras hasta 90 d�as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--2601+260205+260210+260305+260310+260405+')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--
260410+260505+260510+260605+260610+260705+260710+260805+260810+269005+269010')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''2601''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''10''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_b = ld_total_b + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Valores en circulaci�n que vencen hasta 90 d�as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 27')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''27''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_b = ld_total_b + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Fondos en administraci�n')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 2903')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''24''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_b = ld_total_b + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''B''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''AB''')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- NUMERADOR SEGUNDA LINEA')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
----------------------')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Total Numerador 1ra L�nea')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''13''')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Inversiones para negociar de 91 a 180 d�as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 130115 + 130215')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''130105''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''14''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_c = ld_total_c + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Inversiones para la venta de 91 a 180 d�as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 130315 + 130415')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''130315''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''15''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_c = ld_total_c + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Inversiones mantenidas hasta el vencimiento hasta 180 d�as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 130505 + 130510 + 130515 + 130605 + 130610 + 130615')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''130505''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''16''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_c = ld_total_c + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''C''')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- DENOMINADOR 2DA LINEA')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''17''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_d = ld_total_d + ld_total_b;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Dep�sitos a plazo mayores a 90 d�as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 2103 - (210305 + 210310 + 2104 + 2105)')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''2103''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''18''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_d = ld_total_d + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obligaciones financieras entre 91 y 360 d�as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--26 - ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--
((2601+260205+260210+260305+260310+260405+260410+260505+260510+260605+260610+260705
+260710+260805+260810+269005+269010)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- -(260225+260325+260425+260525+260625+260725+260825+260925+269025))')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''26''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''19''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_d = ld_total_d + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Valores en circulaci�n con vencimientos entre 91 y 360 d�as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 27')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--------------------------------------------------------------------------'
)
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_indicador = sp_saldo_indiv_cta(''27''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''20''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_d = ld_total_d + ld_indicador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_scnat_depe()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(180)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_numero integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_socio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_depe char(180);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_asocio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cod_depe integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cod_depe1 integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_acliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Creaci�n del cursor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Creaci�n del cursor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=0;let d_asocio=0;let d_acliente=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach c_actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select unique depe_nom_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into d_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where depe_cod_depe=decl_cod_depe and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_clna=decl_cod_clna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(clie_cod_clie) into d_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_clna= decl_cod_clna and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' decl_cod_depe=cod_depe and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(clie_cod_clie) into d_cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_clna = decl_cod_clna and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' decl_cod_depe=cod_depe and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli <> 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----validaci�n de las variables de socio y clientes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if d_socio <>0 or d_cliente<>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let d_numero=d_numero+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if d_numero<6 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return d_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let d_asocio=d_asocio+d_socio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let d_acliente=d_acliente+d_cliente;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let d_depe= OTRAS;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return d_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_scnat_sectort()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(180)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_numero integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_socio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_sector char(180);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_asocio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cod_sector integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_acliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Creaci�n del cursor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_asocio=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_acliente=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach c_sector ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select unique sect_des_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clna_cod_sect=sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into d_socio ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_sect = cod_sector and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(clie_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into d_cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = clna_cod_clie and clna_cod_sect = cod_sector and
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli <> 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if d_socio <>0 or d_cliente<>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let d_numero=d_numero+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if d_numero<6 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let d_asocio=d_asocio+d_socio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let d_acliente=d_acliente+d_cliente;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let d_sector= OTROS;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_scnj_sectordo(ai_persona integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(180)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_numero integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_socio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_sector char(180);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_asocio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cod_sector integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_acliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Creaci�n del cursor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_asocio=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_acliente=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach c_sector ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select unique sect_des_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_sect=sect_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into d_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_sect = cod_sector and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri =ai_persona and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(clie_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into d_cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_sect = cod_sector and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli <> 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri = ai_persona and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if d_socio <>0 or d_cliente<>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let d_numero=d_numero+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if d_numero<6 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else let d_asocio=d_asocio+d_socio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let d_acliente=d_acliente+d_cliente;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let d_sector= OTROS;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return d_sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_cajasaper(ada_fecha date)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--li_cod_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_caja char(60);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lde_valor_inicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lde_efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lde_efec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Selecciona Inicios de Cajas que trabajaron en una determinada
fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
*')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select deef_cod_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usua_nom_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_fec_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(defe_num_defe * camb_val_camb) as valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeef x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadefe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcausua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacamb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where deef_cod_caja = caja_cod_caja and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_cod_usua = usua_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_deef = defe_cod_deef and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' defe_cod_camb = camb_cod_camb and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(deef_fec_deef) = ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_movi = 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Selecciona Suma de Creditos de la bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
*')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(defe_num_defe * camb_val_camb)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lde_valor_depositos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadefe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacamb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where deef_cod_deef = defe_cod_deef and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' defe_cod_camb = camb_cod_camb and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_tasi = ''C'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_deef not in (li_cod_movi) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(deef_fec_deef) = ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_caja = li_cod_caja;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Selecciona Codigo de el ultimo movimiento de la bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
*')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(deef_cod_deef)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_max')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where deef_cod_tasi = ''D'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_pape is not null and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_movi <> 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(deef_fec_deef) = ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_caja = li_cod_caja;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_max is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_max = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Selecciona Suma de Debitos del a bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
*')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(defe_num_defe * camb_val_camb)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lde_valor_retiros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadefe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacamb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where deef_cod_deef = defe_cod_deef and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' defe_cod_camb = camb_cod_camb and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_tasi = ''D'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_deef not in (li_cod_max) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(deef_fec_deef) = ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_caja = li_cod_caja;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Selecciona Valor de Transferencia sacada con el valor maximo de el
ultimo movimiento de la bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
*')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(defe_num_defe * camb_val_camb)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lde_valor_trans')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadefe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacamb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where deef_cod_deef = defe_cod_deef and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' defe_cod_camb = camb_cod_camb and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_deef = li_cod_max and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(deef_fec_deef) = ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_caja = li_cod_caja;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Selecciona el numero de transferencias que se realizaron en el dia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
* ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(deef_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_numero_transferencias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(deef_fec_deef) = ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_caja = li_cod_caja and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_movi <> 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_pape is not null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Si solo se realizo una transferencia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
* ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ( li_numero_transferencias = 1 ) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select deef_cod_pape -- Selecciono el codigo de la transferencia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(deef_fec_deef) = ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_caja = li_cod_caja and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_movi <> 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_pape is not null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ( li_cod_pape is null ) then -- En el caso que solo se
transfieran cheques')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select (select dfcd_val_dfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dfcd_cod_fcdi = w.fcdi_cod_fcdi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dfcd_cod_tfpg = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select dfcd_val_dfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dfcd_cod_fcdi = w.fcdi_cod_fcdi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dfcd_cod_tfpg in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lde_efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcafcdi w')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadtra')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fcdi_cod_fcdi = dtra_cod_fcdi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dtra_cod_caja = li_cod_caja and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dtra_cod_tafo = ''E'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(fcdi_fec_fcdi) = ada_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select (select dfcd_val_dfcd --En el caso que se
transfieran efectiv y cheques')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dfcd_cod_fcdi = w.fcdi_cod_fcdi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dfcd_cod_tfpg = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select dfcd_val_dfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dfcd_cod_fcdi = w.fcdi_cod_fcdi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dfcd_cod_tfpg in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lde_efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcafcdi w')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fcdi_cod_fcdi = li_cod_pape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Si se realizo dos transferencias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --
***********************************************************************************
* ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(deef_cod_pape) --Selecciono el valor maximo de la
transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(deef_fec_deef) = ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_caja = li_cod_caja and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_movi <> 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_pape is not null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select min(deef_cod_pape) --Selecciono el valor minimo
de la transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_pape_min')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(deef_fec_deef) = ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_caja = li_cod_caja and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_movi <> 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' deef_cod_pape is not null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ( li_cod_pape is null ) then -- En el caso que solo
se transfieran cheques')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select (select dfcd_val_dfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dfcd_cod_fcdi = w.fcdi_cod_fcdi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dfcd_cod_tfpg = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select dfcd_val_dfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dfcd_cod_fcdi = w.fcdi_cod_fcdi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dfcd_cod_tfpg in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lde_efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcafcdi w')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadtra')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fcdi_cod_fcdi = dtra_cod_fcdi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dtra_cod_caja = li_cod_caja and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dtra_cod_tafo = ''E'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(fcdi_fec_fcdi) = ada_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select (select dfcd_val_dfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dfcd_cod_fcdi = w.fcdi_cod_fcdi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dfcd_cod_tfpg = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(dfcd_val_dfcd)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dfcd_cod_fcdi = w.fcdi_cod_fcdi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dfcd_cod_tfpg in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lde_efec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcafcdi w')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fcdi_cod_fcdi = li_cod_pape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if(lde_efec is null) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lde_efec = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if(lde_cheq is null) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lde_cheq = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select (select sum(dfcd_val_dfcd)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dfcd_cod_fcdi = w.fcdi_cod_fcdi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dfcd_cod_tfpg = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(dfcd_val_dfcd)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadfcd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dfcd_cod_fcdi = w.fcdi_cod_fcdi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dfcd_cod_tfpg in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lde_efec_1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcafcdi w')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fcdi_cod_fcdi = li_cod_pape_min;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if(lde_efec_1 is null) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lde_efec_1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if(lde_cheq_1 is null) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lde_cheq_1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lde_efectivo = lde_efec + lde_efec_1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lde_cheques = lde_cheq + lde_cheq_1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lde_valor_inicio is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lde_valor_inicio = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lde_valor_depositos is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lde_valor_depositos = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lde_valor_retiros is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lde_valor_retiros = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lde_valor_trans is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lde_valor_trans = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lde_efectivo is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lde_efectivo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lde_cheques is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lde_cheques = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_cod_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_prm_globales_1() returning integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de control de procedimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigo integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre char(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define prm_1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables (parametros globales) retorno de procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nomprm1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valprm1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valprm8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valprm4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valprm12 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valprm14')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_1 = 0; --Parametro de oficina actual')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_2 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Parametro de moneda_nacioonal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_3 = 0; --Parametro de periodo actual')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_4 = 0; --Parametro de jefe de cajas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_5 = 0; --Parametro de tesorero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_9 = 0; --Parametro de base de claculo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_10 = 0; --Parametro de dias para actualizacion de clave')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_16 = 0; --Parametro sobre el cual se ingresara una observacion a
la transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_17 = 0; --Parametro para control de retiro en diferido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_18 = 0; --Parametro sobre el cual se controlara el retiro en
efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_19 = 0; --Parametro sobre el cual se controla el maximo de
efectivo que puede tener una caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_20 = 0; --Parametro direcci�n del servidor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_21 = 0; --Parametro clave del servidor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_23 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera todos los parametros dinamicos segun el parametro de moneda ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select prms_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaprms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where prms_cod_prms = vprm_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and prms_cod_prms in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Almacena nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codigo = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_1 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 2 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_2 = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 101 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_3 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 4 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_4 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 5 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_5 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 9 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_9 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 10 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_10 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 16 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_16 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 17 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_17 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 18 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_18 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 19 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_19 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 20 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm12')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_20 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 21 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_21 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo=23 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm14')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_23 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Verifica si ha estado definido parametros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm1 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_2 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm2 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm2 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm2 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_3= 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm3 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm3 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm3 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_4 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm4 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm4 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm4 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_5 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm5 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm5 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm5 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_9 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm6 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm6 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm6 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_10 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm7 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm7 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm7 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_16 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm8 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm8 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm8 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_17 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm9 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm9 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm9 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_18 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm10 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm10 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm10 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_19 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm11 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm11 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm11 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_20 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm12 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm12 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm12 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_21 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm13 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm13 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm13 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_23 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm14 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm14 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm14 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return codprm1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_prms_cartera()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING CHAR(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE val_prm CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_prm integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_prm CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion1 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor1 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion2 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor2 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion3 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor3 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion4 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor4 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion5 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor5 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion6 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor6 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion7 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor7 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion8 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor8 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion9 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor9 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion10 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor10 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion11 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor11 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion12 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor12 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion13 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor13 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET valor11 = '' '';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion11 = '' '';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion12 = '' '';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET valor12 = '' '';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion13 = '' '';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET valor13 = '' '';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT prms_des_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO des_prm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaprms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE prms_cod_prms = vprm_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND prms_cod_modu = 17')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND prms_cod_prms BETWEEN 1700 AND 1719')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF cod_prm = 1700 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1701 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1702 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1703 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1704 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1705 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1706 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1707 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1708 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1709 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1710 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1711 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion12')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1712 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_cart_acti ( ada_fecha DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURNING VARCHAR (50)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_actividad VARCHAR(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_monto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_numero INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_amonto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_anumero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECUPERO CARTERA CONCEDIDA POR ACTIVIDAD')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct ocup_des_ocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(cred_cap_cred) as monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(cred_num_cred) as numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = acli_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ocup_cod_ocup = acli_cod_ocup and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre < 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Order by 2 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO TEMP cartera_actividad;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- INICIALIZO VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_amonto = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_anumero = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT *')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM cartera_actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_contador = li_contador + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_contador < 6 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_amonto = ld_amonto + ld_monto;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_anumero = li_anumero + li_numero;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_actividad = OTROS;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DROP TABLE cartera_actividad;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_cart_ramg ( ada_fecha DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING VARCHAR(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_rango VARCHAR(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_monto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_num_cred INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_amonto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_ini')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT max(rang_fin_rang)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO ld_max_rang')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcarang;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO li_nreg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcarang;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_amonto = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_anum_cred = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT rang_ini_rang')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_rang_ini')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcarang')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_contador = li_contador + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(cred_cap_cred) as monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(cred_num_cred) as numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred between ld_rang_ini and ld_rang_fin and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre < 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_ini = ld_rang_ini;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_fin = ld_rang_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_rango = De ||ls_ini|| a ||ls_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN ls_rango')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF (li_contador = li_nreg) THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(cred_cap_cred) as monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(cred_num_cred) as numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred > ld_max_rang and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre < 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_fin = ld_rang_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_rango = Mas de ||ls_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN ls_rango')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_divid_vencvin()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE LS_TELE_CLIE CHAR(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nom_vinc char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lf_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--parametro de interes mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT vprm_val_vprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_par_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE vprm_cod_prms = 1768;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select CLIE_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into LI_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie=cred_cod_clie and cred_cod_ecre in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect=sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by cred_cod_tvin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET LS_TELE_CLIE=''0'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET LC_NOM_VINC=''0'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select TELE_NUM_TELE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO LS_TELE_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM BCATELE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE TELE_COD_CLIE=LI_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF LS_TELE_CLIE IS NULL THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET LS_TELE_CLIE=''0'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tvin_des_tvin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO lc_nom_vinc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM BCATvin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE Tvin_cod_tvin=lc_cod_tvin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_num_cred=li_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_venc<today ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by divc_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_dirb=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dirb_val_dirb)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_dirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc in (select divc_cod_divc from bcadivc where
divc_cod_ediv not in (5) and divc_fec_venc<today and divc_num_cred =li_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dirb_cod_rubc in (7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_dirb is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_dirb=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora_total=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_plaz_total=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lf_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred=li_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_venc<today')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dias_mora = today - lf_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- INTERES MORA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_int_mora = (ld_cap * ld_tas * ld_par_mora *
li_dias_mora) / 36000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_int_mora_total = ld_int_mora_total + ld_int_mora;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_int_plaz_total = ld_int_plaz + ld_int_deve;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF LD_CAP_DIVC>0 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE FUNCTION informix.ft_cod_ctas(as_cod_ccon CHAR(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING INT;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ll_cod_ctas INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon = as_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ccon_cod_ejer = al_cod_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ll_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FUNCTION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE FUNCTION informix.ft_calcula_base_exponente(ad_val_base
decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ll_i INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_resu decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ad_val_expo = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ad_val_base = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --''Retorno un valor nulo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --- '' calculo potencia ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_resu = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for ll_i=1 to ad_val_expo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_val_resu = ld_val_resu * ad_val_base;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --return ld_val_resu with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end for;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_val_resu ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FUNCTION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_prms_registro()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING CHAR(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE val_prm CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_prm integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_prm CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion1 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor1 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion2 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor2 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion3 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor3 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion4 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor4 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion5 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor5 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion6 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor6 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion7 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor7 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion8 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor8 DEC(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion9 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor9 DEC(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion10 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor10 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion11 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor11 INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET valor11=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET valor10='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion11='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion10='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select prms_des_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Into des_prm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaprms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prms_cod_prms = vprm_cod_prms and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prms_cod_modu = 17 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(prms_cod_prms between 1720 and 1729 or prms_cod_prms between 1767 and
1768)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF cod_prm = 1720 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1721 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1722 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1723 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1724 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1725 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET descipcion6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1726 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1727 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1728 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1767 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1768 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_prms_imp_seg()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING CHAR(255)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE val_prm CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE cod_prm integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE des_prm CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion1 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor1 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion2 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor2 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion3 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor3 DEC(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion4 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor4 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion5 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor5 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion6 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor6 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion7 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor7 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion8 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor8 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE descipcion9 CHAR(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor9 CHAR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT prms_des_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaprms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE prms_cod_prms = vprm_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND prms_cod_modu = 17')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND prms_cod_prms BETWEEN 1740 AND 1759')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF cod_prm = 1740 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1741 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1742 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1743 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1744 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1745 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1746 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1747 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELIF cod_prm = 1748 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET descipcion9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN descipcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_prm_inversiones(lp_codigo_moneda INTEGER)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING varchar(5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de retorno de select')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nombre varchar(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valor varchar(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE c_dinami varchar(5);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables (parametros dinamicos) de retorno de procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nominve1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE plzinve1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nomingst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valinmy1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE valingst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE codinmy1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE codingst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Inicializa variables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET valining')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nominprv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nomingst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nominve1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nominve2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nominve3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nominve4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET nominve5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera todos los parametros dinamicos segun el parametro de moneda ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT prms_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaprms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE prms_cod_prms = vprm_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND prms_cod_prms = prdi_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND prms_cod_modu =6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND SUBSTR(prdi_cod_prdi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --Almacena nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF c_dinami = ''INVE1'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nominve1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''INVE2'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nominve2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''INVE3'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nominve3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''INVE4'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nominve4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''INVE5'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nominve5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''INGST'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomingst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''INING'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomining')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''INPRV'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nominprv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''INIMP'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nominimp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''INVPM'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nominpmn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''ACCI1'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomacci1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''ACGST'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomacgst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''ACING'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomacing')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''ACIPG'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomacipg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''BONO1'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nombono1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''BOGST'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nombogst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''BOING'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomboing')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF c_dinami = ''BOIPG'' THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET nomboipg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN codinmy1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('codinmy4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nomacgst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_validanumgarantias(al_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cod_lcre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_count')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcagara')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_num_cred = gara_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gara_cod_clie = al_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ecre in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_lcre = al_cod_lcre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_num_gara')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 1749;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_count >= ll_num_gara then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return 0; -- No puede dar mas garantias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_saldos_ctas(ai_cod_ctas Integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_tcue char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_mes char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_debe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select ccon_cod_ejer from bcaccon where ccon_cod_ctas
= ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_cod_tcue = (select ccon_cod_tcue from bcaccon where ccon_cod_ctas
= ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if lc_cod_tcue = ''A'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- arma cotizaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mon_naci = (select vprm_val_vprm from bcavprm where
vprm_cod_prms = 2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_coti_naci = sp_cotiza_inte(li_mon_naci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_cuenta = (select ccon_cod_ccon from bcaccon where ccon_cod_ctas
= ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_cuenta = trim(lc_cuenta) || ''*'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_mone moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_mone <> li_mon_naci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp t_cotiza;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(sact_sal_cred * valor / ld_coti_naci) haber')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ctas = ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_mone = moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_mone <> li_mon_naci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_tcue = ''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mese_cod_mese <= 13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon matches lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mese_cod_mese <= 13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ctas = ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp t_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(sact_sal_cred * valor / ld_coti_naci) haber')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ctas = ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_mone = moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_mone <> li_mon_naci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_tcue = ''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mese_cod_mese <= 13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon matches lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mese_cod_mese <= 13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ctas = ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp t_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from t_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp t_saldos_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' drop table t_cotiza;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' drop table t_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mese_cod_mese <= 13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ctas = ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp t_saldos_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mese_cod_mese <= 13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ctas = ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp t_saldos_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select *')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lc_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from t_saldos_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return lc_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table t_saldos_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sal_pro_mensual(ai_anio integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- calcula el saldo promedio mensual de una cuenta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_ene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_ene = sp_calc_sald_promsocio(1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_feb = sp_calc_sald_promsocio(2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_mar = sp_calc_sald_promsocio(3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_abr = sp_calc_sald_promsocio(4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_may = sp_calc_sald_promsocio(5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_jun = sp_calc_sald_promsocio(6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_jul = sp_calc_sald_promsocio(7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_ago = sp_calc_sald_promsocio(8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_sep = sp_calc_sald_promsocio(9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_oct = sp_calc_sald_promsocio(10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_nov = sp_calc_sald_promsocio(11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_dic = sp_calc_sald_promsocio(12')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_ene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_calc_sald_promsocio(ai_mes integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo_promedio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- establece el n�mero de d�a del mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (ai_mes = 1 or ai_mes = 3 or ai_mes = 5 or ai_mes = 7 or ai_mes = 8
or ai_mes = 10 or ai_mes = 12) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias_mes = 31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (ai_mes = 4 or ai_mes = 6 or ai_mes = 9 or ai_mes = 11) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias_mes = 30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_modulo = mod(ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (li_modulo = 0) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias_mes = 29;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias_mes = 28;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- cuenta si existen saldos durante el periodo elegido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_cod_dpvi = ai_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' month(sald_fec_sald) = ai_mes and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' year(sald_fec_sald) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- obtiene el �ltimo saldo anterior al periodo buscado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- si no tiene movimientos establece en 0 el saldo anterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(sald_fec_sald)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fecha_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(sald_fec_sald) < ai_mes and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' year(sald_fec_sald) = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_cod_dpvi = ai_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sald_dispo + sald_val_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_saldo_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(sald_fec_sald) = lda_fecha_ant and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_cod_dpvi = ai_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_saldo_ant is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ant = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- obtiene el valor del saldo promedio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_num_tran is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- si no existen movimientos durante el periodo se asigna el
�ltimo saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_promedio = ld_saldo_ant;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- obtiene el saldo promedio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dia_ant = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_promedio = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select day(sald_fec_sald)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(sald_fec_sald) = ai_mes and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' year(sald_fec_sald) = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_cod_dpvi = ai_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by sald_fec_sald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --calcula el saldo promedio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_dias = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ant = ld_saldo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dia_ant = li_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_promedio = ld_saldo_promedio +
ld_saldo_ant * (li_dias - li_dia_ant);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ant = ld_saldo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dia_ant = li_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- calcula el saldo en base al �ltimo movimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_dia_ant = li_dias_mes then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_promedio = ld_saldo_promedio + ld_saldo_ant;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_promedio = ld_saldo_promedio + ld_saldo_ant *
(li_dias_mes - li_dia_ant);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_saldo_promedio/li_dias_mes;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' drop table tmp_saldos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_p_mayori(ai_cod_ejer integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cod_tdoc char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define num_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fec_comp date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define beneficia char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estado char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select comp_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where comp_cod_comp = dcom_cod_comp and comp_cod_peri=peri_cod_peri and
peri_cie_peri = ''0'' and peri_cod_ejer= ai_cod_ejer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_mayori = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_cod_tasi = ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_fec_comp between ad_fec_ini and ad_fec_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by comp_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select comp_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where comp_cod_comp = dcom_cod_comp and comp_cod_peri=peri_cod_peri and
peri_cie_peri = ''0'' and peri_cod_ejer= ai_cod_ejer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_mayori = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_cod_tasi = ''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_fec_comp between ad_fec_ini and ad_fec_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by comp_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp t_mayo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select comp_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from t_mayo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by comp_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp t_mayo1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select comp_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from t_mayo1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where debe = haber')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table t_mayo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table t_mayo1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_r_saldo_cta(ac_cta_ini char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_ccon char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nom_ctas char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_des_mese char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_debitos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon >= ac_cta_ini')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon <= ac_cta_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ejer = ai_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_sal_cta_mes(li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select *')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lc_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from t_saldos_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_subtotal = ld_debitos - ld_creditos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return lc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ld_debitos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' drop table t_saldos_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_provision_amazonas(lda_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_tcdv = li_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---and clie_num_clie = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = sp_calc_sald_prom(lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) into li_count from bcaprdv where
prdv_cod_dpvi = li_cod_dpvi and date(prdv_fec_prdv)= lda_fec_prov and prdv_cod_tasi
=''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_count=0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaprdv values(date(lda_fec_prov)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcaprdv set prdv_val_prdv = ld_valor where
prdv_cod_dpvi = li_cod_dpvi and date(prdv_fec_prdv)= lda_fec_prov and prdv_cod_tasi
=''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_saldo_divipagados(ai_cod_divc integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(abdv_val_abdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaabdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where abdv_cod_divc > ai_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_divc in (select divc_cod_divc from bcadivc where
divc_num_cred in (select divc_num_cred from bcadivc where divc_cod_divc =
ai_cod_divc))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_cod_rubr = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_cod_pago in (select pago_cod_pago from bcapago where
pago_ctr_pago = 1) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_valor ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_corrige_dobleconta(lda_fecha date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning date as fecha ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_num_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_anu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tdoc char (3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_Fecha_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_Fecha_ant = today;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select comp_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_num_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacomp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_fec_comp between lda_fecha and lda_fecha1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_tdoc not in (''CD''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and not (comp_detalle like ''Provisi�n %'' or comp_detalle like
''Acreditaci�n %'' or comp_detalle like ''Provision %'' or comp_detalle like
''Acreditacion %'')')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ORDER BY comp_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_pape = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where pape_num_comp = ll_num_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_cod_pape = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_may = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadcom set dcom_may_dcom = 0 where dcom_cod_comp =
ll_num_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcacomp set comp_anulado = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return lda_fec_act')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_act <> lda_Fecha_ant then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return lda_fec_act')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_Fecha_ant = lda_fec_act; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_papeleta(li_cod_pape1 integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_tasi char;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET LI_COD_DIVC=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num_comp=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ofic = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--let lc_cod_tasi='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpap_num_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas=dpap_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_pape=dpap_cod_pape and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_pape in(li_cod_pape1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if not li_cod_divc is null OR li_cod_divc<>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_divc1=li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc=li_cod_divc1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dirb_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc=li_cod_divc1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select pgpf_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where pgpf_cod_pape=li_cod_pape1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select deip_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeip')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where deip_cod_pgpf=li_cod_pgpf;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select date(prpf_fec_prpf)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaprpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prpf_cod_pgpf=li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_cod_pape=li_cod_pape1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred in (select cred_num_cred from bcacred where
cred_cod_pape=li_cod_pape1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_pape=li_cod_pape1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mban_cod_mban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mban_cod_pape=li_cod_pape1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dcom_cod_dcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dcom_cod_ctas=ccon_cod_ctas and dcom_cod_comp=li_num_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp = dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_saldos_captaciones(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_ofic <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT dpvi_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv where mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv) from ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv where mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_tcdv = tcdv_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_ofic = ai_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----activas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cco_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cco_acti = ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tcdv_cod_tcdv = li_cod_tcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ejer = ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ejer_ani_ejer = year(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon = ls_cco_acti;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--inactivas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cco_inac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cco_inac= ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tcdv_cod_tcdv = li_cod_tcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_inac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ejer = ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ejer_ani_ejer = year(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon = ls_cco_inac;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select (nvl(sum(sact_sal_debi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_sal_acum')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where (sact_cod_ctas = li_cod_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('or sact_cod_ctas = li_cod_inac)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ejer_cod_ejer = peri_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri <=month(ada_fec_fina)-1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ejer_ani_ejer =year(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_ofic = ai_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_deb_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(comp_fec_comp) <= ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' month(comp_fec_comp) = month(ada_fec_fina) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (dcom_cod_ctas = li_cod_acti or dcom_cod_ctas =
li_cod_inac) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi = ''D'' and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_ofic = ai_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_cre_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(comp_fec_comp) <= ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' month(comp_fec_comp) = month(ada_fec_fina) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (dcom_cod_ctas = li_cod_acti or dcom_cod_ctas =
li_cod_inac) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi = ''C'' and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_ofic = ai_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_sal_comp= ld_deb_comp - ld_cre_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_deb_comp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---por confirmar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cco_dxcf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cco_dxcf= ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tcdv_cod_tcdv = li_cod_tcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dxcf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ejer = ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ejer_ani_ejer = year(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon = ls_cco_dxcf;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dxcf<>li_cod_acti then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_deb_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(comp_fec_comp) <= ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' month(comp_fec_comp) = month(ada_fec_fina) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (dcom_cod_ctas = li_cod_dxcf) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi = ''D'' and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_ofic = ai_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_cre_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(comp_fec_comp) <= ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' month(comp_fec_comp) = month(ada_fec_fina) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (dcom_cod_ctas = li_cod_dxcf) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi = ''C'' and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_ofic = ai_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_sal_compd= ld_deb_comp - ld_cre_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_deb_comp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select (nvl(sum(sact_sal_debi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_sal_acumd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where (sact_cod_ctas = li_cod_dxcf) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ejer_cod_ejer = peri_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri <=month(ada_fec_fina)-1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ejer_ani_ejer =year(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_ofic = ai_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else --- todas las oficinas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT dpvi_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv where mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv) from ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv where mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_tcdv = tcdv_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----activas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cco_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cco_acti = ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tcdv_cod_tcdv = li_cod_tcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ejer = ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ejer_ani_ejer = year(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon = ls_cco_acti;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--inactivas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cco_inac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cco_inac= ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tcdv_cod_tcdv = li_cod_tcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_inac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ejer = ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ejer_ani_ejer = year(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon = ls_cco_inac;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select (nvl(sum(sact_sal_debi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_sal_acum')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where (sact_cod_ctas = li_cod_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('or sact_cod_ctas = li_cod_inac)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ejer_cod_ejer = peri_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri <=month(ada_fec_fina)-1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ejer_ani_ejer =year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_deb_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(comp_fec_comp) <= ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' month(comp_fec_comp) = month(ada_fec_fina) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (dcom_cod_ctas = li_cod_acti or dcom_cod_ctas =
li_cod_inac) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi = ''D'' and comp_anulado = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_cre_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(comp_fec_comp) <= ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' month(comp_fec_comp) = month(ada_fec_fina) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (dcom_cod_ctas = li_cod_acti or dcom_cod_ctas =
li_cod_inac) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi = ''C'' and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_sal_comp= ld_deb_comp - ld_cre_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_deb_comp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---por confirmar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cco_dxcf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cco_dxcf= ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tcdv_cod_tcdv = li_cod_tcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dxcf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ejer = ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ejer_ani_ejer = year(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon = ls_cco_dxcf;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dxcf<>li_cod_acti then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_deb_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(comp_fec_comp) <= ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' month(comp_fec_comp) = month(ada_fec_fina) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (dcom_cod_ctas = li_cod_dxcf) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi = ''D'' and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_cre_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(comp_fec_comp) <= ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' month(comp_fec_comp) = month(ada_fec_fina) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (dcom_cod_ctas = li_cod_dxcf) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi = ''C'' and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_sal_compd= ld_deb_comp - ld_cre_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_deb_comp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select (nvl(sum(sact_sal_debi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_sal_acumd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where (sact_cod_ctas = li_cod_dxcf) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ejer_cod_ejer = peri_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri <=month(ada_fec_fina)-1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ejer_ani_ejer =year(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.arreglocompro( ai_cod_tran integer )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define mcdv_cod ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define mcdv_fec date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ccon_ccon char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define dpap_tasi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cta_cobrar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let comp_ante = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dpap_val_dpap)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_tota')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where pape_cod_pape = dpap_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pape_num_comp in (ai_cod_tran)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pape_cod_usua not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_num_comp <> comp_ante then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete bcadcom where dcom_cod_comp = li_num_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_tota> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadcom values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let comp_ante = li_num_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_comp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadcom set dcom_may_dcom =1 where dcom_cod_comp = ai_cod_tran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_comp_sal_ctas(an_cod_ejer integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15) as cuenta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_long integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ctas integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_ccon char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_moneda char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tcue char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_ejer integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete comp_sal_cta where cod_ctas>0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--a�adir las cuentas que se seleccion�')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into comp_sal_cta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon LIKE as_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_mone = ai_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = an_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ctas in (select sact_cod_ctas from bcasact where
sact_cod_peri in (select peri_cod_peri from bcaperi where peri_cod_ejer =
an_cod_ejer) );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--obtener los saldos de los comprobantes hasta la fecha elegida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--y actualizar los saldos del mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('------------------------------cuentas de movmientos dentro de la
fecha---------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dcom_cod_comp = comp_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_mayori = ''1'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_ctas = ccon_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_anulado = 0 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi =D and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_fec_comp between ada_fechaini and ada_fechafin and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon LIKE as_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_mone = ai_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualizar el valor del saldo del mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update comp_sal_cta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sal_mes_debe = ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cod_ofic = ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dcom_cod_comp = comp_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_mayori = ''1'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_ctas = ccon_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_anulado = 0 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi =C and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_fec_comp between ada_fechaini and ada_fechafin and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon LIKE as_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_mone = ai_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualizar el valor del saldo del mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update comp_sal_cta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sal_mes_cred = ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cod_ofic = ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dcom_cod_comp = comp_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_mayori = ''1'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_ctas = ccon_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_anulado = 0 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi =D and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_fec_comp between ada_fechaini and ada_fechafin and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon LIKE as_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_mone = ai_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualizar el valor del saldo del mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update comp_sal_cta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sal_mes_debe = ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cod_ctas = li_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dcom_cod_comp = comp_cod_comp and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_mayori = ''1'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_ctas = ccon_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_anulado = 0 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcom_cod_tasi =C and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_fec_comp between ada_fechaini and ada_fechafin and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon LIKE as_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_mone = ai_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualizar el valor del saldo del mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update comp_sal_cta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sal_mes_cred = ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cod_ctas = li_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('------------------------------------fin de bucle cuentas de movimiento
-----------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---------acumulacion en las cuentas padres en las fechas
-----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from comp_sal_cta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cod_ctas = ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_tcue =''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_tmpsact_comp_sal(li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from comp_sal_cta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cod_ctas = ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_tcue =''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_tmpsact_comp_sal(li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---------fin de acumulacion en las cuentas padres en las fechas
-----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--obtener los saldos del periodo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--y actualizar en la tabla comp_sal_cta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sact_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = an_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri<= an_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_mone = ai_mone and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon like as_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by sact_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualizar el saldo del periodo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update comp_sal_cta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sal_peri = ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cod_ctas = li_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sact_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = an_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri<= an_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_mone = ai_mone and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon like as_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by sact_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualizar el saldo del periodo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update comp_sal_cta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sal_peri = ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cod_ctas = li_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select mone_des_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mone_cod_mone = ai_mone;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ejer_ani_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ejer_cod_ejer = an_cod_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from comp_sal_cta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --devolver los valores')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = (ld_valor*ad_coti)/ai_expr;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor<>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 and ls_cod_tcue=''A'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_rubro_cartera(ai_ran_ini integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--inicializa variable li_contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having today - min(divc_fec_venc) between ai_ran_ini and ai_ran_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --recupera dividendos a modificar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = li_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --elimina valor del rubro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_rubc = ai_rubro and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --calcula nuevo valor de rubro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_opcion = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --SI ES UN VALOR FIJO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ad_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --SI ES UN PORCENTAJE DEL CAPITAL DEL DIVIDENDO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = round(ld_capital*ad_valor/100')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor < ad_minimo then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ad_minimo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ld_valor > ad_maximo then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ad_maximo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --inserta nuevo rubro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' values (li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --devuelve el contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_contador = li_contador + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_contador with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_inicio_fecha_mes(ada_fecha date)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning date as fechainicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_mes= month(ada_fecha);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_anio = year(ada_fecha);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha = date(li_mes || /01/ || li_anio);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_inicio_movcapta()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning date as fechainicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select min(mcdv_fec_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 35;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if lda_fecha is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select min(mcdv_fec_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsr04(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(1) as tipoIdentificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as tipoOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaCastigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaUltimaCotaPagada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoIdentificacion char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numIdentificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define calificacionHomologada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tasainteres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorNoDevengaInteres_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorVencido_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define gastosRecupCarteraVencida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoOperacion char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuotaCredito decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaCastigo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct CLIE_COD_TIDE as tipoIdentificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred as numOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_dias_venc as diasMorasidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_tas_cred as tasainteres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select sum(dirb_val_dirb) from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_dema as valorDemandaJudicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_prov provrequeridaOriginal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''CDC'' as tipoOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select sum(dirb_val_dirb) from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_fec_venc =ada_Fec_fina) as cuotaCredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select to_char(crce_fec_crce')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select to_char(max(divc_fec_pago)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tipoIdentificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gastosRecupCarteraVencida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provReducidaGarantiaAutoliquidable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tipoOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotaCredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaCastigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaUltimaCotaPagada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM BCACLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = CLIE_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND calf_fec_calf = ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if cuotaCredito is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let cuotaCredito = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if cuotaCredito <0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let cuotaCredito = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if fechaCastigo is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---let fechaCastigo =''NULO''; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF fechaUltimaCotaPagada is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let fechaUltimaCotaPagada =''01/01/1900'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codecre = 5 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let calificacionPropia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select date(ada_fec_fina) - crce_fec_crce ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into diasmorasidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afccrce where crce_num_cred = 690')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and crce_ecr_actu = 5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_inte)+ sum(dcal_val_deve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into interesOrdinario from afcdcal where dcal_num_cred= numcred and
dcal_fec_calf =ada_Fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into interesSobreMora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcal_fec_calf =ada_Fec_fina and dcal_cod_ediv = 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let interesSobreMora = interesSobreMora * tasainteres * diasMorasidad
*1.1/36000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valorPorVencer_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorNoDevengaInteres_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorVencido_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorPorVencer_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 1 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorPorVencer_31_90_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 1 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorPorVencer_91_180_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 1 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorPorVencer_181_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 1 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorPorVencerMayor_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 1 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorNoDevengaInteres_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 3 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorNoDevengaInteres_31_90_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 3 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorNoDevengaInteres_91_180_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 3 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorNoDevengaInteres_181_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 3 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorNoDevengaInteresMayor_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 3 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_31_90_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF codccre <>3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_91_180_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codccre =2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_181_270_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codccre =2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_271_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codccre =4 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_271_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codccre= 4 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_361_720_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codccre= 3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_361_720_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codccre = 3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_361_720_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numcred and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---if calificacionPropia = ''B-1'' or calificacionPropia= ''B-2'' or
calificacionPropia=''C-1'' or calificacionPropia =''C-2'' or
calificacionPropia=''D'' or calificacionPropia=''E'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valorPorVencer_1_30_Dias>0 or valorPorVencer_31_90_Dias >0 or
valorPorVencer_91_180_Dias>0 or valorPorVencer_181_360_Dias>0 or
valorPorVencerMayor_360_Dias> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if diasMorasidad>15 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let calificacionPropia= ''A-3'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let calificacionHomologada =''A-3'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let diasMorasidad = 15;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- let valorVencido_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- let valorPorVencer_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorPorVencer_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorNoDevengaInteres_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorVencido_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gastosRecupCarteraVencida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provReducidaGarantiaAutoliquidable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tipoOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotaCredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaCastigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaUltimaCotaPagada with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsr03(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(13) as tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoIdentificacion char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numIdentificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numOperacionAnterior char(32);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaNovaRefiRees char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_cod_tide as tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND CRED_NUM_CRED IN (SELECT CRED_NUM_RELI FROM BCACRED WHERE
CRED_COD_ECRE = 3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(cred_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_pape ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred where cred_num_reli = numOperacion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_pape is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_pape = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_pape>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into numOperacionAnterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred where cred_num_reli = numOperacion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(cred_num_paga)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into numOperacionAnterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred where cred_num_reli = numOperacion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE FUNCTION informix.ft_calculo_fecha(ada_fec_pago date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cadena char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_anio char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_fec_pago date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_valor=month(ada_fec_inic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_anio=year(ada_fec_inic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_dias=day(ada_fec_inic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_mes_pago = li_valor+(al_num_dias/30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--//se verifica que no exeda el a�o')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_mes_pago > 12 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_valor = li_mes_pago /12;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_anio= ll_anio+ li_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_mes = li_mes_pago- (12 * li_valor );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_mes = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_mes = 12;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_anio = ll_anio -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_mes = li_mes_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_mes = 2 and ll_dias > 28 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_dias= 28;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if mod(ll_anio ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_dias = 29;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif (ll_mes = 4 or ll_mes = 6 or ll_mes = 9 or ll_mes = 11) and ll_dias>
30 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_dias = 30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_cadena= ll_mes || / || ll_dias || / || ll_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_fec_pago =date(ls_cadena);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.retiro_socios()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(40)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_fec_cier1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_condicion=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM BCACLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE CLIE_NUM_CLIE in (SELECT distinct CLIE_NUM_CLIE FROM BCADPVI')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CLIE_COD_CLIE=DPVI_COD_clie AND clie_num_clie IN (69 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('390 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1000 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1483 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('2068 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('2408 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('2617 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('2823 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('2985 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('3205 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('3441 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('3549 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('3698 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('10779 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('10998 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11213 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11307 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11448 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('21525 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('31643 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11630 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('31758 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('21607 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11660 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('31792 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('31813 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('31823 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11680 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('31832 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11692 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11694 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('31906 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11721 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('31920 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('31926 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('31928 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('31929 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('31930 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('31945 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11726 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('32001 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('32002 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('32003 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('32004 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('32007 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('32022 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11743 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11746 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('21700 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('32058 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11761 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('21718 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('32142 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11794 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11805 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11806 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11812 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('32190 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('32192 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('21785 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('11835 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(') AND CLIE_EST_CLIE IN (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpvi_fec_cier')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_fec_cier')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_clie=li_cod_clie and dpvi_cod_eacd=4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_fec_cier is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_condicion=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ''Tiene ctas activas''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_condicion=0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(dpvi_fec_cier)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_fec_cier')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_clie=li_cod_clie ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select min(fsal_cod_fsal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_mclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcafsal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fsal_cod_clie=li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete bcafsal where fsal_cod_clie=li_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and not fsal_cod_fsal=li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcafsal set fsal_cod_csal=1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fsal_cod_clie=li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcaclie set clie_est_clie=2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie=li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ''Socio ha sido retirado''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_condicion=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.primernombres(nombre CHAR(60) ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING varchar(40) as primernombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE loop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE len')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE prinombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if nombre is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nombre = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET len = LENGTH(nombre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_vez=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_pos = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prinombre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOR loop = 0 to len')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF substr(nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET prinombre = substr(nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_pos = loop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit for; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOR;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_pos = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET segnombre = substr(nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return trim(prinombre) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_fecha_mes_anterior(ada_fecha date)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning date as fechamesanterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_mes= month(ada_fecha);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_anio = year(ada_fecha);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_mes = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anio =li_anio -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = 12;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = li_mes - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_mes = 1 or li_mes = 3 or li_mes = 5 or li_mes = 7 or li_mes = 8 or
li_mes = 10 or li_mes = 12 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dia = 31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia = 30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_mes = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if mod(li_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dia = 29;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha = date(li_mes || / || li_dia || / || li_anio);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_fin_fecha_mes(ai_mes integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning date as fechafin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_dia integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--let li_mes= month(ada_fecha);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--let li_anio = year(ada_fecha);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ai_mes = 1 or ai_mes = 3 or ai_mes = 5 or ai_mes = 7 or ai_mes = 8 or
ai_mes = 10 or ai_mes = 12 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ai_mes = 2 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF mod(ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 29;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 28;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha = date(ai_mes || / || li_dia || / || ai_anio);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsf11(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(60) as codigoContable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tran char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (not exists(select 1 from systables where tabname = ''afcliqu''))
then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CREATE TABLE informix.afcliqu (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' liqu_des_liqu char(30)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' liqu_val_liqu decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' liqu_cod_tran char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcliqu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where peri_cod_ejer = ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ejer_ani_ejer = year(ada_fec_inic)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri = month(ada_fec_inic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_peri = li_peri -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 1101 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ls_desc || ||li_cod_tran ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 1103 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_fila = 0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ls_desc || ||li_cod_tran ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 1104 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ls_desc || ||li_cod_tran ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 1105 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_fila = 0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ls_desc || ||li_cod_tran ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 13 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ls_desc || ||li_cod_tran ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''1399'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 130105 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 130205 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 130305 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 130405 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130505'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130605'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130150'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130350'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130550'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130110'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130210'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130310'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130410'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130510'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130610'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130155'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130355'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130555'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130115'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130215'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130315'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130415'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130515'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130615'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130160'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130360'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130560'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 130120 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130220'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130320'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130420'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130520'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130620'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130165'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130365'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130565'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130125'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130225'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130325'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130425'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130525'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 130625 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130170'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130370'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 130570 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 130575 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 130580 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''130585'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''13e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''13e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''2101'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ls_desc || ||li_cod_tran ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''2103'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ls_desc || ||li_cod_tran ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''210305'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc =''210305'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''210310'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc =''210310'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''210315'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc =''210315'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''210320'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc =''210320'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''210325'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc =''210325'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''210330'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc =''210330'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''26'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ls_desc || ||li_cod_tran ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260105'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260205'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260250'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260305'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260405'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260450'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260605'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260705'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260905'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''269005'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26a''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26a'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260210'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260255'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260310'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260410'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260455'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260610'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260710'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260910'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''269010'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26b''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26b'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260215'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260260'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260315'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260415'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260460'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260615'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260715'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260915'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''269015'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26c''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26c'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260220'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260265'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260320'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260420'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260465'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260620'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260720'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260920'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''269020'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26d''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26d'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260225'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260270'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260325'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260425'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260470'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260625'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260725'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''260925'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = ''269025'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(''26e''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_desc = ''26e'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcliqu values(upper(ls_desc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(liqu_val_liqu) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcliqu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_prms_dinamico(ai_plz_dpfi integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15) as codcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(ccon_cod_ccon )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms=prms_cod_prms and prms_cod_prms in (1400')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vprm_cod_prms = prdi_cod_prms ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and prdi_cod_prdi like ''%MY%''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ccon_cod_ctas = trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and prdi_plz_prdi = ai_plz_dpfi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_cod_ccon ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsc04(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(1) as tipoIdentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoIdentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define Identificacionsujeto char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigobien char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipobien char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numeroOperacion char(32);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombreEmisor char(60) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorProvisionConst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_cod_tide as tipoIdentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie as Identificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred || as numeroOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtia_num_gtia || as codigobien')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtti_sib_gtti as tipobien')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select clie_cod_clie from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(gtit_fec_emis')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(gtit_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtit_val_nomi as valorNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtit_val_merc as valorenLibros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtit_val_merc as valorultimoavaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorProvisionConst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(cred_fec_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''N'' as estadoRegistro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoIdentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('numeroOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_num_cred = gtcr_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gtia_num_gtia = gtcr_num_gtia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gtit_cod_gtti = gtti_cod_gtti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gtit_num_gtia = gtia_num_gtia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf =''03/31/2016''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('numeroOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_numvalor_dpvi_fecha (ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldos decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if as_cod_opci = ''I'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_saldos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv =ai_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = ai_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_saldos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv =ai_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = ai_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldos is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldos = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_saldos ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_numregis_dpvi_fecha (ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldos decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if as_cod_opci = ''I'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_saldos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv =ai_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = ai_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_saldos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv =ai_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = ai_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldos is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldos = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_saldos ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_num_cliente( ai_cod_tcli integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numero;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_clie integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT max(clie_num_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_tcli= ai_cod_tcli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_ofic = ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF li_num_clie is null THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_clie = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num_clie = li_num_clie + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_num_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_tasa_efectiva(ada_tasa decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_tase decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_dias is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ai_dias = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_dias <30 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ai_dias = 30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_mes = ai_dias_base / ai_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_mes = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_mes = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---let ada_tasa = round(ada_tasa /100 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--let ada_tasa = round(ada_tasa / li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ada_tasa = ((ft_calcula_base_exponente( (1+
((ada_tasa/100)/li_mes))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ada_tasa ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_bcecte(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(2) as provincia ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as ventanillasext')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as otros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ofic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tofi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num_matr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select case when length(ciud_sib_ciud || )<2 then 0|| ciud_sib_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ciud_sib_ciud || end as canton ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(prov_sib_prov || ) <2 then 0 || prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else prov_sib_prov || end as provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ofic_cod_ofic <>0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ls_cod_tofi = ''M'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_matr = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ls_cod_tofi = ''A'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_agen = li_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ls_cod_tofi = ''S'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_sucu = li_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_sucu = li_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_calculo_edad(ada_fec_naci date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_edad decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_diasn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_anio_maxi= ft_cod_parametros(1789);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_fec_naci is null or ada_fec_naci = date(''01/01/1900'') then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_edad = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF Day(ada_fec_naci) > Day(ada_fec_actu) THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_diasn = Day(ada_fec_actu) + 30 - Day(ada_fec_naci);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mesn = Month(ada_fec_naci) +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_diasn = Day(ada_fec_actu) - Day(ada_fec_naci);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mesn = Month(ada_fec_naci);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_mesn > Month(ada_fec_actu) THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mesn = Month(ada_fec_actu) + 12 - li_mesn;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anion = Year(ada_fec_naci) + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mesn = Month(ada_fec_actu) - li_mesn;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anion = Year(ada_fec_naci);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anion = Year(ada_fec_actu) - li_anion;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_edad = li_anion +(li_mesn/12);---+ (li_diasn/365);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_edad ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_corrigue_otrosingresos(li_anio integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_tasi char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where pape_cod_tran in(36) and pape_cod_pape not in (select
dotr_cod_pape from bcaotcl)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pape_cod_usua not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pape_pap_ante is null')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(pape_fec_pape)=li_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadcom set dcom_may_dcom=0 where dcom_cod_comp=li_cod_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpap_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpap_cod_pape=li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dcom_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dcom_cod_comp=li_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas=li_cod_ctas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_tasi=lc_cod_tasi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor_actu - ld_valor <=0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete bcadcom where dcom_cod_comp=li_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas=li_cod_ctas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_tasi=lc_cod_tasi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadcom set dcom_valor=dcom_valor-ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dcom_cod_comp=li_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas=li_cod_ctas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_tasi=lc_cod_tasi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadcom set dcom_may_dcom=1 where dcom_cod_comp=li_cod_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcapape set pape_cod_usua=1 where pape_cod_pape=li_cod_pape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE FUNCTION informix.ft_calificacion_anterior(ai_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(4) as calificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_max date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_est_calf char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_dias integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(calf_fec_calf)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lda_fec_max')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_fec_calf <ada_fec_calf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_num_cred = ai_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select calf_est_calf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_est_calf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_fec_calf =lda_fec_max')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_num_cred = ai_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ls_est_calf is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_est_calf =''A-1'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_est_calf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsi02(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(25) as numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaUltimaCalificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numeroIdentificacionDeposito char(25) ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoIdentificacionEmisorDepositario ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacionEmisorDepositario char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define calificacionRiesgo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define calificadoraRiesgo char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuentaContable char(6);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorLibros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_cban integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_mban date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_sdct decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cban_num_cban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(cban_fec_aper')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CALR_SIB_CALR')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when banc_fec_banc is null then to_char(date(ada_fec_inic)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else to_char(banc_fec_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('substr(ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as tasa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as interes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''A'' as calificacionpropia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as provision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_cod_cban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaUltimaCalificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasaInteresNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacban ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = banc_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ccon_cod_ctas = cban_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cban_cod_banc = banc_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and banc_cod_crie = crie_cod_crie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and banc_cal_banc = calr_cod_calr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cban_cod_ecba <> 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(sdct_Fec_sdct)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lda_fec_mban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sdct_cod_cban = li_cod_cban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sdct_fec_sdct < ada_Fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(sdct_con_sdct)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_val_sdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sdct_cod_cban = li_cod_cban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sdct_fec_sdct = lda_Fec_mban;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_val_sdct is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_val_sdct = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(mban_val_mban * case mban_cod_tmba')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 1 then 1 else -1 end)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorLibros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mban_fec_mban between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mban_cod_cban = li_cod_cban;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if valorLibros is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorLibros= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valorLibros = ld_val_sdct +valorLibros;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaUltimaCalificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasaInteresNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----nuevas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select inve_doc_inve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(inve_fec_crea')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(inve_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calr_sib_calr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when banc_fec_banc is null then to_char(date(ada_fec_inic)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else to_char(banc_fec_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_prms_dinamico_inve(inve_plz_mini) as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_val_inve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_tas_inve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(minv_val_comp) from afcminv where minv_cod_rubr = 2 and
minv_cod_inve = x.inve_cod_inve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''A'' as calificacionpropia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(iinv_val_iinv) from afciinv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where minv_cod_minv = iinv_cod_minv and minv_cod_inve = x.inve_cod_inve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and iinv_cod_tasi =''C'' and iinv_fec_iinv between ada_fec_inic and
ada_Fec_fina )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaUltimaCalificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasaInteresNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = banc_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_cod_banc = banc_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and banc_cod_crie = crie_cod_crie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calr_cod_calr = banc_cal_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_fec_crea between ada_fec_inic and ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaUltimaCalificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasaInteresNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---vigentes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select inve_doc_inve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(inve_fec_crea')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(inve_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calr_sib_calr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when banc_fec_banc is null then to_char(date(ada_fec_inic)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else to_char(banc_fec_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_prms_dinamico_inve(inve_plz_mini) as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_val_inve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_tas_inve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(minv_val_comp) from afcminv where minv_cod_rubr = 2 and
minv_cod_inve = x.inve_cod_inve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''A'' as calificacionpropia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(iinv_val_iinv) from afciinv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where minv_cod_minv = iinv_cod_minv and minv_cod_inve = x.inve_cod_inve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and iinv_cod_tasi =''C'' and iinv_fec_iinv between ada_fec_inic and
ada_Fec_fina )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaUltimaCalificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasaInteresNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = banc_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_cod_banc = banc_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and banc_cod_crie = crie_cod_crie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calr_cod_calr = banc_cal_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_fec_crea <ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaUltimaCalificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasaInteresNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--canceladas renovadas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select inve_doc_inve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(inve_fec_crea')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(inve_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calr_sib_calr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when banc_fec_banc is null then to_char(date(ada_fec_inic)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else to_char(banc_fec_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_prms_dinamico_inve(inve_plz_mini) as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_val_inve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_tas_inve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(minv_val_comp) from afcminv where minv_cod_rubr = 2 and
minv_cod_inve = x.inve_cod_inve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''A'' as calificacionpropia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(iinv_val_iinv) from afciinv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where minv_cod_minv = iinv_cod_minv and minv_cod_inve = x.inve_cod_inve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and iinv_cod_tasi =''C'' and iinv_fec_iinv between ada_fec_inic and
ada_Fec_fina )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaUltimaCalificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasaInteresNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = banc_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_cod_banc = banc_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and banc_cod_crie = crie_cod_crie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calr_cod_calr = banc_cal_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_fec_crea < ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_cod_edpf in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_cod_inve in (select minv_cod_inve from afcminv where
minv_fec_paga >=ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaUltimaCalificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasaInteresNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_prms_dinamico_inve(ai_plz_dpfi integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15) as codcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(ccon_cod_ccon )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms=prms_cod_prms and prms_cod_prms in (601')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vprm_cod_prms = prdi_cod_prms ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and prdi_cod_prdi like ''%INVE%'' and ccon_cod_ctas =
trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and prdi_plz_prdi >= ai_plz_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by prdi_plz_prdi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_cod_ccon ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_dpvi_provision(ai_cod_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo_debe ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_inic date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--let lda_fec_inic = date(01/01/ || year(ada_fec_fina));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fec_inic = date(01/01/2015);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(prdv_val_prdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_saldo_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaprdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prdv_cod_dpvi = ai_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(prdv_fec_prdv) between lda_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and prdv_cod_tasi =''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldo_cred is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_cred = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(prdv_val_prdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_saldo_debe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaprdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prdv_cod_dpvi = ai_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(prdv_fec_prdv) between lda_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and prdv_cod_tasi =''D'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldo_debe is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_debe = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo_cred = ld_saldo_cred - ld_saldo_debe;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldo_cred <0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo_cred = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_saldo_cred ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_uaf_limiteriesgos(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(13) as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ad_val_parm ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_val_parm = 5000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd in(1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pape_cod_tran not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---tranferencias debitos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_tran in (37)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie not in(6490)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd in(1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie <>(select dpvi_cod_clie from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---transferencias creditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_tran in (12)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie not in(6490)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd in(1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie <>(select dpvi_cod_clie from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having sum(valor)>=ad_val_parm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tcdv_cod_tcap = tcap_cod_tcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---plazos fijos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select pgpf_cod_dpfi from bcapgpf where pgpf_cod_pgpf in (select
depg_cod_pgpf from bcadepg where depg_fec_pago between ada_fec_inic and
ada_fec_fina) and pgpf_cod_rubr = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_clie = x.dpfi_cod_clie and dpfi_cod_edpf in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having sum(nvl((select sum(dpfi_val_dpfi) from bcadpfi where
dpfi_cod_dpfi in')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select pgpf_cod_dpfi from bcapgpf where pgpf_cod_pgpf in (select
depg_cod_pgpf from bcadepg where depg_fec_pago between ada_fec_inic and
ada_fec_fina) and pgpf_cod_rubr = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_clie = x.dpfi_cod_clie and dpfi_cod_edpf in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_balance_evolucion_patrominio(ai_cod_ejer
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as ejecucion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ctas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_debe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---let ls_nom_deta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete bcaesep ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where esep_fec_esep = ada_Fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and esep_cod_peri =ai_peri_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and esep_cod_ejer = ai_ejer_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and esep_peri_ante =ai_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and esep_ejer_ante= ai_cod_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_registros = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ''3%''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and length(trim(ccon_cod_ccon)) = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ejer = ai_ejer_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = trim(ls_cod_ccon) || %;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- return ls_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_descripcion= SALDO ANTERIOR;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and length(trim(ccon_cod_ccon)) = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ejer = ai_ejer_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_ejer_actu <> ai_cod_ejer then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ai_cod_peri = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ai_cod_peri = ai_cod_peri -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_saldos_ctas (li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_debe is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_debe = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_haber is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_haber = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_total = ld_total +(ld_debe- ld_haber);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_mes = ai_cod_peri then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ((ld_total - ld_anterior) * -1) <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- return ls_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaesep values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_anterior = ld_total;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_mes = ai_peri_actu then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ((ld_total - ld_anterior) * -1) <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- return ls_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaesep values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_registros = li_registros +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_registros with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_saldo_credito_fecha(ada_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(divc_cap_divc) + nvl((sum((select sum(abdv_val_abdv) from
bcaabdv where abdv_cod_divc = x.DIVC_COD_DIVC and abdv_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_fec_abdv >ada_fec_actu and abdv_cod_pago IN (select
pago_cod_pago from bcapago where pago_ctr_pago = 1) ) ))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_num_cred =cred_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic <= ada_fec_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_cod_ediv not in (4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_num_cred = ai_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('having (sum(divc_cap_divc) + nvl((sum((select sum(abdv_val_abdv) from
bcaabdv where abdv_cod_divc = x.DIVC_COD_DIVC and abdv_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_fec_abdv >ada_fec_actu and abdv_cod_pago IN (select
pago_cod_pago from bcapago where pago_ctr_pago = 1) ) ))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_saldo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldo is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_valor_credito_pago_fecha(ada_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_rubr = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(abdv_val_abdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where abdv_cod_divc = DIVC_COD_DIVC ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_cod_rubr in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_fec_abdv between ada_fec_actu and ada_fec_fina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_cod_pago IN (select pago_cod_pago from bcapago where
pago_ctr_pago = 1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred = ai_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(abdv_val_abdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where abdv_cod_divc = DIVC_COD_DIVC ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_cod_rubr = ai_cod_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_fec_abdv between ada_fec_actu and ada_fec_fina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_cod_pago IN (select pago_cod_pago from bcapago where
pago_ctr_pago = 1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred = ai_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldo is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_saldo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_max_fecha_transaccion (ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning date as fechamax')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_max date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(mcdv_fec_mcdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_max')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv =ai_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = ai_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran not in (13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(mcdv_fec_mcdv) <=ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_max is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpvi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_max')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi where dpvi_cod_dpvi = ai_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return lda_fec_max ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_consolidado_magisterio(ada_fec_inic
date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning chaR(60) as usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select usua_cod_usua ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred y')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = empl_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_empl = usua_cod_empl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and usua_cod_usua = cred_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ccre =ccre_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in(4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_eope <2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(abdv_val_abdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_recuperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where abdv_cod_divc = DIVC_COD_DIVC ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_pago IN (select pago_cod_pago from bcapago where
pago_ctr_pago = 1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred =cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_usua = li_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ccre = li_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_ediv not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_eope <2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_numero1= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cred1= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(count(cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_numero1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred y')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in(4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ccre = li_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_usua = li_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_eope >1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(abdv_val_abdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_recuperacion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where abdv_cod_divc = DIVC_COD_DIVC ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_pago IN (select pago_cod_pago from bcapago where
pago_ctr_pago = 1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred =cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_usua = li_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ccre = li_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_ediv not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_eope >1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select usua_cod_usua ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where abdv_cod_divc = DIVC_COD_DIVC ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_pago IN (select pago_cod_pago from bcapago where
pago_ctr_pago = 1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred =cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_usua not in (select cred_cod_usua from bcacred where
cred_fec_inic between ada_fec_inic and ada_fec_fina and cred_cod_ecre not in
(4) )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = empl_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_empl = usua_cod_empl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and usua_cod_usua = cred_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ccre =ccre_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_ediv not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_eope >1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_bcesoc(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(3) as tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentificacion char(3) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numeroidentificacion char(13) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define apellidos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select substr(tide_des_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpvi_cod_clie = clie_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_tide = tide_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv =1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_fec_inic <=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_actualiza_cliente_peps(al_cod_clie
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING INTEGER AS BAN_peps;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_peps')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ide_peps char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_peps = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select peps_cod_peps')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_peps')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcpeps where peps_ide_peps like as_ide_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_peps is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_peps = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_peps >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_count')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcclpe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clpe_cod_clie = al_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_count > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcclpe set clpe_fec_actu = ada_fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clpe_cod_clie = al_cod_clie and clpe_cod_peps=
li_cod_peps;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcclpe values(al_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_mov_cuentas(as_cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning date as fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_Fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_val_debe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tasi char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_caja char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lda_val_debe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas=sact_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_peri=peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_cod_ejer=ejer_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ejer_ani_ejer= year(ada_fec_inic) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon like as_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ccon_cod_tcue=''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri<month(ada_fec_inic) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ada_fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select comp_fec_comp as fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum((select sum(dcom_valor) from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas=ccon_cod_ctas and ccon_cod_ccon like as_cod_ccon))
as Debe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum((select sum(dcom_valor) from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas=ccon_cod_ctas and ccon_cod_ccon like as_cod_ccon)) as
Haber')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacomp x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_fec_comp between ada_Fec_inic and ada_fec_fina and not
comp_fec_comp is null')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --and comp_cod_tdoc in (select tdoc_cod_tdoc from bcatdoc where
tdoc_tip_tdoc=0)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having (sum((select sum(dcom_valor) from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas=ccon_cod_ctas and ccon_cod_ccon like as_cod_ccon ))
<>0 or')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum((select sum(dcom_valor) from bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas=ccon_cod_ctas and ccon_cod_ccon like
as_cod_ccon ))<>0)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_val_debe is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_val_debe= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_val_cred is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_val_cred= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_ante_total1=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_ante_total= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_ante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_ante1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select caja_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(deef_fec_deef)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_max')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where deef_cod_caja =ls_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(deef_fec_deef)<= lda_fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_movi = 3 and deef_cod_modu = 5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_max is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_max = lda_fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_ante = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_ante1 = 0 ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_max <> lda_fec_actu then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(defe_num_defe*camb_val_camb)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(deef_fec_deef) = lda_fec_max')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_caja = ls_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_deef=defe_cod_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and camb_cod_camb=defe_cod_camb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_tasi =''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by deef_cod_tasi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(defe_num_defe*camb_val_camb)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor_ante1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(deef_fec_deef) = lda_fec_max')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_caja = ls_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_deef=defe_cod_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and camb_cod_camb=defe_cod_camb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_tasi =''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by deef_cod_tasi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor_ante is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_ante = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor_ante1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_ante1 = 0 ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_ante_total = ld_valor_ante_total+
ld_valor_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_ante_total1 = ld_valor_ante_total1+
ld_valor_ante1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(defe_num_defe*camb_val_camb)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(deef_fec_deef) = lda_fec_actu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- and deef_cod_caja in (select caja_cod_caja from bcacaja where
caja_cod_tcar not in (4))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_deef=defe_cod_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and camb_cod_camb=defe_cod_camb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_tasi =''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by deef_cod_tasi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(defe_num_defe*camb_val_camb)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(deef_fec_deef) = lda_fec_actu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- and deef_cod_caja in (select caja_cod_caja from bcacaja where
caja_cod_tcar not in (4))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_deef=defe_cod_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and camb_cod_camb=defe_cod_camb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_tasi =''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by deef_cod_tasi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor1= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return lda_fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_valida_fecha_primer_pago( al_cod_lcre
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as validacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_cod_lcre = 8 and al_num_cuot <= 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_fec_pago<ada_fec_inic + ai_num_dias then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_fec_pago> ada_fec_inic + (ai_num_dias* al_num_cuot) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_llena_espacios(as_cadena char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning chaR(15) as cadena')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ceros char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num = length(trim(as_cadena));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_ceros =;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_espacios - li_num > 0then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for li_i =1 to ai_espacios - li_num loop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_ceros = ''0'' || ls_ceros;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---return ls_ceros with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end loop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_ceros = trim(ls_ceros) || trim(as_cadena) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_ceros ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--return ls_ceros ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_quita_ceros(as_cadena char(7))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning chaR(7) as cadena')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ceros char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num = length(trim(as_cadena));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_ceros =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOR loop = 1 to li_num ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ls_ceros = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF substr(as_cadena')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_ceros = substr(as_cadena')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let as_cadena = substr(as_cadena')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---let li_num = length(trim(as_cadena));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_pos = loop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_i= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---return as_cadena ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit for;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOR;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_ceros = trim(as_cadena) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return as_cadena ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--return ls_ceros ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_valor_dpvi_fecha (ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldos = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_fec_inic <> ada_fec_fina then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where y.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_mcdv = x.mcdv_cod_mcdv and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where y.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_mcdv = x.mcdv_cod_mcdv and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(dchv_valor) from bcadchv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_mcdv= dchv_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dchv_cod_mcdv>1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dchv_cod_modu in (5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran in (8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_dpvi = y.dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_mcdv = x.mcdv_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and (dchv_fec_esac >ada_fec_fina or dchv_fec_esac is null))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_saldos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv =ai_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_dpvi = ai_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select SUM(sald_conta )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_saldos_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasald ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sald_cod_dpvi = dpvi_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_dpvi = ai_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv = ai_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sald_fec_sald = (select max(sald_fec_sald) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_cod_dpvi = y.dpvi_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sald_fec_sald < ada_fec_inic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldos is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldos = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldos_ante is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldos_ante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldos = ld_saldos + ld_saldos_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_saldos ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_nombre_garante(al_num_cred integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(150) as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nombre char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_gar char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_gar = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT trim(clie_ide_clie) ||-||TRIM(clie_ape_clie) || ||
nvl(TRIM(y.clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaclie y')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE clie_cod_clie = gara_cod_clie AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' gara_num_cred =al_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_gar = trim(ls_nombre) || ; || trim(ls_gar) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_gar;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.reportes_anexomayor(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(3) as tipo_iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_tran char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_garantes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipo_iden char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define iden char(13); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define NOMbclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuenclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fech_aper')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipotrans char(15) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define id_prop_trans char(13) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valtrans decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define vinc char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ofic char(20) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_val_parm =10000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf3_transacciones where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf1_clientes where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf2_productos where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---depositos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sp_valor_dpvi_fecha (ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_tcdv not in (1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where valor>0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 2 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_i<=ai_num_regi then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select CLIE_COD_TIDE as tipo_iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CLIE_IDE_CLIE as iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (TRIM(CLIE_APE_CLIE) || || NVL(TRIM(CLIE_NOM_CLIE)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie as cuenclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(clie_fec_ingr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into tipo_iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return tipo_iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_i = li_i +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select hdpf_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afchdpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf) = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_i<=ai_num_regi then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select CLIE_COD_TIDE as tipo_iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CLIE_IDE_CLIE as iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (TRIM(CLIE_APE_CLIE) || || NVL(TRIM(CLIE_NOM_CLIE)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_num_dpfi as cuenclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(dpfi_fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into tipo_iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_dpfi = li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return tipo_iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_i = li_i +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.reportes_anexomayor_totales(ada_fec_inic date
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_tran char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_garantes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipo_iden char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define iden char(13); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define NOMbclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuenclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fech_aper')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipotrans char(15) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define id_prop_trans char(13) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valtrans decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define vinc char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ofic char(20) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_val_parm =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf3_transacciones where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf1_clientes where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf2_productos where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---depositos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sp_valor_dpvi_fecha (ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_tcdv not in (1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where valor>0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 2 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_i<=ai_num_regi then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ad_val_parm = valtrans + ad_val_parm ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_i = li_i +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ad_val_parm ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete uaf0_socios1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ad_val_parm = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_num_cred= calf_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_fec_calf= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_i<=ai_num_regi then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ad_val_parm = valtrans + ad_val_parm ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_i = li_i +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ad_val_parm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ad_val_parm = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select hdpf_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afchdpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf) = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_i<=ai_num_regi then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ad_val_parm = valtrans + ad_val_parm ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_i = li_i +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ad_val_parm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_numero_telefonos_socios(al_cod_clie
integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(50) as numeros;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_num_tele char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_telefonos char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_telefonos= ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tele_num_tele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_num_tele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tele_cod_clie = al_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if length(ls_num_tele) >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_telefonos = trim(ls_telefonos) || ls_num_tele || /;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_telefonos ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_seps_captaciones(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(1) as tipo_iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(100) as nombclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as cuenclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as tipocta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as prod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as stat')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fech_aper')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fech_ult_trans')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fech_cap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as tipocred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as vinc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipo_iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define iden char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombclie char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuenclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define prod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fech_aper')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cheqplaza')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT CLIE_COD_TIDE as tipo_iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(TRIM(CLIE_APE_CLIE) || || NVL(TRIM(CLIE_NOM_CLIE)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_num_clie as cuenclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE DPVI_COD_TCDV')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 1 THEN 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 2 THEN 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else 1 END AS TIPOCTA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('TRIM(TCDV_DES_TCDV) as prod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 1 THEN ''Abierta''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 2 then ''Inhabilitada''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''Bloqueada'' end as stat')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char( dpvi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_dpvi_maxfecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as cheqplaza')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as cheqloc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case tcdv_cod_tcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 2 then dpvi_tas_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else (select min(tadv_tas_acti) from bcatadv where tadv_cod_tcdv =
x.dpvi_cod_tcdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end as tasa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 remetrans')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(vpcn_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where vpcn_cod_dpvi = x.dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vpcn_cod_picn not in (3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vpcn_fec_inic<=ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(vpcn_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where vpcn_cod_dpvi = x.dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vpcn_cod_picn in (3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vpcn_fec_inic<=ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(((select sum(prdv_val_prdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaprdv where prdv_cod_tasi =''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and prdv_cod_dpvi = x.dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and date(prdv_fec_prdv) between date(01/01/ ||year(ada_fec_fina)) and
ada_fec_fina)) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(((select sum(prdv_val_prdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaprdv where prdv_cod_tasi =''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and prdv_cod_dpvi = x.dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and date(prdv_fec_prdv) between date(01/01/|| year(ada_fec_fina)) and
ada_fec_fina))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ada_fec_inic and
ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ada_fec_inic and
ada_fec_fina) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(nvl((select sum(vpcn_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where vpcn_cod_dpvi = x.dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vpcn_cod_picn not in (3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vpcn_fec_inic<=ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(vpcn_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where vpcn_cod_dpvi = x.dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vpcn_cod_picn in (3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vpcn_fec_inic<=ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ada_fec_inic and
ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ada_fec_inic and
ada_fec_fina) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char( dpvi_fec_upgi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select case max(cred_cod_ccre)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 1 then ''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 2 then ''N''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 3 then ''V''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 4 then ''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred where cred_cod_clie = x.dpvi_cod_clie and cred_cod_ecre in
(1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''SOCIO'' as vinc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select trim(ofic_nom_ofic) from bcaofic where ofic_cod_ofic =
x.dpvi_cod_ofic) as ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipo_iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('stat')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorbloq')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tipocred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tcdv = dpvi_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldtot<> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipo_iden')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('stat')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorbloq')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tipocred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_cuenta_cartera(ll_cod_ccre integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--execute function informix.ft_cuenta_cartera(2 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_eope char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_caracte char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define len ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (select count(*) from afcdccr ) = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Select trim(paca_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccre_ven_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('From bcapaca ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Where paca_cod_ccre = ccre_cod_ccre and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' paca_cod_ccre = ll_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('paca_ran_inic <= ll_ran_dias and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(paca_ran_fina >= ll_ran_dias or paca_ran_fina is null);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_cod_rel = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_opcion = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_nor_ccon = trim(ls_ven_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;if al_opcion = 3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_nor_ccon = trim(ls_rie_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_opcion = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_nor_ccon = trim(ls_rel_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_opcion = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_nor_ccon = trim(ls_rve_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_opcion = 3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_nor_ccon = trim(ls_rri_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_cod_ccon = trim(ls_nor_ccon) || trim(ls_cod_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---Return ls_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Select trim(paca_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('From bcapaca ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Where paca_cod_ccre = ll_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('paca_ran_inic <= ll_ran_dias and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(paca_ran_fina >= ll_ran_dias or paca_ran_fina is null);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dccr_ctas_deud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_nor_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcdccr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dccr_cod_ccre =ll_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dccr_num_para in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dccr_Fec_fina is null')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_pos = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET len = LENGTH(trim(ls_cod_eope));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_caracte = trim(ls_cod_eope);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOR loop = 1 to len')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF substr(ls_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_caracte= substr(ls_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_pos = loop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if trim(ls_caracte) = ll_cod_rel then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = trim(ls_nor_ccon) ||
trim(ls_cod_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Return ls_cod_ccon ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_caracte= substr(ls_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOR;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---Return ls_caracte with resume ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if trim(ls_caracte) = ll_cod_rel then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = trim(ls_nor_ccon) ||
trim(ls_cod_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Return ls_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE FUNCTION informix.ft_calf_promedio_creditos(ai_num_cred integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(3) as calificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_calif char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_prom integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(avg(catr_val_catr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_prom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where catr_cod_sib = calf_est_calf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_num_cred = ai_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and catr_cod_modu = 17;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(catr_cod_sib ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_calif')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacatr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where catr_val_catr = li_prom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and catr_cod_modu = 17;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_calif ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end FUNCTION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_indice_clases( ai_ejercicio
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as periodo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_peri integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_mes_peri char(15) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_clase <>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_ctas = ccon_cod_ctas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud) from afcdccr
where dccr_cod_ccre = ai_clase and dccr_num_para<=9 and not dccr_num_para in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri <= x.peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_cod_ejer = ai_ejercicio)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud) from afcdccr where
dccr_cod_ccre = ai_clase and dccr_num_para<=9 ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri <= x.peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_cod_ejer = ai_ejercicio) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaperi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mese_cod_mese = peri_mes_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri between peri_inicio and peri_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--return li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---return li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor_total is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor_total = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor_total<> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = ld_Valor / ld_valor_total*100; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = round(ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_ctas = ccon_cod_ctas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud) from afcdccr
where dccr_num_para<=9 and not dccr_num_para in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri <= x.peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_cod_ejer = ai_ejercicio)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud) from afcdccr where
dccr_num_para<=9 ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri <= x.peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_cod_ejer = ai_ejercicio) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaperi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mese_cod_mese = peri_mes_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri between peri_inicio and peri_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--return li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---return li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor_total is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor_total = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor_total<> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = ld_Valor / ld_valor_total*100; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = round(ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_clase <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_ctas = ccon_cod_ctas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud) from afcdccr
where dccr_cod_ccre = ai_clase and dccr_num_para<=9 and not dccr_num_para in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri <= x.peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_ofic = ai_oficina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud) from afcdccr where
dccr_cod_ccre = ai_clase and dccr_num_para<=9 ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri <= x.peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_ofic = ai_oficina) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaperi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mese_cod_mese = peri_mes_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri between peri_inicio and peri_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--return li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---return li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor_total is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor_total = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor_total<> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = ld_Valor / ld_valor_total*100; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = round(ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_ctas = ccon_cod_ctas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud) from afcdccr
where dccr_num_para<=9 and not dccr_num_para in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri <= x.peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_ofic = ai_oficina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud) from afcdccr where
dccr_num_para<=9 ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_peri <= x.peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_ofic = ai_oficina) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaperi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mese_cod_mese = peri_mes_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri between peri_inicio and peri_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--return li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---return li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor_total is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor_total = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor_total<> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = ld_Valor / ld_valor_total*100; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = round(ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_cartera_valor_credito_anterior(ai_num_cred
integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(abdv_val_abdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where abdv_cod_rubr =1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_cod_divc = divc_cod_divc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred = cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_num_reli = ai_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_cod_pape in (select cred_cod_pape -1 from bcacred where
cred_num_cred = ai_num_cred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_Valor ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_nombre_oficial(ai_cod_ofct integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(100) as nombreoficial ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_oficial char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where empl_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and empl_cod_empl = ai_cod_ofct;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ls_oficial is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_oficial=ADMINISTRADOR;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_oficial;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_captaciones_r_polizasvida(ada_fec_inic date
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(100) as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fecnac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(clie_ape_clie) || || nvl(trim(clie_nom_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(posv_fec_posv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(posv_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpos_val_tpos as valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afctpos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = posv_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tpos_cod_tpos = posv_cod_tpos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and posv_fec_fina between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by posv_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(clie_ape_clie) || || nvl(trim(clie_nom_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(posv_fec_posv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(posv_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpos_val_tpos as valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afctpos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = posv_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tpos_cod_tpos = posv_cod_tpos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and posv_fec_fina between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by posv_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsc03(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char (1) as tipoidentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as identificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(32) as numerooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as tipoGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as tipoidentgarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as identgarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as causaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(32) as numerogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as tipogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as ubicaciongarantiaprovincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as ubicaciongarantiacanton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as ubicaciongarantiaparroquia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaavaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as numeroregistrogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechacontabgarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as estadoregistro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentificacionsujeto char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numeroregistrogarantia char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoGaranteCodeudor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valoravaluo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- creditos hipotecarios y prendarios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT CLIE_COD_TIDE as tipoIdentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--''NULO'' as tipoGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select clie_cod_tide from bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND GARA_COD_GARA = (SELECT MAX(GARA_COD_GARA) FROM BCAGARA WHERE
GARA_NUM_CRED = X.CRED_NUM_CRED))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--''NULO'' AS tipoIdentGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select clie_cod_tide from bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND GARA_COD_GARA = (SELECT MAX(GARA_COD_GARA)FROM BCAGARA WHERE
GARA_NUM_CRED = X.CRED_NUM_CRED))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select clie_ide_clie from bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND GARA_COD_GARA = (SELECT MAX(GARA_COD_GARA)FROM BCAGARA WHERE
GARA_NUM_CRED = X.CRED_NUM_CRED))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as fechaElimiGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as causaElimiGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select gtia_num_gtia || from bcagtcr where gtcr_num_cred =
x.cred_num_cred and gtcr_num_gtia = y.gtia_num_gtia)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select tgar_sib_tgar from bcagtcr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(( select case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(prov_sib_prov || ) <2 then 0 || prov_sib_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else prov_sib_prov || end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaprov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where gbie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gtcr_num_gtia = gtia_num_gtia ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gtcr_num_cred = x.cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gtia_num_gtia = y.gtia_num_gtia) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(( select case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(ciud_sib_ciud || ) <2 then 0 || ciud_sib_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ciud_sib_ciud || end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasect ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where gbie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gtcr_num_gtia = gtia_num_gtia ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gtcr_num_cred = x.cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gtia_num_gtia = y.gtia_num_gtia)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('as ubicaciongarantiacanton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(( select case when length(sect_sib_sect || )<2 then 0||
sect_sib_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else sect_sib_sect || end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasect ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where gbie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gtcr_num_gtia = gtia_num_gtia and gtcr_num_cred = x.cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gtia_num_gtia = y.gtia_num_gtia) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select gbie_ava_cocn from bcagbie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select gbie_ava_cocn from bcagbie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_ava_cocn from bcagbie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select trim(to_char(gbie_fec_avco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select gbie_num_rgpr || from bcagbie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select trim(to_char(x.cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select round((x.cred_cap_cred/ gtcr_val_gtcr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ''N'' from bcagtcr where gtcr_num_cred= x.cred_num_cred and
gtcr_num_gtia = y.gtia_num_gtia)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoidentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('causaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valoravaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaavaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('estadoregistro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM BCACLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = CLIE_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND CRED_COD_ECRE not IN (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gtia_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_tgar in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (cred_fec_pago>ada_Fec_fina or cred_fec_pago is null)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoidentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaavaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- creditos autoliquidables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT CLIE_COD_TIDE as tipoIdentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as tipoGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--(select clie_cod_tide from bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--AND GARA_COD_GARA = (SELECT MAX(GARA_COD_GARA) FROM BCAGARA WHERE
GARA_NUM_CRED = X.CRED_NUM_CRED)) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' AS tipoIdentGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--(select clie_ide_clie from bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--AND GARA_COD_GARA = (SELECT MAX(GARA_COD_GARA) FROM BCAGARA WHERE
GARA_NUM_CRED = X.CRED_NUM_CRED)) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' AS identgarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as fechaElimiGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as causaElimiGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtia_num_gtia || as numerogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgar_sib_tgar as tipogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(( select case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(prov_sib_prov || ) <2 then 0 || prov_sib_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else prov_sib_prov || end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaprov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and z.clie_cod_sect = sect_cod_sect) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(( select case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(ciud_sib_ciud || ) <2 then 0 || ciud_sib_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ciud_sib_ciud || end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasect ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and z.clie_cod_sect= sect_cod_sect)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('as ubicaciongarantiacanton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(( select case when length(sect_sib_sect || )<2 then 0||
sect_sib_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else sect_sib_sect || end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasect ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where z.clie_cod_sect = sect_cod_sect) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtcr_val_gtcr as valorAvaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-9999.99 as valoravaluocomercial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-9999.99 as valoravaluocatastral')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(to_char(cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as numeroRegistroGarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(to_char(x.cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('round((x.cred_cap_cred/ gtcr_val_gtcr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''N'' as estadoregistro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoidentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('causaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaavaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('estadoregistro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM BCACLIE z')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = CLIE_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND CRED_COD_ECRE not IN (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tgar_cod_tgar = x.cred_cod_tgar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gtia_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_tgar in (9)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_num_cred = gtcr_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gtia_num_gtia = gtcr_num_gtia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (cred_fec_pago>ada_Fec_fina or cred_fec_pago is null)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoidentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaavaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT CLIE_COD_TIDE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''C'' as tipoGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_ide_cfam ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as fechaElimiGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as causaElimiGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as numerogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as ubicaciongarantiaprovincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as ubicaciongarantiacanton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as ubicaciongarantiaparroquia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-9999.99 as valorAvaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-9999.99 as valoravaluocomercial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-9999.99 as valoravaluocatastral')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as fechaAvaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as numeroRegistroGarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as fechaContabGarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-9999.99 as porcentajecubregarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as estadoregistro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoidentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valoravaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaavaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('estadoregistro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM BCACLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = CLIE_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND CRED_COD_ECRE not IN (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND cfam_cod_clie = clie_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CFAM_COD_TCFA = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--and cfam_cod_fami >0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_tgar not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_num_cred not in (5161)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (cred_fec_pago>ada_Fec_fina or cred_fec_pago is null)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---if (select count(*) from bcagara where gara_num_cred =
numerooperacion) = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoidentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('identgarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valoravaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaavaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('estadoregistro with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---garante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT CLIE_COD_TIDE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''G'' as tipoGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select clie_cod_tide from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select clie_ide_clie from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('= x.cred_num_cred and gara_cod_gara = y.gara_cod_gara) as cfam_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as fechaElimiGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as causaElimiGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as tipogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as ubicaciongarantiaprovincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('as ubicaciongarantiacanton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as ubicaciongarantiaparroquia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-9999.99 as valorAvaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-9999.99 as valoravaluocomercial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-9999.99 as valoravaluocatastral')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as fechaAvaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as numeroRegistroGarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as fechaContabGarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-9999.99 as porcentajecubregarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as estadoregistro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoidentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valoravaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaavaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('estadoregistro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM BCACLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = CLIE_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND CRED_COD_ECRE not IN (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_num_cred = gara_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_tgar not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (cred_fec_pago>ada_Fec_fina or cred_fec_pago is null)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoidentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valoravaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaavaluo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('estadoregistro with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_seps_cartera(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(1) as tipoIdentificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char (50) as apecliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char (2) as tipocartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as tipodeproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as tipooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(5) as codigorepago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as descrrepago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(5) as actividadeconomica')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as descripcionactividadeco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as descripciongrupo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char (2) as estadooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechainicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechavenc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechadividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaultpago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as intervalo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as diasMorasidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as estadorestructuracion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(5) AS GARANTIA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) AS VINCULACION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoIdentificacion char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numIdentificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estadorestructuracion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define calificacionHomologada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define apecliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tasainteres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorNoDevengaInteres_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorVencido_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define gastosRecupCarteraVencida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define montooriginal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipocartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigorepago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define descripcionactividadeco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipodeproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuotaCredito decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaCastigo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcuota integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct CLIE_COD_TIDE as tipoIdentificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('TRIM(CLIE_APE_CLIE) as apecliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred as numOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case cred_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 1 then ''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 2 then ''N''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 3 then ''V''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 4then''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end as tipocartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''CREDITO'' as tipodeproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_des_ccre as tipooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NA'' as codigorepago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(''''' descrrepago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtcr_sib_dtcr as actividadeconomica')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtcr_des_dtcr as descripcionactividadeco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NA'' as descripciongrupo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case cred_Cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 1 then ''N''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 2 then ''N''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 3 then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 11 then ''R''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end as estadooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char( cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char( cred_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic as fechadividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic as fechaultpago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select intv_num_dias from bcaintv where intv_cod_intv= x.CRED_COD_INTV)
as intervalo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_dias_venc as diasMorasidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 estadorestructuracion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as numerorestructuracion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cap_cred as montooriginal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_tas_cred as tasainteres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorcomision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorcomisionxvencer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorcomisionvencida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_est_calf as calificacionPropiariegopropia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorPorVencer_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorPorVencer_31_90_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 asvalorPorVencer_91_180_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorPorVencer_181_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorPorVencerMayor_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorNoDevengaInteres_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorNoDevengaInteres_31_90_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorNoDevengaInteres_91_180_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorNoDevengaInteres_181_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorNoDevengaInteresMayor_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorVencido_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as venc60')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorVencido_31_90_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorVencido_91_180_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorVencido_181_270_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorVencido_271_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorVencido_361_720_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_sal_cred as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_dema as valorDemandaJudicial ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_cast as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('carteraCastigada ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_prov as provrequeridaOriginal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_pro_cons as provisionConstituida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 interesOrdinario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as interessobremora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgar_sib_tgar ASGARANTIA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(gtcr_val_gtcr) from bcagtcr where gtcr_num_cred
=x.creD_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tvin_des_tvin AS VINCULACION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ccre as codccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoIdentificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('descrrepago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('intervalo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calificacionPropia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorNoDevengaInteres_31_90_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorNoDevengaInteresMayor_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vencM1080')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM BCACLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = CLIE_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and eope_cod_eope= cred_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND calf_fec_calf = ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ccre = ccre_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_tgar = tgar_cod_tgar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_tvin = tvin_cod_tvin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_dtcr = dtcr_cod_dtcr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let APECLIENTE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if diasMorasidad >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fechadividendo= to_char((date(ada_fec_fina) - diasMorasidad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select to_char(min(divc_fec_venc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into fechadividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_num_cred = numOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_pago > ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if fechadividendo is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if numcuota is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fechadividendo = fechainicio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select to_char(divc_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into fechadividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_num_cred = numOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_divc = numcuota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select to_char(max(divc_fec_pago)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into fechaultpago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_num_cred = numOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_pago <= ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dcal_val_deve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into interesOrdinario from afcdcal where dcal_num_cred= numOperacion and
dcal_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcal_fec_calf =ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into interesSobreMora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcal_fec_calf =ada_Fec_fina and dcal_cod_ediv = 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let interesSobreMora = interesSobreMora * tasainteres * diasMorasidad
*1.1/36000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valorPorVencer_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorNoDevengaInteres_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorVencido_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorPorVencer_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 1 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorPorVencer_31_90_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 1 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorPorVencer_91_180_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 1 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorPorVencer_181_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 1 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) into valorPorVencerMayor_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 1 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorNoDevengaInteres_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 3 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorNoDevengaInteres_31_90_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 3 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorNoDevengaInteres_91_180_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 3 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorNoDevengaInteres_181_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 3 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorNoDevengaInteresMayor_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv =3 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_1_30_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_31_90_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred=')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('numOperacion and dcal_fec_calf =ada_Fec_fina and dcal_cod_ediv = 2 and
substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF codccre <>3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_91_180_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF codccre =3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_181_270_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF codccre =1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_181_270_Dias from afcdcal where dcal_num_cred=
numOperacion and dcal_fec_calf =ada_Fec_fina and dcal_cod_ediv = 2 and
substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF codccre =1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_271_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred=numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codccre =2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_181_270_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codccre =3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_271_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codccre =2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_271_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codccre =4 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_271_360_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codccre= 4 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_361_720_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codccre= 3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_361_720_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codccre = 3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into valorVencido_361_720_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal where dcal_num_cred= numOperacion and dcal_fec_calf
=ada_Fec_fina and dcal_cod_ediv = 2 and substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if carteracastigada> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let calificacionPropia = ''E'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if diasMorasidad = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ada_fec_fina - min(divc_fec_venc) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into diasMorasidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_ediv = 6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = numoperacion;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif diasMorasidad< 126and codccre in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let diasMorasidad= 126;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif diasMorasidad< 360 and codccre in (1) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let diasMorasidad = 360;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif diasMorasidad< 451and codccre in (3) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let diasMorasidad = 451;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---let saldototal = saldototal+carteraCastigada;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('descrrepago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaultpago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calificacionPropia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorNoDevengaInteres_31_90_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorVencido_31_90_Dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vencM1080')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_presupuesto_valores_presupuesto(ai_ani_pres
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15) as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ai_mes_ante = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT distinct bcaccon.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaccon.ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(Abs(bcavpre.vpre_val_vpre)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacpre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE vpre_cod_pres = pres_cod_pres and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaccon.ccon_cod_ccon = pres_cod_ccon and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mese_cod_mese = vpre_cod_mese and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpre_cod_cpre = pres_cod_cpre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cpre_cod_cont = ai_cod_cont and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cpre_ani_pres = ai_ani_pres and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpre_cod_mone = ai_cod_mone and ccon_cod_ccon like as_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mese_cod_mese not in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_mes_ante = 12 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cuenta_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if mes = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let enero = valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif mes = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let febrero = valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif mes = 3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let marzo = valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif mes = 4 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let abril = valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif mes = 5 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let mayo = valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif mes = 6 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let junio = valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif mes = 7 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let julio = valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif mes = 8 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let agosto = valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif mes = 9 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let septiembre = valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif mes = 10 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let octubre = valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif mes = 11 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let noviembre = valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif mes = 12 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let diciembre = valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ai_mes_ante = mes;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let cuenta_ante = cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let nombre_ante = nombre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_calculo_mora(ai_dias_mora integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_dias_base integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_rubr integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dias_base = ft_cod_parametros(9);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select gcob_cod_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcgcob')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mont_cod_mont = gcob_cod_mont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and plaz_cod_plaz = gcob_cod_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mont_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and plaz_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and plaz_cod_modu = 17')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mont_cod_modu = 17 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ai_dias_mora between plaz_ini_plaz and plaz_fin_plaz ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---and 60 between plaz_ini_plaz and plaz_fin_plaz ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gcob_cod_rubr = ai_cod_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_tasa_calc = (((ld_val_calc/100)+ ai_rel_mora) *
ai_rel_mora );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dias_base = li_dias_base *100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor_mora =(ad_valor * (ai_dias_mora ) * ad_tas * ld_tasa_calc) /
li_dias_base ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_valor_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_calculo_segdesgra(ai_dias integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_dias_base integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_rubr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dias_base = ft_cod_parametros(9);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---///PRORRATEADO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if as_tip_segd =''FP'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = round((ad_valor * ad_tas_segd) / ai_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---///EN CADA DIVIDENDO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif as_tip_segd =''FD'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = round((ad_valor * ad_tas_segd * ai_dias)/ai_intv_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---// NO APLICABLE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif as_tip_segd =''NA'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif as_tip_segd = ''PA'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_valor ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_captaciones_reporte_pignorados(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define producto char(25); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define pignorado char(25);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define oficina char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_picn <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' picn_des_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' vpcn_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' vpcn_fec_inic as fec_modi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapicn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv = tcdv_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_dpvi = vpcn_cod_dpvi and picn_cod_picn = vpcn_cod_picn
and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' picn_cod_picn = ai_cod_picn and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv = ai_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --vpcn_fec_inic between ada_fec_inic and ada_fec_fina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by dpvi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' picn_des_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' vpcn_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' vpcn_fec_inic as fec_modi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapicn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv = tcdv_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_dpvi = vpcn_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' picn_cod_picn = vpcn_cod_picn and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv = ai_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --vpcn_fec_inic between ada_fec_inic and ada_fec_fina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by dpvi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_cod_picn =0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' picn_des_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' vpcn_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' vpcn_fec_inic as fec_modi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapicn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv = tcdv_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_dpvi = vpcn_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' picn_cod_picn = vpcn_cod_picn and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv = ai_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --vpcn_fec_inic between ada_fec_inic and ada_fec_fina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by dpvi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' vpcn_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' vpcn_fec_inic as fec_modi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapicn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie and dpvi_cod_tcdv = tcdv_cod_tcdv
and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_dpvi = vpcn_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' picn_cod_picn = vpcn_cod_picn and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' picn_cod_picn = ai_cod_picn and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv = ai_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --vpcn_fec_inic between ada_fec_inic and ada_fec_fina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by dpvi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_bcepfi(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(10) as fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as totalctasnvo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as ctasnvo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as ctasinac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as ctasnvoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as ctasinacc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as ctasnvodpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as ctabasica')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as ctabasicai')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as ctasnvocred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as tarjetasdebito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as tarjetasdebitos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as tarjetasadicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define totalctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define indentificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define edad decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ctabasicai integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tarjetasadicio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_fecha = to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct ft_llena_espacios( ciud_sib_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_llena_espacios( prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''C'' then ''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''R'' then ''R''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''E'' end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_calculo_edad(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select case clna_cod_sexo when ''X'' then ''N'' else clna_cod_sexo
end from bcaclna where clna_cod_clie = x.clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into canton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv not in (1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_ciud= ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and prov_cod_prov= ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ctasnvo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if tipoidentificacion=''R'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let edad = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let genero =''0'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if edad = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let edad = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ctasnvo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_tcdv not in (1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd in (1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie =cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_inic between ada_fec_inic and ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ctasinac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_tcdv not in (1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie =cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_inic between ada_fec_inic and ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ctasnvodpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_clie =cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let totalctasnvo = ctasnvo + ctasnvoc + ctasnvodpf;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let totalctasinac = ctasinac + ctasinacc ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let totalctas = totalctasnvo + totalctasinac;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ctasnvocred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_fec_calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_clie =cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_num_cred = calf_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ecre not in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_eope<=2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- 1 2 3 4 5
6 7 8 9 10 11 12 13
14 15 16 17 ----18 19')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if totalctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_Fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctasnvocred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.reportes_uaf(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_tran char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_garantes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--let ad_val_parm = ft_cod_parametros (16);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_val_parm =10000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf3_transacciones where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf1_clientes where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf2_productos where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf4_bancos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---depositos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pape_cod_tran not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --and mcdv_cod_pape not in(select cred_cod_pape from bcacred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --and dpvi_cod_clie not in (2201)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---tranferencias debitos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_tran in (37)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie <>(select dpvi_cod_clie from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi not in (select stmp_cod_dpvi from bcastmp))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --and dpvi_cod_clie not in (2201)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---transferencias creditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_tran in (12)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie <>(select dpvi_cod_clie from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi not in (select stmp_cod_dpvi from bcastmp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi not in (select stmp_dpv_debi from bcastmp))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --and dpvi_cod_clie not in (2201)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---creditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(cred_cap_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_clie in (select clie from uaf0_socios1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having sum(cred_cap_cred)< ad_val_parm;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---plazos fijos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(nvl((select sum(dpfi_val_dpfi) from bcadpfi where
dpfi_cod_dpfi in')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select pgpf_cod_dpfi from bcapgpf where
pgpf_cod_pgpf in (select depg_cod_pgpf from bcadepg where depg_fec_pago between
ada_fec_inic and ada_fec_fina) and pgpf_cod_rubr = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_clie = x.dpfi_cod_clie and dpfi_cod_edpf in
(3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_clie in (select clie from uaf0_socios1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('having (sum(nvl((select sum(dpfi_val_dpfi) from bcadpfi where
dpfi_cod_dpfi in')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select pgpf_cod_dpfi from bcapgpf where
pgpf_cod_pgpf in (select depg_cod_pgpf from bcadepg where depg_fec_pago between
ada_fec_inic and ada_fec_fina) and pgpf_cod_rubr = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_clie = x.dpfi_cod_clie and dpfi_cod_edpf in
(3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('having sum(valor)>=ad_val_parm;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----creditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf0_socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(cred_cap_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_clie not in (select clie from uaf0_socios)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having sum(cred_cap_cred)>= ad_val_parm;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---plazos fijos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(nvl((select sum(dpfi_val_dpfi) from bcadpfi where
dpfi_cod_dpfi in')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select pgpf_cod_dpfi from bcapgpf where
pgpf_cod_pgpf in (select depg_cod_pgpf from bcadepg where depg_fec_pago between
ada_fec_inic and ada_fec_fina) and pgpf_cod_rubr = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_clie = x.dpfi_cod_clie and dpfi_cod_edpf in
(3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_clie not in (select clie from uaf0_socios)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having (sum(nvl((select sum(dpfi_val_dpfi) from bcadpfi where
dpfi_cod_dpfi in')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select pgpf_cod_dpfi from bcapgpf where
pgpf_cod_pgpf in (select depg_cod_pgpf from bcadepg where depg_fec_pago between
ada_fec_inic and ada_fec_fina) and pgpf_cod_rubr = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_clie = x.dpfi_cod_clie and dpfi_cod_edpf in
(3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from uaf0_socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- transacciones captaciones ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(mcdv_fec_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(mcdv_num_mcdv)= 0 or mcdv_num_mcdv is null then
mcdv_cod_mcdv || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran in (14')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(mcdv_num_mcdv) end as numerotransacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN PAPE_COD_TRAN IN (24')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( nvl((select max(cred_num_cred) from
bcacred where cred_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_cred in (select divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_cod_divc in (select
abdv_cod_divc from bcaabdv where (abdv_cod_pape = y.mcdv_cod_pape) or
(abdv_cod_pape = z.pape_pap_ante) or (abdv_cod_divc = z.pape_cod_divc))))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( dpvi_num_dpvi || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (37) then trunc(round(mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (10) and pape_cod_tran not in (43) then
trunc(round(mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 8 and (select count(*) from bcaddte where
ddte_cod_mcdv= y.mcdv_cod_mcdv and ddte_cod_tfpg = 1) >= 1 then trunc((select
round(SUM(DDTE_VAL_DDTE)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 43 then trunc(round(mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 9 then trunc(round(mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran =8 and (select count(*) from bcaddte where
ddte_cod_mcdv= y.mcdv_cod_mcdv and ddte_cod_tfpg in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when pape_cod_tran = 10 then trunc(round(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as cheque')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 8 then nvl((trunc((select
round(SUM(DDTE_VAL_DDTE)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((trunc((select round(SUM(DDTE_VAL_DDTE)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trunc(round(mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 8 then ''03''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =37 and mcdv_cod_tran = 37 then ''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =37 and mcdv_cod_tran = 12 then ''22''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =1then ''06''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =19 then ''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 5 then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 24 then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 59 then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 11 then ''36'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 54 then ''36'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 10 then ''37'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 73 then ''37'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 74 then ''36'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 53 then''21'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 43 then ''25'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 14 then ''22'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 75 then ''36''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and pape_cod_tran = 55 then ''22''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 9 then ''71''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 24 or pape_cod_tran = 47)
then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 32) then ''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 64) then ''22''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 64) then ''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 72) then ''36''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 75) then ''36''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 48 then ''23''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 3) then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 4) then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran in (24')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(( select ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case when cred_cod_tgar in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_tgar in (10) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select trim(clie_ape_clie) || ||
trim(nvl(clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcagara')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where w.cred_num_cred = gara_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = gara_cod_clie and gara_cod_gara =
(select min(gara_cod_gara) from bcagara where gara_num_cred = w.cred_num_cred))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''SOBRE FIRMAS'' end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred w where cred_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_cred in (select max(divc_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_cod_divc in (select abdv_cod_divc from
bcaabdv where abdv_cod_pape = y.mcdv_cod_pape)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case when length(trim(clie_nom_clie))=0 or clie_nom_clie is
null then trim(clie_ape_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ape_clie) || || trim(clie_nom_clie) end
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi =y.mcdv_cod_dpvi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''EC'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(coop_nom_coop) end as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select dpvi_num_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi = y.mcdv_cod_dpvi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as dpvi_num_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_sib_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case when pape_cod_tran in (24')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''N/A'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pape_cod_tran not in (13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- solo transferencias DEBITO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(mcdv_num_mcdv)= 0 or mcdv_num_mcdv is null then
mcdv_cod_mcdv || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(mcdv_num_mcdv) end as numerotransacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( clie_num_clie || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (37) then trunc(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (10) and pape_cod_tran not in (10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 8 and (select count(*) from bcaddte where
ddte_cod_mcdv= y.mcdv_cod_mcdv and ddte_cod_tfpg = 1) >= 1 then trunc((select
SUM(DDTE_VAL_DDTE) from bcaddte where ddte_cod_mcdv= y.mcdv_cod_mcdv and
ddte_cod_tfpg = 1))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 43 then trunc(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran =8 and (select count(*) from bcaddte where
ddte_cod_mcdv= y.mcdv_cod_mcdv and ddte_cod_tfpg in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 10 then trunc(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as cheque')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trunc(mcdv_val_mcdv) as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 8 then ''03''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =37 and mcdv_cod_tran = 37 then ''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =37 and mcdv_cod_tran = 12 then ''22''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =1 then ''06''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =19 then ''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 5 then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 24 then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 59 then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 11 then ''36'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 54 then''36'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 10 then ''25'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 53 then ''21'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 43 then ''25'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 14 then ''22'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and pape_cod_tran = 55 then ''22''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 24 or pape_cod_tran = 47)
then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 32) then ''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 64) then ''22''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 64) then ''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 48 then ''23''when mcdv_cod_tran = 11 and
(pape_cod_tran = 3) then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 4) then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case when length(trim(clie_nom_clie))=0 or clie_nom_clie is
null then trim(clie_ape_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ape_clie) || ||
trim(clie_nom_clie) end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi =y.mcdv_cod_dpvi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''EC'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(coop_nom_coop) end as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select dpvi_num_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi = y.mcdv_cod_dpvi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as dpvi_num_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_sib_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''N/A'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pape_cod_tran in (37)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie <>(select max(dpvi_cod_clie) from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- solo transferencias CREDITO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(mcdv_num_mcdv)= 0 or mcdv_num_mcdv is null then
mcdv_cod_mcdv || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(mcdv_num_mcdv) end as numerotransacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( dpvi_num_dpvi || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (37) then trunc(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (10) and pape_cod_tran not in (10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 8 and (select count(*) from bcaddte where
ddte_cod_mcdv= y.mcdv_cod_mcdv and ddte_cod_tfpg = 1) >= 1 then trunc((select
SUM(DDTE_VAL_DDTE) from bcaddte where ddte_cod_mcdv= y.mcdv_cod_mcdv and
ddte_cod_tfpg = 1))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 43 then trunc(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran =8 and (select count(*) from bcaddte where
ddte_cod_mcdv= y.mcdv_cod_mcdv and ddte_cod_tfpg in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 10 then trunc(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as cheque')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trunc(mcdv_val_mcdv) as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 8 then ''03''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =37 and mcdv_cod_tran = 37 then ''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =37 and mcdv_cod_tran = 12 then ''22''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =1 then ''06''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =19 then ''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 5 then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 24 then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 11 then ''36'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 54 then ''36'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 10 then ''21'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 53 then ''21'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 43 then ''25'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 14 then ''22'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and pape_cod_tran = 55 then ''22''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 24 or pape_cod_tran = 47)
then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 32) then ''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11and (pape_cod_tran = 64) then ''22''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 64) then ''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 48 then ''23''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 3) then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 4) then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case when length(trim(clie_nom_clie))=0 or clie_nom_clie is
null then trim(clie_ape_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ape_clie) || ||
trim(clie_nom_clie) end from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi =y.mcdv_cod_dpvi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''EC'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(coop_nom_coop) end as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select dpvi_num_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi = y.mcdv_cod_dpvi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as dpvi_num_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_sib_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''N/A'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pape_cod_tran in (37)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie <>(select max(dpvi_cod_clie) from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----solo retiros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --- when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --- when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --- else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- whenlength(mcdv_num_mcdv)= 0 or mcdv_num_mcdv is null then
mcdv_cod_mcdv || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- else trim(mcdv_num_mcdv) end as numerotransacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- ft_llena_espacios( clie_num_clie || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when mcdv_cod_tran in (9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- else 0 end as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when mcdv_cod_tran in (11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- else 0 end as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when mcdv_cod_tran = 8 and (select count(*) from bcaddte where
ddte_cod_mcdv= y.mcdv_cod_mcdv and ddte_cod_tfpg = 1) >= 1 then trunc((select
SUM(DDTE_VAL_DDTE) from ----bcaddte where ddte_cod_mcdv= y.mcdv_cod_mcdv and
ddte_cod_tfpg = 1))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- else 0 end as efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when mcdv_cod_tran =8 and (select count(*) from bcaddte where
ddte_cod_mcdv= y.mcdv_cod_mcdv and ddte_cod_tfpg in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- else 0 end as cheque')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- trunc(mcdv_val_mcdv) as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when pape_cod_tran = 8 then ''03''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when pape_cod_tran = 9 then ''25''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when pape_cod_tran =37 and mcdv_cod_tran = 37 then ''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when pape_cod_tran =37 and mcdv_cod_tran = 12 then ''22''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- whenpape_cod_tran =1 then ''06''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when pape_cod_tran =19 then ''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when pape_cod_tran =3 then ''06''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when pape_cod_tran = 5 then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when pape_cod_tran = 24 then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when pape_cod_tran = 11 then ''22'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when pape_cod_tran = 54 then ''21''--- when pape_cod_tran = 10
then ''21'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when pape_cod_tran = 53 then ''21'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when mcdv_cod_tran = 11 and pape_cod_tran = 55 then ''22''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when mcdv_cod_tran = 10 and (pape_cod_tran = 24 or pape_cod_tran
= 47) then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when mcdv_cod_tran = 11and (pape_cod_tran = 32) then ''22''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when mcdv_cod_tran = 11 and (pape_cod_tran = 64) then ''22''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when mcdv_cod_tran = 10 and (pape_cod_tran = 64) then ''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when pape_cod_tran = 48 then ''23''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when mcdv_cod_tran = 11 and (pape_cod_tran = 3) then''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- end as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- pais_sib_pais as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- ''N/A'' as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- ''N/A''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- ofic_sib_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- ''N/A'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- and mcdv_cod_tran in (9)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- and mcdv_cod_mcdv in (select ddte_cod_mcdv from bcaddte where
ddte_cod_tfpg = 5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----2--- CREDITOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(cred_cap_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having sum(cred_cap_cred)>= ad_val_parm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--------descuentos roles')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pago_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pdte_val_pdte as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as cheque')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pdte_val_pdte as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''13'' as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''EC'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''N/A'' as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''N/A''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_sib_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''N/A'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pago_cod_pago = abdv_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pago_cod_pago = pdte_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pago_ctr_pago = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_divc = divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pdte_cod_pago= abdv_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pdte_cod_tfpg not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pdte_fec_pago between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----nuevos creditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select nvl(trunc(round(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select nvl(round(sum(cocr_val_cocr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacocr where cocr_num_cred = y.cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_num_orec is null then 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else nvl((select nvl(trunc(round(orec_val_orec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select nvl(trunc(sum(round(mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select nvl(trunc(round(orec_val_orec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select nvl(round(sum(cocr_val_cocr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacocr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cocr_num_cred = y.cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''11'' as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_tgar in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_tgar in (10) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select trim(clie_ape_clie) || ||trim(nvl(clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcagara')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where y.cred_num_cred = gara_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = gara_cod_clie and gara_cod_gara =
(select min(gara_cod_gara) from bcagara where gara_num_cred = y.cred_num_cred ))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''SOBRE FIRMAS'' end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''EC'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''N/A'' as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''N/A''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_sib_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''N/A'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop =coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(cred_fec_inic) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_nombres =;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_cred = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---///renovaciones de creditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred || - || (select nvl(max(abdv_cod_pago)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc = abdv_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_reli = y.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv = y.cred_fec_inic)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select nvl(trunc(sum(abdv_val_abdv))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc = abdv_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_reli = y.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv = y.cred_fec_inic) as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as cheque')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select nvl(trunc(sum(abdv_val_abdv))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc = abdv_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_reli = y.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv = y.cred_fec_inic) as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''13'' as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_tgar in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_tgar in (10) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select trim(clie_ape_clie) || ||trim(nvl(clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcagara')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where y.cred_num_cred = gara_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = gara_cod_clie and gara_cod_gara =
(select min(gara_cod_gara) from bcagara where gara_num_cred = y.cred_num_cred ))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''SOBRE FIRMAS'' end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''EC'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''N/A'' as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''N/A''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''N/A''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and (select nvl(trunc(sum(abdv_val_abdv))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc = abdv_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_reli = y.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv = y.cred_fec_inic) <>0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(cred_fec_inic) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_nombres =;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_cred = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----3---PLAZOS FIJOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from uaf0_socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_clie = clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi = dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_num_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select trunc(sum(depg_val_depg)) from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select trunc(sum(depg_val_depg)) from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select trunc(sum(depg_val_depg)) from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trunc(dpfi_val_dpfi) as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''06'' as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(trim(clie_nom_clie))=0 or clie_nom_clie is null then
trim(clie_ape_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ape_clie) || || trim(clie_nom_clie) end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''EC'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(coop_nom_coop) as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_num_dpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''N/A'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpfi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(dpfi_fec_inic) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- renovaciones polizas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select trim(to_char(max(depg_fec_pago)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_fec_pago between ada_fec_inic and ada_fec_fina) as
fectrasans')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_num_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select trunc(sum(depg_val_depg)) from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_fec_pago between ada_fec_inic and ada_fec_fina and
depg_cod_tran not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select trunc(sum(depg_val_depg)) from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_fec_pago between ada_fec_inic and ada_fec_fina and
depg_cod_tran not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trunc(dpfi_val_dpfi) as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''12'' as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(trim(clie_nom_clie))=0 or clie_nom_clie is null then
trim(clie_ape_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ape_clie) || || trim(clie_nom_clie) end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''EC'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(coop_nom_coop) as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_num_dpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''N/A'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpfi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf in (7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_fec_pago between ada_fec_inic and ada_fec_fina and
depg_cod_tran not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----ACREDITACIONES DE INTERES PLAZO FIJO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_num_dpfi || - || depg_cod_depg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when depg_cod_tfpg in (6) then trunc(depg_val_depg) else 0 end as
credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when depg_cod_tfpg in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when depg_cod_tfpg in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trunc(depg_val_depg) as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''12'' as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(trim(clie_nom_clie))=0 or clie_nom_clie is null then
trim(clie_ape_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ape_clie) || || trim(clie_nom_clie) end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''EC'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(coop_nom_coop) as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_num_dpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''N/A'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpfi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_cod_tran in (5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_cod_pgpf = pgpf_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_dpfi = dpfi_cod_dpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(depg_fec_pago) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----productos a partir de las transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf2_productos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct case x.clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(x.clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else x.clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else x.clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else x.clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case x.clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(x.clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(x.clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else x.clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else x.clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' UAF_NUM_CTAS as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_sib_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(clie_fec_ingr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and x.clie_ide_clie = u.clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and uaf_val_tota >0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf4_bancos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --when uaf_cod_tran in (''14''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --else ''N/A'' end as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' uaf_nom_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' uaf_num_cuet')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' uaf_sib_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' uaf_sib_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' uaf_sib_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' uaf_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' uaf_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' uaf_val_tota ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from uaf3_transacciones ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where uaf_val_tota >0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf1_clientes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct u.clie_cod_tide as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' u.clie_ide_clie as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pais_nac_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(trim(clie_dir_domi))<8 then TRIM(clie_dir_domi) || N NO
ESPECIFICADA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_dir_domi) end as dir')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( ciud_cod_prov || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case (select max(ocup_sib_ocup) from bcaocup where ocup_cod_ocup =
y.acli_cod_ocup) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when null then ''M749011''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE (select ft_quita_ceros(max(ocup_sib_ocup)) from bcaocup where
ocup_cod_ocup = y.acli_cod_ocup) END as actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case (select sum(ding_val_deta) from bcading where ding_cod_clie =
x.clie_Cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ding_cod_ineg =1 ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when null then trunc(0)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else (select trunc(ding_val_deta) from bcading where ding_cod_clie =
x.clie_Cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ding_cod_ineg =1 ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and acli_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and acli_cod_tact = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and x.clie_ide_clie = u.clie_ide_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_activos_cod_generacion(ai_cod_ddep integer
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(20) as clave')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_num_dtac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_abr_depa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_clave char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select depa_abr_depa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_abr_depa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadepa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ddep_cod_depa = depa_cod_depa and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ddep_cod_ddep = ai_cod_ddep ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ls_abr_depa is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_abr_depa =''DESCO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ls_abr_ddep is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_abr_ddep = ''DESCO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --// Seleccionar solo dos caracteres de cada abreviatura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_abr_depa = substr(trim(ls_abr_depa)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_abr_ddep = substr(trim(ls_abr_ddep)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --// Leer tipo de activo y grupo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_dtac = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dtac_num_dtac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_num_dtac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadtac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dtac_cod_dtac = ai_cod_dtac and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dtac_cod_tafi = ai_cod_tafi ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_num_dtac is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_dtac = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_cod_acti = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(acti_cod_acti)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaacti ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_cod_acti is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_acti = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_acti = ll_cod_acti ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_acti = ai_cod_acti;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_clave = trim(ls_abr_depa) || ''-'' || trim(ls_abr_ddep) || ''-''
|| ai_cod_tafi || ''-'' || ll_num_dtac || ''-'' || ll_cod_acti ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_clave;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsi01(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(25) as numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as clasificacionEmisorDepositario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numeroIdentificacionDeposito char(25) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoIdentificacionEmisorDepositario char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacionEmisorDepositario char(15) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoInstrumento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define periodicidadPagoCupon char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define clasificacionEmisorDepositario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cban_num_cban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(cban_fec_aper')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case cban_cod_tcba')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''A'' then ''T37''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''C'' then ''T36''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''T01'' end as tipoInstrumento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''ECU'' AS paisEmisionDepositario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-9999.99 AS valorNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''DE'' as clasificacionEmisorDepositario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clasificacionEmisorDepositario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacban ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = banc_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cban_cod_banc = banc_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cban_cod_ecba <> 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cban_fec_aper between ada_fec_inic and ada_fec_fina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clasificacionEmisorDepositario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cban_num_cban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(cban_fec_aper')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case cban_cod_tcba')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''A'' then ''T37''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''C'' then ''T36''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''T01'' end as tipoInstrumento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''ECU'' AS paisEmisionDepositario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 AS valorNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''DE'' as clasificacionEmisorDepositario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clasificacionEmisorDepositario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacban ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = banc_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cban_cod_banc = banc_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cban_cod_ecba = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cban_fec_cier between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clasificacionEmisorDepositario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select inve_doc_inve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(inve_fec_crea')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''T12'' as tipoInstrumento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''ECU'' AS paisEmisionDepositario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INVE_VAL_INVE AS valorNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''EM'' as clasificacionEmisorDepositario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clasificacionEmisorDepositario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = banc_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_cod_banc = banc_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_cod_edpf <> 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and inve_fec_crea between ada_fec_inic and ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return numeroIdentificacionDeposito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clasificacionEmisorDepositario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_divid_venc()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numcuota')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as situacioncredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE LS_TELE_CLIE CHAR(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lf_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lf_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_depen char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_garantes char(200);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_depen ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_calif char(3); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_orgura_nueva integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET LS_GARANTES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--parametro de interes mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_par_mora = ft_cod_parametros(1768);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia_base = ft_cod_parametros(9);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_orgura =ft_cod_parametros(1728);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia_base = li_dia_base * 100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select CLIE_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ecre_des_ecre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_ofct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into LI_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ls_des_ecre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ll_cod_ofct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie=cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_sect=sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ecre_cod_ecre=cred_cod_Ecre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dtcr_cod_dtcr=cred_cod_dtcr and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_usua = usua_cod_usua and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred in (select divc_num_cred from bcadivc where
divc_fec_venc<today and divc_cod_ediv not in (5))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_depen = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_depen = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select depe_cod_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_depen')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadepe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clna_cod_clna = decl_cod_clna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depe_cod_depe = decl_cod_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clna_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('li_cod_depen is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_depen= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_num_cred=li_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv not in (5) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_fec_venc<today ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by divc_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(divc_cap_divc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_num_cred=li_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_dirb=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dirb_val_dirb)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_dirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc in (select divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_ediv not in (5) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_fec_venc<today and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred =li_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dirb_cod_rubc not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_dirb is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_dirb=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora_total=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_sald = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_mora_paga= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lf_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred=li_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_venc<today')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dirb_fec_dirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lf_fecha_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb where dirb_cod_divc = li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dirb_cod_rubc = 4;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lf_fecha_mora is null or lf_fecha_mora =''01/01/1900'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lf_fecha_mora = lf_Fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_orgura_nueva = li_orgura;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_orgura_nueva = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_mora_paga is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_mora_paga = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dias_mora = today - lf_fecha_mora;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- INTERES MORA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (li_dias_mora > li_orgura_nueva ) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_int_mora< 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_int_mora_total = ld_int_mora_total + ld_int_mora +
ld_mora_paga ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_int_mora_total < 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora_total = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_sald = ld_cap_sald + ld_cap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_mora_paga = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF LD_CAP_DIVC>0 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' lf_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(date(today)-date(lf_fec_min))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ll_cod_ofct ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_saldos_creditos(ai_cod_clie INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING INTEGER as cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ld_saldo_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_cod_tcse VARCHAR(5);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_cod_intv CHAR(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_por_segd DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_des_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_ecre char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_orgura integer; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_des_rubr = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECUPERO PARAMETRO DE CARTERA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia_base = ft_cod_parametros(9);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECUPERO PARAMETRO DE CARTERA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia_orgu= ft_cod_parametros(1728);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia_base = li_dia_base * 100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---delete afcscre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- busco todos los creditos activos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE cred_cod_clie = ai_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre = ccre_cod_ccre and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_lcre = lcre_cod_lcred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre = ecre_cod_ecre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- RECUPERO TODOS LOS DIVIDENDOS DE LOS ANTERIORES CREDITOS
RECUPERADOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_int_mora_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dias = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dias_mora = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_cont = 0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_conta2 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total_otros = 0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_segd_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dias_segd = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_interes = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_interes_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_ban = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_cap_aux = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_tdiasm = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- CALCULO DE NUMERO DE DIVIDENDOS PAGADOS ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO li_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE divc_num_cred = li_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv = 5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_cuotas= li_cont;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- CALCULO DEL SALDO ACTUAL DE CREDITO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(divc_cap_divc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_saldo_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = li_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv not in (4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- CALCULO DEL CAPITAL PAGADO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(divc_cap_pago)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_cap_pag')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = li_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- CALCULO DE NUMERO DE DIVIDENDOS VIGENTES ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO li_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE divc_num_cred = li_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv NOT IN (5);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_vige = li_cont;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_cuotas = li_num_vige + li_num_cuotas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select intv_num_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_dia_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM BCAINTV')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where intv_cod_intv = ls_cod_intv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE divc_num_cred = li_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv not in (4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by divc_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- REALIZO CALCULOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- SALDO ACTUAL DE CREDITO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_saldo = ld_saldo + ld_cap_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_num_vige > 0 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT max(divc_fec_venc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO lda_fec_venc_aux')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE divc_num_cred = li_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv = 5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET lda_fec_venc_aux = lda_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- INTERES NORMAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF lda_fec_venc <= ad_fecha THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_interes = ld_int_plaz + ld_int_deve;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_interes_total = ld_interes_total + ld_interes ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET lda_fec_int_ant = lda_fec_venc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_cap_aux = ld_cap_aux + ld_cap_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_num_divc = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET lda_fec_int_ant = lda_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_int_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = li_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_divc = li_num_divc - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dias = ad_fecha - lda_fec_int_ant;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_dias> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_saldo_actu = ld_saldo_actu - ld_cap_aux;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_interes = (ld_saldo_actu * ld_tasa * li_dias)
/( li_dia_base * 100) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_interes_total = ld_interes_total + ld_interes -
ld_int_paga;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_interes_total <0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_interes_total = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET lda_fec_int_ant = lda_fec_venc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- CALCULO DE INTERES MORA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_int_mora = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dirb_paga = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el inter�s de mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dirb_val_dirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_dirb_paga')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dirb_cod_rubc =4;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_Fec_abon is null or lda_fec_abon =date(''01/01/1900'')
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_Fec_abon = lda_fec_venc ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_orgura = li_dia_orgu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_orgura = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_dirb_paga is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dirb_paga = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dias_mora = ad_fecha - lda_fec_abon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- INTERES MORA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_dias_mora>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_int_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_int_mora <0 or ld_int_mora is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_int_mora is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_int_mora_total = ld_int_mora_total + ld_int_mora +
ld_dirb_paga;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---RETURN li_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (li_dias_mora-li_dia_orgu) >0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb where dirb_cod_divc = li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dirb_cod_rubc= 4;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_mora > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb set dirb_val_dirb = ld_int_mora+
ld_dirb_paga')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- CALCULO DE OTROS RUBROS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_conta2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dirb_paga = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_conta2 > 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dirb_val_dirb)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_otros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_otros = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dirb_paga = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_otros > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total_otros = ld_total_otros + ld_otros ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --RETURN li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- calculo saldo actua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- CALCULO DE SEGURO DE DESGRAVAMEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ld_por_segd <> 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dirb_val_dirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_segd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc = 8;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_segd_paga is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_segd_paga = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_venc <= ad_fecha then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- ACUMULO EL SEGURO DE DESGRAVAMEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_segd_total = ld_segd_total + ld_segd ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- GUARDO FECHA DE VENCIMEINTO ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET lda_fec_ant = lda_fec_venc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_num_divc = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET lda_fec_ant = lda_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = li_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_divc = li_num_divc - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_ant <= ad_fecha then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dias_segd = ad_fecha - lda_fec_ant ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_segd =sp_calculo_segdesgra(li_dias_segd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- ACUMULO EL SEGURO DE DESGRAVAMEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_segd_total = ld_segd_total + ld_segd -
ld_segd_paga;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET lda_fec_ant = lda_fec_venc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- RECUPERO NOMBRE DEL SEGURO DE DESGRAVAMEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT rubr_des_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ls_des_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcarubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE rubr_cod_rubr = 8;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_segd_total is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_segd_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- CALCULO DEL TOTAL DE DIAS VENCIDOS O EN MORA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT min(divc_fec_venc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO lda_fecha_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE divc_num_cred = li_num_cred AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv not in (4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF lda_fecha_mora < ad_fecha THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_tdiasm = ad_fecha - lda_fecha_mora;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---insert into afcscre values(li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN li_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_consulta_garantes(ai_num_cred integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_producto char(20) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_num_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_sal_disp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_estado char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ide_clie char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cod_Clie integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_for integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT bcagara.gara_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie.clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie.clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie.clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie.clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcagara')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcaclie.clie_cod_clie = bcagara.gara_cod_clie ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( bcagara.gara_num_cred = ai_num_cred ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_for = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bcatcdv.tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi.dpvi_num_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi.dpvi_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi.dpvi_sal_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaeacd.eacd_des_eacd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_producto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaeacd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcatcdv.tcdv_cod_tcdv = bcadpvi.dpvi_cod_tcdv ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcaeacd.eacd_cod_eacd = bcadpvi.dpvi_cod_eacd ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcadpvi.dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie = ll_cod_Clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_for = ll_for +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cambiofechas_dividendos(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as dividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_for = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = ai_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_cred= divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_actu = ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_for_pago = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_actu = ada_fec_inic+li_num_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_actu = ft_calculo_fecha(lda_fec_actu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha1= ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha2= lda_fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha1 = lda_fec_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha2 = lda_fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc set divc_fec_venc = lda_fec_actu where divc_cod_divc =
li_cod_divc and divc_num_divc= li_num_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_ante = lda_fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_for = ll_for +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_cuenta_obligacion(as_cod_ccon char(15) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--execute function informix.ft_cuenta_cartera(2 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Select trim(paca_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('From bcapaca ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Where paca_cod_ccre = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('paca_ran_inic <= ll_ran_dias and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(paca_ran_fina >= ll_ran_dias or paca_ran_fina is null);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return trim(as_cod_ccon) || ls_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_amortizacion_obligaciones( as_cod_intv
char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_int_cap ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_int_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_cap_cred = ad_cap_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_cap_tota =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--/* selecci??el intervalo de dias para pagar*/')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select intv_num_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_int_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaintv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where intv_cod_intv = as_cod_intv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--/*Se determina el valor de cada cuota')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_cap_cuot = (ad_cap_cred/al_num_cuot);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--/*Se establece la primera fecha de asignacion del credito*/')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fec_pago= ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_cap_cuot= round(ld_cap_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_bas_dias = ft_cod_parametros(9);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_tamo = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --/*cuotas variables*/')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --/*Se llena la tabla de amortizaci??')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' for ll_for = 1 to al_num_cuot ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = ada_fec_ppag;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_for_pago = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = lda_fec_pago + li_int_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = ft_calculo_fecha(lda_fec_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- //Calcula los dias exactos entre los pagos para generar el
interes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha1= ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha2= lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha1 = lda_fec_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha2 = lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_dias = ld_fecha1 - ld_fecha2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_dias = li_int_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_calc=( ld_cap_cred * ad_tas_cred *
ll_num_dias)/(li_bas_dias * 100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = ada_fec_inic - lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = abs(ll_ran_dias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = ft_cuenta_obligacion(as_tip_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cred = ld_cap_cred - round(ld_cap_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_tota = ld_cap_tota + ld_cap_cuot;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_ante = lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = al_num_cuot then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_tota = ad_cap_cred - ld_cap_tota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cuot = ld_cap_cuot + ld_cap_tota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ll_for')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end for;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_tamo = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_fijo = ad_tas_cred/12/100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_fijo = (ld_int_fijo * li_int_dias )/30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --let li_n = al_num_cuot - (ll_for -1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_cap = ft_calcula_base_exponente((1+ld_int_fijo)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_cap = (ld_int_fijo * ld_int_cap) / (ld_int_cap -1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_cap = round((ld_cap_cred * ld_int_cap)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---/*Se llena la tabla de amortizaci??')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' for ll_for= 1 to al_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = ada_fec_ppag;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_for_pago = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = lda_fec_pago + li_int_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = ft_calculo_fecha(ada_fec_ppag ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha1 = ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha2 = lda_fec_pago; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha1 = lda_fec_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha2 = lda_fec_pago; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_dias = ld_fecha1 - ld_fecha2;
let ll_num_dias = abs(ll_num_dias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_calc = ld_cap_cred * ad_tas_cred * ll_num_dias /
(li_bas_dias * 100 );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = ada_fec_inic - lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = li_int_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = ft_cuenta_obligacion(as_tip_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cuot = ld_int_cap - ld_int_calc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cred = ld_cap_cred - ld_cap_cuot;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_tota = ld_cap_tota + ld_cap_cuot ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = al_num_cuot then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_tota = ad_cap_cred - ld_cap_tota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cuot = ld_cap_cuot + ld_cap_tota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ll_for')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_ante = lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end for;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_bceinsumos_clientes(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(13) as identificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codresidencia char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nacionalidad char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipocliente char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigo char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define acteco char(7) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codzonageo char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ingresosdeclarados decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(ft_llena_espacios(ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_nac_pais as nacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 0 then ''N''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''J'' end as tipocliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_ofic || clie_cod_tcli || clie_num_clie as codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ft_quita_ceros(ocup_sib_ocup) from bcaocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and acli_cod_Clie = x.clie_cod_clie and acli_cod_tact = 1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select trim(ft_llena_espacios(ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(drie_val_drie) from afcdrie where drie_cod_ineg = 1 and
drie_cod_clie = x.clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into identificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_clie in (select dpvi_cod_clie from bcadpvi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and date(clie_Fec_ingr) between ada_Fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_pais = pais_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_bceinsumos_transacciones(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15) as cuenta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre char(150) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ingresodinerofresco decimal( 15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpvi_num_dpvi as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_val_mcdv as ingresodinerofresco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(mcdv_Fec_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_Clie = dpvi_cod_Clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_fec_mcdv between ada_Fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return cuenta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_saldo_cuenta(ai_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_peri int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_tcue char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if not exists(select ccon_cod_ctas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = ai_cod_ctas) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_saldo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_cod_tcue = (select ccon_cod_tcue from bcaccon where ccon_cod_ctas
= ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_peri = (select peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where peri_cod_ejer = ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_cod_ejer = ai_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = Month(ada_fecha));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = (select sum(sact_sal_debi) - sum(sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ctas = ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri < Month(ada_fecha)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ofic = ai_cod_ofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lc_cod_tcue = ''M'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_debe = (select sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_tasi = ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_peri = li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_fec_comp < ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_ofic = ai_cod_ofic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas = ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_habe = (select sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_tasi = ''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_peri = li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_fec_comp < ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_ofic = ai_cod_ofic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas = ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_debe = (select sum(dcom_sal_debi) - sum(dcom_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from tmpdcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dcom_fec_dcom < ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and month(dcom_fec_dcom) = month(ada_fecha)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas = ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_habe = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = (select sum(sact_sal_debi) - sum(sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ctas = ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri < Month(ada_fecha));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lc_cod_tcue = ''M'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_debe = (select sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_tasi = ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_peri = li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_fec_comp < ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas = ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_habe = (select sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_tasi = ''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_peri = li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_fec_comp < ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas = ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_debe = (select sum(dcom_sal_debi) - sum(dcom_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from tmpdcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dcom_fec_dcom < ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and month(dcom_fec_dcom) = month(ada_fecha)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas = ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_habe = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldo is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_debe is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_debe = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_habe is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_habe = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = ld_saldo + ld_debe - ld_habe;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_saldo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_saldo_saldocapital(al_cod_pago integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ai_cod_divc integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(abdv_cod_divc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ai_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where abdv_cod_pago = al_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_cod_pago in (select pago_cod_pago from bcapago where
pago_ctr_pago = 1) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(abdv_val_abdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaabdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where abdv_cod_divc > ai_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_divc in (select divc_cod_divc from bcadivc where
divc_num_cred in (select divc_num_cred from bcadivc where divc_cod_divc =
ai_cod_divc))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_cod_rubr = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and abdv_cod_pago in (select pago_cod_pago from bcapago where
pago_ctr_pago = 1) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_valor ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_numero_telefonos(al_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(10) as numeros;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_num_tele char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_telefonos char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_telefonos= ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tele_num_tele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_num_tele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tele_cod_clie = al_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tele_cod_ttel = ai_cod_ttel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_num_tele;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_divid_venc_movil(as_ide_clie char(13))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numcuota')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE LS_TELE_CLIE CHAR(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lf_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_depen char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_garantes char(200);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_depen integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_coop char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET LS_GARANTES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--parametro de interes mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_par_mora = ft_cod_parametros(1768);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia_base = ft_cod_parametros(9);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_orgura =ft_cod_parametros(1728);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia_base = li_dia_base * 100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select CLIE_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(coop_nom_coop) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_ofct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into LI_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ls_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ll_cod_ofct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie=cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_cod_coop = ofic_cod_coop and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ofic_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' lcre_cod_lcred=cred_cod_lcre and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_usua = usua_cod_usua and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred in (select divc_num_cred from bcadivc where
divc_fec_venc<today and divc_cod_ediv not in (5)) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie = as_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_depen = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_depen = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select depe_cod_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_depen')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadepe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clna_cod_clna = decl_cod_clna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depe_cod_depe = decl_cod_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clna_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_depen is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_depen= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_num_cred=li_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv not in (5) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_fec_venc<today ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by divc_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(divc_cap_divc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_num_cred=li_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by divc_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_dirb=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dirb_val_dirb)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_dirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc in (select divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_ediv not in (5) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_fec_venc<today and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred =li_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dirb_cod_rubc not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_dirb is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_dirb=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora_total=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_sald = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_mora_paga= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lf_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred=li_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_venc<today')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lf_fecha_mora = lf_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(abdv_val_abdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_mora_paga ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where abdv_cod_rubr = 4 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_pago in (select pago_cod_pago from bcapago where
pago_ctr_pago =1) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_mora_paga is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_mora_paga = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dias_mora = today - lf_fecha_mora;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- INTERES MORA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (li_dias_mora > li_orgura) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora = ld_int_mora - ld_mora_paga ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_int_mora< 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_int_mora_total = ld_int_mora_total + ld_int_mora ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_int_mora_total < 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora_total = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_sald = ld_cap_sald + ld_cap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_mora_paga = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF LD_CAP_DIVC>0 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' lf_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ll_cod_ofct ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_inicio_caja(as_cod_caja char(3) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as coddeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_crea_bcadeef (as_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select camb_cod_camb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_camb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacamb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_egresos = 0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_ingresos = 0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(defe_num_defe) as ingreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadefe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where defe_cod_deef = deef_cod_deef ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(deef_fec_deef) = ada_fec_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_caja = as_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_tasi = ''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and defe_cod_camb = li_cod_camb;select sum(defe_num_defe)
as ingreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_egresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadefe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where defe_cod_deef = deef_cod_deef ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(deef_fec_deef) = ada_fec_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_caja = as_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and deef_cod_tasi = ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and defe_cod_camb = li_cod_camb;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_ingresos is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_ingresos = 0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_egresos is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_egresos = 0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF (ld_ingresos - ld_egresos) >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadefe values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcacaja set caja_val_efec = ld_ingresos - ld_egresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where caja_cod_caja = as_cod_caja;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN LI_COD_DEEF WITH RESUME;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_crea_papeleta(ada_fec_pape datetime year to
second ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as papeleta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tdoc char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tran_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran =ai_cod_tran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(pape_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcapape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_pape = li_cod_pape +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Insert into bcapape values(li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcatran set tran_num_secu = ai_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran = ai_cod_tran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_cod_pape with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_crea_bcadeef(as_cod_caja char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as coddeef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_deef integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(deef_cod_deef )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadeef;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_deef = li_cod_deef +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcadeef values(li_cod_deef')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_cod_deef with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_crea_bcadefe(ai_cod_deef integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as coddefe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_defe integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_deef >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadefe values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(defe_cod_defe)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_defe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadefe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where defe_cod_deef= ai_cod_deef;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_cod_defe with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.f_verifica_cuentas(ai_cod_opci integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cuenta integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 7 si es pagar 8 si es cobrar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_opci = 7 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT cpof_cta_cobr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ll_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afccpof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE cpof_ofi_dest= al_ofi_dest and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cpof_ofi_orig= al_ofi_orig;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_opci = 8 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT cpof_cta_pagr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ll_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afccpof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE cpof_ofi_orig= al_ofi_orig and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cpof_ofi_dest= al_ofi_dest;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ll_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE FUNCTION informix.ft_cod_parametros(al_cod_para integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING char(100) as parametros;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ll_cod_ctas INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_val_vprm char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_val_vprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavprm ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where vprm_cod_prms = al_cod_para;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_val_vprm;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FUNCTION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_cartera_gestion_clase(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_disp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case dcal_cod_ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then''Cartera por Vencer'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''Cartera Vencida'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''Cartera Que No Devenga Inter�s'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''Castigada'' end as tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccre_des_ccre) as clase')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('17 as tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(clie_cod_clie) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ccre = ccre_cod_ccre and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_fec_calf = ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv <>6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_captacion_producto_genero(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_disp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(clna_cod_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ada_fec_inic and
ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ada_fec_inic and
ada_fec_fina) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(dchv_valor) from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_mcdv =dchv_cod_mcdv and dchv_cod_modu= 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_dpvi = x.dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dchv_fec_esac> ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ft_inicio_fecha_mes(ada_fec_fina) and
ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ada_fec_inic and
ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ada_fec_inic and
ada_fec_fina) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(dpvi_cod_clie) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tcdv_cod_tcdv = dpvi_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = clna_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(clna_cod_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ada_fec_inic and
ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ada_fec_inic and
ada_fec_fina) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(dchv_valor) from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_mcdv =dchv_cod_mcdv and dchv_cod_modu= 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_dpvi = x.dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dchv_fec_esac> ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ft_inicio_fecha_mes(ada_fec_fina) and
ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ada_fec_inic and
ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ada_fec_inic and
ada_fec_fina) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(dpvi_cod_clie) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tcdv_cod_tcdv = dpvi_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = clna_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''Plazo Fijo de ''||plaz_ini_plaz||'' - '' ||plaz_fin_plaz as
tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(clna_cod_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plaz_fin_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(dpfi_val_dpfi) as disponible')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(dpfi_cod_clie) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaplaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where plaz_cod_mone = mone_cod_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_mone = mone_cod_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = clna_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_cod_dpfi = hdpf_cod_dpfi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_dpfi between plaz_ini_plaz and plaz_fin_plaz and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' plaz_cod_modu = 14 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(hdpf_fec_hdpf) = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''Plazo Fijo de ''||plaz_ini_plaz||'' - '' ||plaz_fin_plaz as
tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(clna_cod_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plaz_fin_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(dpfi_val_dpfi) as disponible')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(dpfi_cod_clie) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaplaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where plaz_cod_mone = mone_cod_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_mone = mone_cod_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = clna_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_cod_dpfi = hdpf_cod_dpfi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_dpfi between plaz_ini_plaz and plaz_fin_plaz and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' plaz_cod_modu = 14 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(hdpf_fec_hdpf) = ada_fec_fina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sig_cartera_concedidos_usuario ( ada_fecha
DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURNING VARCHAR (50) as oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_actividad VARCHAR(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_monto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_amonto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_anumero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECUPERO CARTERA CONCEDIDA POR oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ft_nombre_oficial(cred_cod_usua ) as cred_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie =cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre not in (4) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic between ada_fecha and ada_fechaf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ft_nombre_oficial(cred_cod_clie) as cred_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie =cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre not in (4) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- INICIALIZO VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_amonto = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_anumero = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sigc_val_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sig_cartera_concedidos_plazo ( ada_fecha
DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURNING VARCHAR (50) as oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_actividad VARCHAR(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_monto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_amonto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_anumero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECUPERO CARTERA CONCEDIDA POR oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Select sum(cred_cap_cred) as monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(cred_num_cred) as cantidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(cred_fec_venc - cred_fec_inic) as detalle')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as numero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = cred_cod_clie AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO TEMP cartera_actividad;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Select sum(cred_cap_cred) as monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(cred_num_cred) as cantidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(cred_fec_venc - cred_fec_inic) as detalle')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as numero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = cred_cod_clie AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO TEMP cartera_actividad;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- INICIALIZO VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_amonto = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_numero = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(monto) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM cartera_actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where detalle <= 90;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc values (ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(monto) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM cartera_actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where detalle >90 and detalle<=180;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc values (ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(monto) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM cartera_actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where detalle >180 and detalle<=365;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc values (ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(monto) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM cartera_actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where detalle >365 and detalle<=1095;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc values (ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(monto) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM cartera_actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where detalle >1095 and detalle<=1825;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc values (ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(monto) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM cartera_actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where detalle >1825 and detalle<=3650;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc values (ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(monto) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM cartera_actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where detalle >3650;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc values (ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DROP TABLE cartera_actividad;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sig_cartera_concedidos_actividad ( ada_fecha
DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURNING VARCHAR (50) as oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_actividad VARCHAR(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_monto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_amonto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_anumero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECUPERO CARTERA CONCEDIDA POR tipo de destino economico')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ft_nombre_actividad_nivel4_cred(cred_cod_ocup) as
cred_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(cred_num_cred) as conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie =cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre not in (4) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic between ada_fecha and ada_fechaf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ft_nombre_actividad_nivel4_cred(cred_cod_ocup) as
cred_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(cred_num_cred) as conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie =cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre not in (4) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- INICIALIZO VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_amonto = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_anumero = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sigc_val_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sig_cartera_concedidos_garantia ( ada_fecha
DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURNING VARCHAR (50) as oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_actividad VARCHAR(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_monto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_amonto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_anumero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECUPERO CARTERA CONCEDIDA POR oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct tgar_des_tgar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcatgar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE cred_cod_tgar = tgar_cod_tgar and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY tgar_cod_tgar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct tgar_des_tgar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcatgar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE cred_cod_tgar = tgar_cod_tgar and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4) AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY tgar_cod_tgar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- INICIALIZO VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_amonto = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_anumero = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sigc_val_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM AFCSIGC')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sig_cartera_concedidos_linea ( ada_fecha
DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURNING VARCHAR (50) as oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_actividad VARCHAR(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_monto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_amonto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_anumero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECUPERO CARTERA CONCEDIDA POR oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct trim(lcre_desc_lcred) as ccre_des_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcalcre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE cred_cod_lcre = lcre_cod_lcred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct trim(lcre_desc_lcred) as ccre_des_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcalcre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE cred_cod_lcre = lcre_cod_lcred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- INICIALIZO VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_amonto = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_anumero = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sigc_val_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sig_cartera_concedidos_oficial ( ada_fecha
DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURNING VARCHAR (50) as oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_actividad VARCHAR(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_monto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_amonto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_anumero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECUPERO CARTERA CONCEDIDA POR oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ft_nombre_oficial(clie_cod_ofct) as cred_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(distinct cred_cod_clie) as conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie =cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre not in (4) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic between ada_fecha and ada_fechaf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ft_nombre_oficial(clie_cod_ofct) as cred_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(distinct cred_cod_clie) as conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie =cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre not in (4) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- INICIALIZO VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_amonto = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_anumero = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sigc_val_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_cart_rang ( ada_fecha DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING VARCHAR(50) as rango')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_rango VARCHAR(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_monto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_num_cred INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_amonto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_ini')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT max(rang_fin_rang)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO ld_max_rang')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcarang;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO li_nreg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcarang;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_amonto = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_anum_cred = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT rang_ini_rang')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_rang_ini')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcarang')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_contador = li_contador + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(cred_cap_cred) as monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(cred_num_cred) as numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred between ld_rang_ini and ld_rang_fin and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre not in (4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_ini = ld_rang_ini;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_fin = ld_rang_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_rango = li_contador || - De ||ls_ini|| a ||ls_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN ls_rango')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc values(ls_rango')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF (li_contador = li_nreg) THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(cred_cap_cred) as monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(cred_num_cred) as numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred > ld_max_rang and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre not in (4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_fin = ld_rang_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_rango = Mas de ||ls_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN ls_rango')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc values(ls_rango')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(cred_cap_cred) as monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(cred_num_cred) as numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred between ld_rang_ini and ld_rang_fin and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre not in (4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_ini = ld_rang_ini;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_fin = ld_rang_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_rango = li_contador || - De ||ls_ini|| a ||ls_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN ls_rango')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF (li_contador = li_nreg) THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(cred_cap_cred) as monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(cred_num_cred) as numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred > ld_max_rang and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre not in (4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_fin = ld_rang_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_rango = Mas de ||ls_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN ls_rango')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure
informix.sp_sig_cartera_gestion_operacion_recuperacion(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_disp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case substr(dcal_divc_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''05'' then ''05-Hasta 30 d�as''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''10'' then ''10-De 31 a 60 dias''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''15'' then ''15-De 61 a 90 d�as''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''20'' then ''20-De 91 a 180 d�as''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''25'' then ''25-De 181 a 360 d�as''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''30-Mas de 360 d�as'' end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 0 then ''Natural''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''Juridico'' end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dcal_fec_calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcal_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcal_cod_ediv <> 6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case substr(dcal_divc_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''05'' then ''Hasta 30 d�as''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''10'' then ''De 31 a 60 dias''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''15'' then ''De 61 a 90 d�as''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''20'' then ''De 91 a 180 d�as''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''25'' then ''De 181 a 360 d�as''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''Mas de 360 d�as'' end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 0 then ''Natural''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''Juridico'' end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdcal ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dcal_fec_calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcal_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcal_cod_ediv <> 6 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_cartera_gestion_actividad(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_disp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case dcal_cod_ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then ''Cartera por Vencer'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''Cartera Vencida'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''Cartera Que No Devenga Inter�s'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''Castigada'' end as tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_nombre_dependencia_nivel5(clie_cod_clie) as deta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri as tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(distinct cred_num_cred) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_fec_calf = ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv <>6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case dcal_cod_ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then ''Cartera por Vencer'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''Cartera Vencida'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''Cartera Que No Devenga Inter�s'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''Castigada'' end as tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_nombre_dependencia_nivel5(clie_cod_clie) as deta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri as tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(distinct cred_num_cred) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_fec_calf = ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv <>6 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_nombre_dependencia_nivel5( al_cod_clie
integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(100) as nombre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nivel5 char(100) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(ocup_des_ocup)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_nivel5 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where acli_cod_clie = al_cod_Clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and acli_cod_tact = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ocup_cod_ocup in (select ocup_rec_ocup from bcaocup where
ocup_cod_ocup = z.acli_cod_ocup);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ls_nivel5 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_nivel5 =''NO DEFINIDO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_nivel5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure
informix.sp_sig_captacion_producto_ocupacion(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_disp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_nombre_dependencia_nivel5( clie_cod_clie ) as ocupacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(dpvi_cod_clie) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tcdv_cod_tcdv = dpvi_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_clie = clie_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''Plazo Fijo de ''||plaz_ini_plaz||'' - '' ||plaz_fin_plaz as
tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_nombre_dependencia_nivel5( clie_cod_clie ) as ocupacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plaz_fin_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(dpfi_val_dpfi) as disponible')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(dpfi_cod_clie) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaplaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where plaz_cod_mone = mone_cod_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_mone = mone_cod_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_dpfi = hdpf_cod_dpfi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_dpfi between plaz_ini_plaz and plaz_fin_plaz and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plaz_cod_modu = 14 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(hdpf_fec_hdpf) = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_nombre_dependencia_nivel5( clie_cod_clie ) as ocupacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(dpvi_cod_clie) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tcdv_cod_tcdv = dpvi_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''Plazo Fijo de ''||plaz_ini_plaz||'' - '' ||plaz_fin_plaz as
tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_nombre_dependencia_nivel5( clie_cod_clie ) as ocupacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plaz_fin_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(dpfi_val_dpfi) as disponible')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(dpfi_cod_clie) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaplaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where plaz_cod_mone = mone_cod_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_mone = mone_cod_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_cod_dpfi = hdpf_cod_dpfi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_dpfi between plaz_ini_plaz and plaz_fin_plaz and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' plaz_cod_modu = 14 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(hdpf_fec_hdpf) = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure
informix.sp_sig_cartera_gestion_cuotasvencidas(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_disp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case dcal_cod_ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then ''Cartera por Vencer'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''Cartera Vencida'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''Cartera Que No Devenga Inter�s'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''Castigada'' end as tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_num_divc as numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri as tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(distinct cred_num_cred) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_fec_calf = ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv <>6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp cuotasvencidas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case dcal_cod_ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then ''Cartera por Vencer'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''Cartera Vencida'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''Cartera Que No Devenga Inter�s'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''Castigada'' end as tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_num_divc as numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri as tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(distinct cred_num_cred) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_fec_calf = ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv <>6 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp cuotasvencidas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from cuotasvencidas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where numero<=1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from cuotasvencidas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where numero>1 and numero <=3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from cuotasvencidas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where numero>3 and numero <=6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from cuotasvencidas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where numero>6 and numero <=9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from cuotasvencidas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where numero>9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table cuotasvencidas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_cartera_gestion_sector(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_disp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case dcal_cod_ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then ''Cartera por Vencer'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''Cartera Vencida'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''Cartera Que No Devenga Inter�s'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''Castigada'' end as tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(tsec_des_tsec) as tiposector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri as tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(distinct cred_num_Cred ) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_sect = sect_cod_sect and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = tsec_cod_tsec and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_fec_calf = ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv <>6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case dcal_cod_ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then ''Cartera por Vencer'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''Cartera Vencida'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''Cartera Que No Devenga Inter�s'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''Castigada'' end as tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(tsec_des_tsec) as tiposector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri as tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(distinct cred_num_Cred ) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_sect = sect_cod_sect and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = tsec_cod_tsec and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_fec_calf = ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv <>6 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_cartera_gestion_linea(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_disp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case dcal_cod_ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then''Cartera por Vencer'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''Cartera Vencida'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''Cartera Que No Devenga Inter�s'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''Castigada'' end as tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(lcre_desc_lcred) as clase')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('17 as tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(distinct clie_cod_clie) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_lcre = lcre_cod_lcred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_fec_calf = ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv <>6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_cartera_gestion_edad(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_disp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case dcal_cod_ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then ''Cartera por Vencer'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''Cartera Vencida'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''Cartera Que No Devenga Inter�s'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''Castigada'' end as tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(ada_fec_fina) - Year(clie_fec_nac) as edad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('17 as tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count( distinct clie_cod_clie) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_fec_calf = ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv <>6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp edadsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from edadsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where edad<=18')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from edadsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where edad>18 and edad<= 35')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from edadsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where edad>35 and edad<= 50')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from edadsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where edad>50 and edad<= 60')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from edadsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where edad> 60')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table edadsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_captacion_producto_edad(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_disp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl( (Year(ada_fec_fina) - Year(clie_fec_nac)) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tcdv_cod_tcdv = dpvi_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_clie = clie_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''Plazo Fijo de ''||plaz_ini_plaz||'' - '' ||plaz_fin_plaz as
tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl( (Year(ada_fec_fina) - Year(clie_fec_nac))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plaz_fin_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(dpfi_val_dpfi) as disponible')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(dpfi_cod_clie) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaplaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where plaz_cod_mone = mone_cod_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_mone = mone_cod_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_cod_dpfi = hdpf_cod_dpfi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_dpfi between plaz_ini_plaz and plaz_fin_plaz and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' plaz_cod_modu = 14 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(hdpf_fec_hdpf) = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp edadsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl( (Year(ada_fec_fina) - Year(clie_fec_nac)) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tcdv_cod_tcdv = dpvi_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''Plazo Fijo de ''||plaz_ini_plaz||'' - '' ||plaz_fin_plaz as
tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl( (Year(ada_fec_fina) - Year(clie_fec_nac))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plaz_fin_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(dpfi_val_dpfi) as disponible')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(dpfi_cod_clie) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaplaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where plaz_cod_mone = mone_cod_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_mone = mone_cod_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_cod_dpfi = hdpf_cod_dpfi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_dpfi between plaz_ini_plaz and plaz_fin_plaz and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' plaz_cod_modu = 14 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(hdpf_fec_hdpf) = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp edadsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from edadsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where edad<=18')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_nat_juri = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from edadsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where edad>18 and edad<= 35')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_nat_juri = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from edadsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where edad>35 and edad<= 50')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_nat_juri = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from edadsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where edad>50 and edad<= 60')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_nat_juri = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from edadsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where edad> 60')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_nat_juri = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from edadsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_nat_juri = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table edadsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sig_clientegenero ( ada_fecha DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURNING VARCHAR (50) as detalle')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_monto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_num_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_amonto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_anumero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Select sexo_des_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clna_cod_clna) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_sexo = sexo_cod_sexo and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie <> 2 and clie_nat_juri = 0 ) as Socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clna_cod_clna) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_sexo = sexo_cod_sexo and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 0 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie <> 2 and clie_nat_juri = 0 ) as Cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clna_cod_clna) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_sexo = sexo_cod_sexo and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 2 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie <> 2 and clie_nat_juri = 0 ) as Clie_Exter')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasexo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Select ''SIN INFORMACION'' As sexo_des_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clie_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri <> 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_fechaf) as Socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clie_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_tcli = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri <> 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_fechaf) as Cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clie_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_tcli = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri <> 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_fechaf) as Clie_Exter')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp clientepersonneria;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Select sexo_des_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clna_cod_clna) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_sexo = sexo_cod_sexo and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie <> 2 and clie_nat_juri = 0 and clie_cod_ofic = ai_oficina)
as Socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clna_cod_clna) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_sexo = sexo_cod_sexo and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 0 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie <> 2 and clie_nat_juri = 0 and clie_cod_ofic =
ai_oficina ) as Cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clna_cod_clna) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_sexo = sexo_cod_sexo and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 2 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie <> 2 and clie_nat_juri = 0 and clie_cod_ofic = ai_oficina)
as Clie_Exter')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasexo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Select ''SIN INFORMACION'' As sexo_des_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clie_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri <> 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_fechaf and clie_cod_ofic = ai_oficina) as
Socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clie_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_tcli = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri <> 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_fechaf and clie_cod_ofic = ai_oficina) as
Cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clie_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_tcli = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri <> 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_fechaf and clie_cod_ofic = ai_oficina) as
Clie_Exter')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp clientepersonneria;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_contador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select *')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from clientepersonneria')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table clientepersonneria;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sig_clienteestado ( ada_fecha DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURNING VARCHAR (50) as detalle')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_monto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_num_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_amonto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_anumero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Select distinct ''ACTIVO'' as detalle')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie where clie_cod_tcli =1 and clie_est_clie= 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fechaf) as socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie where clie_cod_tcli not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fechaf ) as clientes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie where clie_cod_tcli =2 and clie_est_clie= 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fechaf ) as cexter')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Select distinct ''INACTIVO'' as detalle')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie where clie_cod_tcli =1 and clie_est_clie= 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fechaf) as socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie where clie_cod_tcli not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fechaf ) as clientes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie where clie_cod_tcli =2 and clie_est_clie= 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fechaf ) as cexter')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp clientepersonneria;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Select distinct ''ACTIVO'' as detalle')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie where clie_cod_tcli =1 and clie_est_clie= 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fechaf and clie_cod_ofic =
ai_oficina) as socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie where clie_cod_tcli =0 and clie_est_clie= 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fechaf and clie_cod_ofic =
ai_oficina) as clientes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie where clie_cod_tcli =2 and clie_est_clie= 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fechaf and clie_cod_ofic =
ai_oficina) as cexter')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Select distinct ''INACTIVO'' as detalle')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie where clie_cod_tcli =1 and clie_est_clie= 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fechaf and clie_cod_ofic =
ai_oficina) as socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie where clie_cod_tcli not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fechaf and clie_cod_ofic =
ai_oficina) as clientes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie where clie_cod_tcli =2 and clie_est_clie=1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fechaf and clie_cod_ofic =
ai_oficina) as cexter')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp clientepersonneria;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_contador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select *')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from clientepersonneria')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table clientepersonneria;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sri_formulario103(ai_num_mes integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as row;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_campo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ruc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_coop char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (select count(*) from afcfval_103 where fval_cam_101 = ai_num_mes and
fval_cam_102 =ai_num_anio and fval_cod_form =''103'') =0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select coop_ruc_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_ruc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcfval_103 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacrfi.crfi_cod_crfi as air')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' drtc_por_rete')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(drtc_mon_rete) as montoretencion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(drtc_bas_impo) as baseimprete')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ls_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcatlco cb ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE cb.comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado =0)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cb.tlco_cod_tlco = dt.tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dt.crfi_cod_secu = bcacrfi.crfi_cod_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr )= ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and month(tlco_fec_ingr)= ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcfval_103 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' crfi_cod_crfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcadrtr.drtr_por_rete')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum( bcadrtr.drtr_mon_rere ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum( bcadrtr.drtr_bas_imre) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ls_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcarefi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadrtr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE ( bcadrtr.refi_cod_refi = bcarefi.refi_cod_refi
) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bcadrtr.crfi_cod_secu = bcacrfi.crfi_cod_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(refi_fec_ingr )= ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and month(refi_fec_ingr)= ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_contabilidad_liquidez_seps(ai_mes_actu
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as registros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_num_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ada_fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_ccon char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_moneda char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_dia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia = day(ada_FEc_actu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_mes = month(ada_Fec_actu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_anio = year(ada_Fec_actu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ada_fec_inic = date( month(ada_fec_actu) || /01/||
year(ada_fec_actu));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcrfca where rfca_cod_rfca>0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaejer where ejer_ani_ejer = ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(peri_cod_peri)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaperi where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri< ai_mes_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor2 = ld_Valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor4 = ld_Valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor3 = ld_Valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor3 = ld_Valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor3 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor3 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor4 = ld_Valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor4 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor4 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor5 = ld_Valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor5 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor5 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor6 = ld_Valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor6 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor6 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor7 = ld_Valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor7 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor7 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor8 = ld_Valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor8 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor8 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor9 = ld_Valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor9 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor9 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_dia - 1 <= 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_mes - 1 <= 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = 12 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anio = li_anio - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = li_mes -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_mes = 1 or li_mes = 3 or li_mes = 5 or li_mes = 7 or li_mes = 8
or li_mes = 10 or li_mes = 12 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dia = 31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_mes = 4 or li_mes = 6 or li_mes = 9 or li_mes = 11 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dia = 30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ((li_anio / 4) = 0) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dia = 29;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dia = 28;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dia = li_dia -1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fec_fina = date( li_mes || / || li_dia || /|| li_anio);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ada_fec_inic = date( month(lda_fec_fina) || /01/||
year(lda_fec_fina));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaejer where ejer_ani_ejer = li_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(peri_cod_peri)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaperi where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri< li_mes;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 8 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_fec_mcdv=ada_Fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 11 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_fec_mcdv = ada_Fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_cod_tndd = 237')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_cod_pape in (select pape_cod_pape from bcapape where
pape_cod_tran = 11);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor2 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 11 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_fec_mcdv = ada_Fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_cod_pape not in (select mban_cod_pape from bcamban )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_cod_pape not in (select pape_cod_pape from bcapape where
pape_cod_tran in (19));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor3 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mban_Val_mban)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_Valor3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamban where mban_fec_mban = ada_Fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mban_cod_pape in (select pape_Cod_pape from bcapape where
pape_Cod_tran not in (41')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mban_cod_tasi = ''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dpfi_val_dpfi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpfi_cod_edpf not in (6) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_Fec_inic = ada_fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_dpfi not in (select rvpf_cod_dpfi from bcarvpf)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_dpfi in (select pgpf_cod_dpfi from bcapgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(pdte_val_pdte)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcapdte ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where pdte_cod_tfpg in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdte_fec_pago = ada_fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dotr_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaottr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ottr_cod_pape = dotr_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ottr_fecha = ada_fec_Actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and trcj_cod_trcj = dotr_cod_trcj')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and trcj_cod_tasi =''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ottr_cod_pape not in (select mban_cod_pape from bcamban );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-----SALIDAS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 9 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_fec_mcdv= ada_fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 10 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_fec_mcdv= ada_fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_cod_pape in (select mban_cod_pape from bcamban);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor2 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 10 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_fec_mcdv= ada_fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_cod_pape not in (select mban_cod_pape from bcamban)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_cod_pape not in (select pape_cod_pape from bcapape where
pape_Cod_Tran in (24')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_cod_tndd is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_Valor3 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mban_Val_mban)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_Valor3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamban where mban_fec_mban = ada_Fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mban_cod_pape in (select pape_Cod_pape from bcapape where
pape_Cod_tran not in (41')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mban_cod_tasi = ''D'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(depg_val_depg)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where depg_cod_tran in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depg_cod_tfpg in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depg_fec_pago= ada_fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(cred_cap_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_fec_inic= ada_fec_actu and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_eope<=2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_pape not in (select mcdv_cod_pape from bcamcdv) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mban_val_mban)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mban_fec_mban= ada_fec_actu and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_cod_pape in (select pape_cod_pape from bcapape where pape_cod_tran =
41) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_cod_mban in (select chqs_cod_mban from bcachqs ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dotr_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaottr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ottr_cod_pape = dotr_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and trcj_cod_trcj = dotr_cod_trcj')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and trcj_cod_tasi =''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ottr_fecha = ada_fec_Actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ottr_cod_pape not in (select mban_cod_pape from bcamban );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ada_fec_inic = date( month(ada_fec_actu) || /01/||
year(ada_fec_actu));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaejer where ejer_ani_ejer = ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(peri_cod_peri)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaperi where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri< ai_mes_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_comp_sal_ctas(li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i= ll_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(sact_sal_debi) - sum(sact_sal_cred )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas=sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_peri=peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_cod_ejer=ejer_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon like ''110105%'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_tcue=''M'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_mes_peri<ai_mes_actu and ejer_ani_ejer= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(abdv_val_abdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where abdv_cod_rubr = 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_pago = pdte_cod_pago and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cod_divc = abdv_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_num_cred= cred_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdte_cod_tfpg <>7 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(abdv_fec_abdv) = ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(abdv_fec_abdv) = ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 8 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv
<> ft_cod_parametros(1302) and dpvi_cod_ofic = ai_cod_ofic) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dpfi_val_dpfi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpfi_cod_edpf not in (6) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(dpfi_Fec_inic) = ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(dpfi_Fec_inic) = ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(abdv_val_abdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where abdv_cod_rubr in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_pago = pdte_cod_pago and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cod_divc = abdv_cod_divc and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_num_cred = cred_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdte_cod_tfpg <>7 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(abdv_fec_abdv) = ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(abdv_fec_abdv) = ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(minv_val_comp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcminv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where inve_cod_inve = minv_cod_inve and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_tinv=''3'' and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(minv_fec_paga)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(minv_fec_paga)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv =
ft_cod_parametros(1302) and dpvi_cod_ofic = ai_cod_ofic) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dmco_val_dmco)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdmco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dmco_cod_tran = 74 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_mcco = dmco_cod_mcco and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(dmco_fec_paga)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(dmco_fec_paga)= ai_mes_actu; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dotr_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaotcl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ottr_cod_pape = dotr_cod_pape and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_pape = dotr_cod_pape and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dotr_cod_trcj in (4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(ottr_Fecha)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(ottr_fecha)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(acti_val_acti)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaacti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where acti_cod_eafi = 6 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(acti_fec_regr)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(acti_fec_regr)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-----SALIDAS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 9 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv
<> ft_cod_parametros(1302) and dpvi_cod_ofic= ai_cod_ofic) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(depg_val_depg)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where depg_cod_tran in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_pgpf = depg_cod_pgpf and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_rubr =1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(depg_fec_pago)= ai_mes_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_dpfi = pgpf_cod_dpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_ofic = ai_cod_ofic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(depg_fec_pago)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran in (9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv =
ft_cod_parametros(1302) and dpvi_cod_ofic = ai_cod_ofic) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 13 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv
<> ft_cod_parametros(1302) and dpvi_cod_ofic = ai_cod_ofic) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(depg_val_depg)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where depg_cod_tran in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_pgpf = depg_cod_pgpf and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_rubr =2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_dpfi = pgpf_cod_dpfi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(depg_fec_pago)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(depg_fec_pago)= ai_anio_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_ofic = ai_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(acti_val_acti)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaacti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where month(acti_fec_ingr) = ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(acti_fec_ingr)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp where mcpa_cod_mcpa =
m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and month(dmcp_fec_paga)= ai_mes_actu and year(dmcp_fec_paga ) =
ai_anio_actu )))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcmcpa m')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = mcpa_cod_clie AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('MCPA_COD_ESTA <> 5 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcpa_fec_mcpa)= ai_mes_actu and year(mcpa_fec_mcpa ) =
ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp where mcpa_cod_mcpa =
m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and month(dmcp_fec_paga)= ai_mes_actu and year(dmcp_fec_paga ) =
ai_anio_actu)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcmcpa m')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where prdr_cod_prdr = mcpa_cod_prdr and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('MCPA_COD_ESTA <> 5 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcpa_fec_mcpa)= ai_mes_actu and year(mcpa_fec_mcpa ) =
ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor1 is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(cred_cap_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where month(cred_fec_inic)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(cred_fec_inic) = ai_anio_actu and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_eope<=2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return (select count(*) from afcrfca where rfca_per_rfca = ai_mes_actu
and rfca_ani_rfca= ai_anio_actu) with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_nombre_clasecredito(ai_cod_ccre integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as clase;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_ccre char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(ccre_des_ccre)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_des_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccre_cod_ccre = ai_cod_ccre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_des_ccre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_nombre_situacioncredito(ai_cod_eope
integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as clase;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_ccre char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(eope_des_eope)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_des_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaeope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where eope_cod_eope = ai_cod_eope;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_des_ccre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_divid_solinkob()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numcuota')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date as fechainicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(30) as situacioncredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_tasa decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_ccre char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE LS_TELE_CLIE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lf_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lf_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_depen char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_garantes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_depen ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_calif char(3); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_orgura_nueva integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET LS_GARANTES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--parametro de interes mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_par_mora = ft_cod_parametros(1768);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia_base = ft_cod_parametros(9);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_orgura =ft_cod_parametros(1728);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia_base = li_dia_base * 100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select CLIE_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ecre_des_ecre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_ofct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into LI_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ls_des_ecre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ll_cod_ofct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie=cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_sect=sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ecre_cod_ecre=cred_cod_Ecre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dtcr_cod_dtcr=cred_cod_dtcr and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_usua = usua_cod_usua and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred in (select divc_num_cred from bcadivc where
divc_fec_venc<today and divc_cod_ediv not in (5))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_depen = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_depen = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select depe_cod_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_depen')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadepe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clna_cod_clna = decl_cod_clna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depe_cod_depe = decl_cod_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clna_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_depen is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_depen= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora_total=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_sald = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_mora_paga= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(divc_cap_divc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_num_cred=li_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by divc_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cfam_nom_cfam')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_codeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacfam ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cfam_cod_tcfa = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cfam_cod_clie = li_cod_Clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_codeudor = trim(ls_codeudor ) || -|| trim(ls_tele_fami) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lf_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred=li_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_venc<today')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by divc_num_divc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_dirb=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dirb_val_dirb)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_dirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dirb_cod_rubc not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_dirb is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_dirb=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dirb_fec_dirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lf_fecha_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb where dirb_cod_divc = li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dirb_cod_rubc = 4;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lf_fecha_mora is null or lf_fecha_mora =''01/01/1900'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lf_fecha_mora = lf_Fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_orgura_nueva = li_orgura;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_orgura_nueva = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_mora_paga is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_mora_paga = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dias_mora = today - lf_fecha_mora;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- INTERES MORA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (li_dias_mora > li_orgura_nueva ) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_int_mora< 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_int_mora_total = ld_int_mora_total + ld_int_mora +
ld_mora_paga ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_int_mora_total < 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora_total = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF LD_CAP_DIVC>0 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' lf_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ll_cod_ofct ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_sald = ld_cap_sald + ld_cap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_mora_paga = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_op_transaccion(ad_fecha DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Variables de almacenamiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_val_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_contador ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_cod_tasi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_activa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Variables de retorno ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_cod_tran INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_cod_tdoc CHAR(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_fec_pape DATETIME YEAR TO SECOND;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_val_capi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_val_noti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_val_otro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_val_chqp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_cod_caja
CHAR(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_cta_deud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Recupera el movimiento de papeletas seg�n par�metro de fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina <>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--otorgacion de cr�ditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct cred_num_cred as pape_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' PAPE_FEC_PAPE as pape_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_cod_tdoc as pape_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_pape as pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_cod_tran as pape_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_des_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_des_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_des_ccre as ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_usua = caja_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_usua = cred_cod_usua and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre = ccre_cod_ccre and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran = tran_cod_tran and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_pape = cred_cod_pape and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_cod_tran = 19 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Date(cred_fec_inic) = ad_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UNION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct pago_cod_pago as pape_num_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' PAPE_FEC_PAPE as pape_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' TRAN_COD_TDOC as pape_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_pape as pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' TRAN_COD_TRAN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_Des_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_des_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_des_ccre as ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = divc_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_divc = abdv_cod_divc and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pago_cod_pago = abdv_cod_pago and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre = ccre_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_usua = caja_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_pape = abdv_cod_pape and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran = tran_cod_tran and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran in (24')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Date(pape_fec_pape) = ad_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UNION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT pape_cod_auxi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_fec_pape as pape_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tdoc as pape_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_pape as pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran as pape_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_des_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_des_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_nom_ccon as ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = pape_cod_auxi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_tip_ccon = ccon_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = ai_ejercicio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_usua = caja_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran = tran_cod_tran and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran in (16')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Date(pape_fec_pape) = ad_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct pago_cod_pago as pape_num_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' PAPE_FEC_PAPE as pape_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' TRAN_COD_TDOC as pape_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_pape as pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' TRAN_COD_TRAN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_Des_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_des_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_des_ccre as ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' BCACCRE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pago_ctr_pago = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pago_cod_pago = abdv_cod_pago and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_divc= y.divc_cod_divc and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = cred_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre = ccre_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_usua = caja_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran = tran_cod_tran and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_divc = pape_cod_divc and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran in (32) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pago_fec_anul = ad_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Date(pape_fec_pape) = ad_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO TEMP transaccion;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Recupera el movimiento de papeletas seg�n par�metro de fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--otorgacion de cr�ditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct cred_num_cred as pape_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' PAPE_FEC_PAPE as pape_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_cod_tdoc as pape_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_pape as pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_cod_tran as pape_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_des_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_des_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_des_ccre as ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_usua = caja_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_usua = cred_cod_usua and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre = ccre_cod_ccre and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran = tran_cod_tran and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_pape = cred_cod_pape and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_cod_tran = 19 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Date(cred_fec_inic) = ad_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UNION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct pago_cod_pago as pape_num_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' PAPE_FEC_PAPE as pape_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' TRAN_COD_TDOC as pape_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_pape as pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' TRAN_COD_TRAN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_Des_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_des_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_des_ccre as ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = divc_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_divc = abdv_cod_divc and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pago_cod_pago = abdv_cod_pago and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre = ccre_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_usua = caja_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_pape = abdv_cod_pape and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran = tran_cod_tran and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran in (24')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Date(pape_fec_pape) = ad_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UNION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT pape_cod_auxi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_fec_pape as pape_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tdoc as pape_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_pape as pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran as pape_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_des_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_des_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_nom_ccon as ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = pape_cod_auxi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_tip_ccon = ccon_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = ai_ejercicio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_usua = caja_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran = tran_cod_tran and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran in (16')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Date(pape_fec_pape) = ad_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct pago_cod_pago as pape_num_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' PAPE_FEC_PAPE as pape_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' TRAN_COD_TDOC as pape_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_pape as pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' TRAN_COD_TRAN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_Des_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_des_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_des_ccre as ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcapago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' BCACCRE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pago_ctr_pago = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pago_cod_pago = abdv_cod_pago and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_divc= y.divc_cod_divc and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = cred_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre = ccre_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_usua = caja_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran = tran_cod_tran and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_divc = pape_cod_divc and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran in (32) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pago_fec_anul = ad_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Date(pape_fec_pape) = ad_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO TEMP transaccion;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_aux = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Recupera par�metros de cuentas de orden deudora y acreedora para
intereses')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Deudora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cta_deud = trim(ft_cod_parametros(1722)) || %;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Acreedora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cta_acre = trim(ft_cod_parametros(1723)) || %;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Recupera par�metros de cuentas de orden deudora y acreedora para
garant�a')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Deudora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_gara_debe = trim(ft_cod_parametros(1703)) || %;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Acreedora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_gara_cred = trim(ft_cod_parametros(1704)) || %;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Recupera par�metros de cuentas de orden deudora y acreedora para
cartera castigada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Deudora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cast_debe = trim(ft_cod_parametros(1708)) || %;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Acreedora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cast_cred = trim(ft_cod_parametros(1707)) || %;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_cta_prov = trim(1499);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT pape_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_fec_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tran_des_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' caja_des_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO li_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_capi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_cod_tran = 32 or li_cod_tran = 48 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_cod_tasi = ''D'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_tasi=''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_valor = -1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_cod_tasi = ''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_tasi =''D'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_valor = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Recupera detalle de papeleta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran <> 14 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT dpap_val_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_val_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpap_cod_pape = li_cod_pape and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpap_cod_tasi = ls_cod_tasi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpap_cod_ctas not in (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where (ccon_cod_ccon like trim (ls_cta_deud) or')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon like trim (ls_cta_acre) or')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon like trim (ls_gara_debe) or')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon like trim (ls_gara_cred) or ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon like trim (ls_cast_cred) or ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon like trim (ls_cast_debe) or')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon like trim(ls_cta_prov))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ejer = ai_ejercicio)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_dpap is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_dpap = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_cod_rubr = 1 THEN -- Capital')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_capi = ld_val_capi + ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF li_cod_rubr = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_inte = ld_val_inte + ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF li_cod_rubr = 5 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_inte = ld_val_inte + ld_val_dpap; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF li_cod_rubr = 4 THEN -- Inter�s de mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_mora = ld_val_mora + ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF li_cod_rubr = 7 THEN -- Notificaci�n')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_noti = ld_val_noti+ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF li_cod_rubr = 8 THEN -- Seg. Desgravamen')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_segd = ld_val_segd + ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF li_cod_rubr = 9 THEN -- Judicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_judi = ld_val_judi + ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE -- Otros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_otro = ld_val_otro + ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--LET ld_val_efec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--RETURN li_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- ld_val_noti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT dpap_val_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_val_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpap_cod_pape = li_cod_pape and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpap_cod_tasi = ls_tasi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpap_cod_ctas not in (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where (ccon_cod_ccon like trim (ls_cta_deud) or')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon like trim (ls_cta_acre) or')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon like trim (ls_gara_debe) or')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon like trim (ls_gara_cred) or ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon like trim(ls_cta_prov))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ejer = ai_ejercicio) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpap_cod_rubr=2 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_cod_rubr = 2 or li_cod_rubr = 5 THEN -- Inter�s')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_inte = ld_val_inte - ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_val_inte = ld_val_inte + ld_val_inted;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT abdv_val_abdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_val_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE abdv_cod_pape = li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_cod_rubr = 1 THEN -- Capital')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_capi = ld_val_capi + ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF li_cod_rubr = 2 or li_cod_rubr = 5 THEN -- Inter�s')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_inte = ld_val_inte + ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF li_cod_rubr = 4 THEN -- Inter�s de mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_mora = ld_val_mora + ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF li_cod_rubr = 7 THEN -- Notificaci�n')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_noti = ld_val_noti+ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF li_cod_rubr = 8 THEN -- Seg. Desgravamen')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_segd = ld_val_segd + ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF li_cod_rubr = 9 THEN -- Judicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_judi = ld_val_judi + ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE -- Otros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_otro = ld_val_otro + ld_val_dpap;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_efec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF exists (SELECT abdv_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE abdv_cod_pape = li_cod_pape ) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Recupera detalle de pago ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT pdte_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pdte_val_pdte')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pdte_cod_tfpg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO li_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcapdte')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE pdte_cod_pago in (select abdv_cod_pago from bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where abdv_cod_pape = li_cod_pape )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_cod_tfpg = 1 THEN -- Efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_efec = ld_val_pdte;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF li_cod_tfpg = 2 THEN -- Cheques Locales')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_chql = ld_val_pdte;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE -- Otros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_otos = ld_val_otos + ld_val_pdte;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_aux <> li_cod_pago THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_aux = li_cod_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_contador = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_contador = li_contador + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_contador > 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_efec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_cod_tran = 32 or li_cod_tran = 48 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Coloco el signo dependiendo de la transacci�n')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_efec = ld_val_efec * -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_chql = ld_val_chql * -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_otos = ld_val_otos * -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_capi = ld_val_capi * -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_inte = ld_val_inte * -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_mora = ld_val_mora * -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_noti = ld_val_noti * -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_segd = ld_val_segd * -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_judi = ld_val_judi * -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_otro = ld_val_otro * -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_val_efec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN li_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ld_val_noti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_cod_identificacion(ai_cod_clie integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15) as codidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codidentificacion char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_cod_ofic ||_ ||catc_tcl_ante || _|| catc_num_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into codidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afccatc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where catc_cod_clie = ai_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_clie = catc_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and catc_fec_actu > ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_catc is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_catc = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_catc= 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_cod_ofic||_ ||clie_cod_tcli || _|| clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into codidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = ai_cod_Clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return trim(codidentificacion) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_cartera_condicion_solicitud(ai_cod_socr
integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(300) as condicion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_obs char(300);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_obs1 char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_obs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dsoc_obs_dsoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_obs1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcdsoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dsoc_cod_socr = ai_cod_socr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_obs = trim(ls_obs) || - || trim(ls_obs1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return trim(ls_obs) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_calc_sald_prom(ada_fec_upro date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_interes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_base = ft_cod_parametros(9);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo_ant = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha_ant = ada_fec_upro;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_interes =0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpvi_cod_eacd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_esta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpvi_cod_dpvi= ai_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tcdv_cod_tcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_tcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tcdv_cod_tcdv = ai_cod_tcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_tcap = 2 AND LDA_FECHA_VENC<= ADA_FEC_ACTU then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ada_fec_actu = lda_fecha_venc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sald_cod_dpvi = ai_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sald_fec_sald >= ada_fec_upro and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sald_fec_sald< ada_Fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_num_tran is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_tran = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_num_tran = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- barre todas las fechas que haya hecho transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(sald_fec_sald) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fecha ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_cod_dpvi = ai_cod_dpvi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_fec_sald <= ada_fec_upro ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fecha is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha= ada_fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sald_fec_sald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald where sald_cod_dpvi = ai_cod_dpvi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_fec_sald = lda_fecha ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias_mes = ada_fec_actu- ada_fec_upro ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_tasa = ft_tasa_dpvi(ai_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_interes = ld_interes +Round(ld_tasa * ld_saldo_ant *
li_dias_mes/(li_base*100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_tran = 0;select max(sald_fec_sald) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fecha_ant ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_cod_dpvi = ai_cod_dpvi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_fec_sald <= ada_fec_upro ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fecha_ant is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha_ant = ada_fec_upro;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sald_dispo+sald_val_picn ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_saldo_ant ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_cod_dpvi = ai_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sald_fec_sald = lda_fecha_ant;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_saldo_ant is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ant = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha_ant = ada_fec_upro;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- barre todas lasfechas que haya hecho transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sald_fec_sald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_cod_dpvi = ai_cod_dpvi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_fec_sald > ada_fec_upro and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_fec_sald<= ada_Fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fecha = ada_fec_upro then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ant = ld_saldo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha_ant= lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- if ld_saldo <> ld_saldo_ant then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fecha <> lda_fecha_ant then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_tran = li_num_tran +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias_mes = lda_fecha - lda_fecha_ant ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha_ant= lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_tasa = ft_tasa_dpvi(ai_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_interes = ld_interes+ Round(ld_tasa * ld_saldo_ant *
li_dias_mes/(li_base*100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ant = ld_saldo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(sald_fec_sald) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lda_fecha ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasald ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sald_cod_dpvi = ai_cod_dpvi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_fec_sald <=ada_fec_actu ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fecha is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha= ada_fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sald_fec_sald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasald ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sald_cod_dpvi = ai_cod_dpvi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_fec_sald = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fecha <> ada_fec_actu then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias_mes = ada_fec_actu - lda_fecha ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha_ant= lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_tasa = ft_tasa_dpvi(ai_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_interes = ld_interes + Round(ld_tasa * ld_saldo_ant *
li_dias_mes/(li_base*100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_interes;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_contabilidad_flujodecaja(ai_mes_actu
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as registros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcrfca where rfca_cod_rfca>0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(sact_sal_debi) - sum(sact_sal_cred )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas=sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_peri=peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_cod_ejer=ejer_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon like ''11%'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_tcue=''M'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_mes_peri<ai_mes_actu and ejer_ani_ejer= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(abdv_val_abdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where abdv_cod_rubr = 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_pago = pdte_cod_pago and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdte_cod_tfpg <>7 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(abdv_fec_abdv) = ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(abdv_fec_abdv) = ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 8 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv
<> ft_cod_parametros(1302)) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dpfi_val_dpfi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpfi_cod_edpf not in (6) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(dpfi_Fec_inic) = ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(dpfi_Fec_inic) = ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(abdv_val_abdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where abdv_cod_rubr in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_pago = pdte_cod_pago and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdte_cod_tfpg <>7 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(abdv_fec_abdv) = ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(abdv_fec_abdv) = ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(minv_val_comp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcminv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where inve_cod_inve = minv_cod_inve and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_tinv=''3'' and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(minv_fec_paga)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(minv_fec_paga)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv =
ft_cod_parametros(1302)) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dmco_val_dmco)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdmco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dmco_cod_tran = 74 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(dmco_fec_paga)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(dmco_fec_paga)= ai_mes_actu; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dotr_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaotcl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ottr_cod_pape = dotr_cod_pape and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dotr_cod_trcj in (4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(ottr_Fecha)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(ottr_fecha)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(acti_val_acti)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaacti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where acti_cod_eafi = 6 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(acti_fec_regr)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(acti_fec_regr)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(sact_sal_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas=sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_peri=peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_cod_ejer=ejer_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon like ''26%'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_tcue=''M'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_mes_peri<ai_mes_actu and ejer_ani_ejer= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-----SALIDAS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 9 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv
<> ft_cod_parametros(1302)) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(depg_val_depg)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where depg_cod_tran in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_pgpf = depg_cod_pgpf and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_rubr =1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(depg_fec_pago)= ai_mes_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(depg_fec_pago)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran in (9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv =
ft_cod_parametros(1302)) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 13 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv
<> ft_cod_parametros(1302)) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(depg_val_depg)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where depg_cod_tran in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_pgpf = depg_cod_pgpf and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_rubr =2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(depg_fec_pago)= ai_mes_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(depg_fec_pago)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(sact_sal_debi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas=sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_peri=peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_cod_ejer=ejer_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon like ''26%'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_tcue=''M'' and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_mes_peri= ai_mes_actu and ejer_ani_ejer= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(acti_val_acti)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaacti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where month(acti_fec_ingr) = ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(acti_fec_ingr)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp where mcpa_cod_mcpa =
m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and month(dmcp_fec_paga)= ai_mes_actu and year(dmcp_fec_paga ) =
ai_anio_actu )))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcmcpa m')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = mcpa_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND MCPA_COD_ESTA <> 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and month(mcpa_fec_mcpa)= ai_mes_actu and year(mcpa_fec_mcpa ) =
ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp where mcpa_cod_mcpa =
m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and month(dmcp_fec_paga)= ai_mes_actu and year(dmcp_fec_paga ) =
ai_anio_actu)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcmcpa m')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where prdr_cod_prdr = mcpa_cod_prdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND MCPA_COD_ESTA <> 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and month(mcpa_fec_mcpa)= ai_mes_actu and year(mcpa_fec_mcpa ) =
ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor1 is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(cred_cap_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where month(cred_fec_inic)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(cred_fec_inic) = ai_anio_actu and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_eope<=2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(sact_sal_debi) - sum(sact_sal_cred )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas=sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_peri=peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_cod_ejer=ejer_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon like ''11%'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_tcue=''M'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_mes_peri<ai_mes_actu and ejer_ani_ejer= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(abdv_val_abdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where abdv_cod_rubr = 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_pago = pdte_cod_pago and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cod_divc = abdv_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_num_cred= cred_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdte_cod_tfpg <>7 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(abdv_fec_abdv) = ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(abdv_fec_abdv) = ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 8 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv
<> ft_cod_parametros(1302) and dpvi_cod_ofic = ai_cod_ofic) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dpfi_val_dpfi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpfi_cod_edpf not in (6) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(dpfi_Fec_inic) = ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(dpfi_Fec_inic) = ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(abdv_val_abdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where abdv_cod_rubr in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_pago = pdte_cod_pago and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cod_divc = abdv_cod_divc and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_num_cred = cred_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdte_cod_tfpg <>7 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(abdv_fec_abdv) = ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(abdv_fec_abdv) = ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(minv_val_comp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcminv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where inve_cod_inve = minv_cod_inve and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_tinv=''3'' and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('inve_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(minv_fec_paga)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(minv_fec_paga)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv =
ft_cod_parametros(1302) and dpvi_cod_ofic = ai_cod_ofic) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dmco_val_dmco)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdmco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dmco_cod_tran = 74 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_mcco = dmco_cod_mcco and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(dmco_fec_paga)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(dmco_fec_paga)= ai_mes_actu; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(dotr_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaotcl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ottr_cod_pape = dotr_cod_pape and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_pape = dotr_cod_pape and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dotr_cod_trcj in (4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(ottr_Fecha)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(ottr_fecha)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(acti_val_acti)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaacti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where acti_cod_eafi = 6 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(acti_fec_regr)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(acti_fec_regr)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(sact_sal_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas=sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_peri=peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_cod_ejer=ejer_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon like ''26%'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_tcue=''M'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_mes_peri<ai_mes_actu and ejer_ani_ejer= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-----SALIDAS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 9 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv
<> ft_cod_parametros(1302) and dpvi_cod_ofic= ai_cod_ofic) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(depg_val_depg)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where depg_cod_tran in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_pgpf = depg_cod_pgpf and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_rubr =1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(depg_fec_pago)= ai_mes_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_dpfi = pgpf_cod_dpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_ofic = ai_cod_ofic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(depg_fec_pago)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran in (9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv =
ft_cod_parametros(1302) and dpvi_cod_ofic = ai_cod_ofic) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 13 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi where dpvi_cod_tcdv
<> ft_cod_parametros(1302) and dpvi_cod_ofic = ai_cod_ofic) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcdv_fec_mcdv)= ai_mes_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(mcdv_fec_mcdv)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(depg_val_depg)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where depg_cod_tran in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_pgpf = depg_cod_pgpf and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_rubr =2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_dpfi = pgpf_cod_dpfi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(depg_fec_pago)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(depg_fec_pago)= ai_anio_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_ofic = ai_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(sact_sal_debi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas=sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_peri=peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_cod_ejer=ejer_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon like ''26%'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_tcue=''M'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_mes_peri<ai_mes_actu and ejer_ani_ejer= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select nvl(sum(acti_val_acti)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaacti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where month(acti_fec_ingr) = ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(acti_fec_ingr)= ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp where mcpa_cod_mcpa =
m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and month(dmcp_fec_paga)= ai_mes_actu and year(dmcp_fec_paga ) =
ai_anio_actu )))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcmcpa m')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = mcpa_cod_clie AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('MCPA_COD_ESTA <> 5 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcpa_fec_mcpa)= ai_mes_actu and year(mcpa_fec_mcpa ) =
ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp where mcpa_cod_mcpa =
m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and month(dmcp_fec_paga)= ai_mes_actu and year(dmcp_fec_paga ) =
ai_anio_actu)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcmcpa m')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where prdr_cod_prdr = mcpa_cod_prdr and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('MCPA_COD_ESTA <> 5 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(mcpa_fec_mcpa)= ai_mes_actu and year(mcpa_fec_mcpa ) =
ai_anio_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor1 is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(cred_cap_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where month(cred_fec_inic)= ai_mes_actu and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('year(cred_fec_inic) = ai_anio_actu and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ofic = ai_cod_ofic and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_eope<=2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcrfca values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return (select count(*) from afcrfca where rfca_per_rfca = ai_mes_actu
and rfca_ani_rfca= ai_anio_actu) with resume; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_balance_flujoefectivo(ai_cod_ejer integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as datos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ctas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_debe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_sign char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_peri = ai_cod_peri; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_ejer_actu <> ai_cod_ejer then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ai_cod_peri = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ai_cod_peri = ai_cod_peri -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where TRIM(ccon_cod_ccon) = TRIM(eesf_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and esac_cod_esac = eesf_cod_esac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and esac_ban_esac = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and eesf_ban_eesf = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ejer = ai_ejer_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_saldos_ctas (li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_debe is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_debe = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_haber is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_haber = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_total = ld_total +(ld_debe- ld_haber);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo =1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_mes = ai_cod_peri then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_anterior = ld_total;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_mes = ai_peri_actu then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ls_cod_ccon = ''3603'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_total ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_total - ld_anterior;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ls_cod_sign =''+'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor =abs(ld_valor);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcaeesf set eesf_val_eesf = ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return 1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_desplazarfecha( ai_num_cred integer
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as resultados--')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_track01')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_int_plaz ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define responder')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fec_pago = ada_fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ban_mfec = ai_ban_mfec ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_for = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let responder = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cred_cap_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_cap_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_num_cred = ai_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_tope = 3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_num_dias>90 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_num_dias < 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_rubr = 23;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT cOUNT(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO LI_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_fec_venc>=ada_fec_proc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred = ai_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--and year(divc_fec_venc) = 2020;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(track_01_cod)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_track01')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from track_01')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where track_01_userid = ai_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and track_01_module in (17')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(track_01_datei) = today;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --insert into track_02 values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(track_02_cod)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_track02')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from track_02')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where track_02_table =''bcadivc''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and track_02_statment =''update''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and track_02_cod_01 = li_cod_track01;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dias = li_num_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select divc_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_num_cred = ai_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ORDER BY DIVC_NUM_DIVC ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_for = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_dias = ai_num_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_ppag = lda_fec_venc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = lda_fec_venc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_ban_inte = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---let li_dias_calc = lda_fec_venc - lda_fec_ante ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_calc = ((ld_cap_cred * ld_tasa * li_num_dias )/
(li_dias_base* 100));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_calc = ld_int_calc / li_cuotas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---return 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_venc > ada_fec_proc +120 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_dias = li_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_mfec = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = lda_fec_pago + li_num_dias ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_num_dias >= 30 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = ft_calculo_fecha(lda_fec_pago ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = lda_fec_pago + li_num_dias ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_for = li_for + 1 ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc set divc_fec_venc = lda_fec_pago where divc_cod_divc =
li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_ban_inte = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb where dirb_cod_rubc = li_cod_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dirb_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cuotas >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_num_rubr> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb set dirb_val_dirb = dirb_val_dirb +
ld_int_calc where dirb_cod_rubc = li_cod_rubr and dirb_cod_divc = li_cod_divc ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cuotas = li_cuotas - 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete bcadirb where dirb_cod_divc = li_cod_divc and dirb_cod_rubc =
4;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ediv in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc set divc_cod_Ediv = 1 where divc_cod_divc =
li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1401 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 1 and cred_cod_eope<3) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1403 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 3 and cred_cod_eope<3) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1404 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 4 and cred_cod_eope<3) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1402 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 2 and cred_cod_eope<3) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1417 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 1 and cred_cod_eope=3) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1409 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 1 and cred_cod_eope=11) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1418 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 2 and cred_cod_eope=3) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1410 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 2 and cred_cod_eope=11) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1419 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 3 and cred_cod_eope=3) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1411 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 3 and cred_cod_eope=11) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1420 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 4 and cred_cod_eope=3) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1412 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 4 and cred_cod_eope=11) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1407 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 6 and cred_cod_eope<3) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1423 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 6 and cred_cod_eope=3) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_cod_ccon = 1415 || substr(divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred in (select cred_num_cred from bcacred where
creD_cod_ccre = 6 and cred_cod_eope=11) and divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let responder = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_cap_cred = ld_cap_cred - (ld_cap_pago+ ld_cap_divc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_ante = lda_fec_venc; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_ban_inte = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --execute procedure sp_corrige_bcadivc(ai_num_cred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --update bcacred set where cred_num_Cred = ai_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcacred set cred_ban_mfec = li_ban_mfec ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return responder;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_valor_dividendo(ai_num_cred integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_divc integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select min(divc_cod_divc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc where divc_num_cred = ai_num_Cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_fec_venc> ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select divc_cap_divc + divc_cap_pago ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc where divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dirb_val_dirb ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_val_seguro ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dirb_cod_divc = li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dirb_cod_rubc = 8;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_val_seguro is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Val_seguro = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_Cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_reporte_emergencia_sanitaria1()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_clie integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ide_clie char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_cred integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_maximo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_Clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---and cred_cod_tope = 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in(3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_maximo = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_Cred = li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by divc_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = lda_fec_venc- lda_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_dias > li_maximo then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_maximo = li_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_Fec_inic = lda_fec_venc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_Clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---and cred_cod_tope = 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_fec_pago>=''03/16/2020''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_Ecre = 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_maximo = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_Cred = li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by divc_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = lda_fec_venc- lda_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_dias > li_maximo then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_maximo = li_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_Fec_inic = lda_fec_venc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_reporte_emergencia_sanitaria()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_clie integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ide_clie char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_cred integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_maximo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_cap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_Clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_tope in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_Ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_maximo = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_cap = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_Cred = li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by divc_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = lda_fec_venc- lda_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_dias > li_maximo then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_maximo = li_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_total = ld_cap_total + ld_val_cap;
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_Fec_inic = lda_fec_venc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_tasa_dpvi(ai_cod_tcdv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_tas_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ttpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tcdv_cod_ttpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_ttpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tcdv_cod_tcdv =ai_cod_tcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_tasa_retorno = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF li_tip_cap=1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT tadv_tas_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_tas_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcatadv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE tadv_cod_tcdv = ai_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND ad_val_sald BETWEEN tadv_mon_inic AND tadv_mon_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ld_tas_acti is null THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_tas_acti = 0;end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ld_tas_inac is null THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_tas_inac = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ttpf = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---//Tasa Nominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ai_estado = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_tasa_retorno = ld_tas_acti;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_tasa_retorno = ld_tas_inac;END IF ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ttpf = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --//Tasa Efectiva')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ai_estado = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_tas_acti = ld_tas_inac;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_tasa_retorno =ft_calcula_base_exponente((1+
(ld_tas_acti/100))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---ahorro acumulado ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpvi_tas_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_tasa_retorno ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi=ai_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and (dpvi_fec_inic+dpvi_dia_plaz) >= ada_fec_actu ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_tasa_retorno is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_tasa_retorno = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_tasa_retorno ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_seps_plantilla(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(1) as tiporegistro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numerocuotasampliadasplazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tiporegistro char(1) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentificacion char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerooperacion char(20) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define plazo integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerocuotasampliadasplazo integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define periodosgracia integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define aplicacionperiodogracia char(2) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define frecuenciadepagoreprogramado char(2) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechavencimiento char(10) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaformalizacion char(10) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tratamientooperacion char(1) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuotacredito decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorinteresescredito decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorseguro decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldocuotadelcapitaldiferido decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valordeinteresdiferido decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define diasmora integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define destinofinanciero char(2) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorimpuestos decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ce_periodosgracia char(2) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ce_plazospago char(2) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ce_tasasdeinteres char(2) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valormora decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define gestioncobranza decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tasaefectiva decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''C'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(cred_nct_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(cred_Fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NA''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case when cred_fec_inic >''03/15/2020'' then nvl((select cocr_val_cocr
from bcacocr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else 0 end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tiporegistro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('numerocuotasampliadasplazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotacredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('destinofinanciero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ce_periodosgracia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_eope = eope_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_Clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_tope in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let cuotacredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tiporegistro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('numerocuotasampliadasplazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotacredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('destinofinanciero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ce_periodosgracia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure
informix.sp_lsms_dividendos_vencidos_garantes(lda_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(50) as coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define coop char(50) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor char(10) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define telefono char(10) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct ft_cod_parametros(39) as coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('$||round((select sum(dirb_val_dirb) from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = x.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_venc<lda_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(*) from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = x.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_venc<lda_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcadivc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( cred_num_cred = divc_num_cred ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gara_num_cred = cred_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' gara_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cod_ediv in(1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_fec_venc < lda_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(*) from afclsms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where year(lsms_fec_serv) = year(lda_Fec_inic) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(lsms_fec_serv) = month(lda_Fec_inic)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and lsms_cod_plan = 3 and lsms_cod_clie = x.cred_cod_clie) = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('having (select count(*) from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = x.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_venc<lda_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_lsms_dividendos_vencidos(lda_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(50) as coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define coop char(50) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor char(10) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define telefono char(10) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct ft_cod_parametros(39) as coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('$ ||round((select sum(dirb_val_dirb) from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = x.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_venc<lda_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(*) from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = x.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_venc<lda_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcadivc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( cred_num_cred = divc_num_cred ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('( cred_cod_clie = bcaclie.clie_cod_clie ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_fec_venc < lda_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_clie not in (select lsms_cod_clie from afclsms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where year(lsms_fec_serv) = year(lda_Fec_inic) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('month(lsms_fec_serv) = month(lda_Fec_inic)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and lsms_cod_plan = 3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ofic = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('having (select count(*) from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = x.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_venc<lda_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_ctaspagar(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor_original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_mcpa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_cod_serv = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp where
mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_fec_mcpa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' max((select max(dmcp_fec_paga) from afcdmcp where
mcpa_cod_mcpa = m.mcpa_cod_mcpa and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dmcp_fec_paga between ada_fec_inic and ada_fec_fina)) as
fecha_pagada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor_original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcmcpa m')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = mcpa_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND MCPA_COD_ESTA <> 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and MCPA_FEC_MCPA between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having (sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp where
mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor_original - ld_valor_pagado <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_valor_original - ld_valor_pagado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp where
mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_fec_mcpa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prdr_nom_prdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prdr_ide_prdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' max((select max(dmcp_fec_paga) from afcdmcp where
mcpa_cod_mcpa = m.mcpa_cod_mcpa and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dmcp_fec_paga between ada_fec_inic and ada_fec_fina)) as
fecha_pagada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor_original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcmcpa m')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prdr_cod_prdr = mcpa_cod_prdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND MCPA_COD_ESTA <> 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and MCPA_FEC_MCPA between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having (sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp where
mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor_original - ld_valor_pagado <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_valor_original - ld_valor_pagado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp
where mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_fec_mcpa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' max((select max(dmcp_fec_paga) from afcdmcp where
mcpa_cod_mcpa = m.mcpa_cod_mcpa and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)) as fecha_pagada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor_original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcmcpa m')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = mcpa_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND MCPA_COD_ESTA <> 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcpa_cod_serv = ai_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and MCPA_FEC_MCPA between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having (sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp
where mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor_original - ld_valor_pagado <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_valor_original - ld_valor_pagado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp
where mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_fec_mcpa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prdr_nom_prdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prdr_ide_prdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' max((select max(dmcp_fec_paga) from afcdmcp where
mcpa_cod_mcpa = m.mcpa_cod_mcpa and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)) as fecha_pagada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor_original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcmcpa m')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prdr_cod_prdr = mcpa_cod_prdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND MCPA_COD_ESTA <> 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcpa_cod_serv = ai_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and MCPA_FEC_MCPA between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having (sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp
where mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor_original - ld_valor_pagado <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_valor_original - ld_valor_pagado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_cod_serv = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp
where mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_fec_mcpa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' max((select max(dmcp_fec_paga) from afcdmcp where
mcpa_cod_mcpa = m.mcpa_cod_mcpa and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)) as fecha_pagada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor_original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcmcpa m')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = mcpa_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND MCPA_COD_ESTA <> 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcpa_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and MCPA_FEC_MCPA between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having (sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp
where mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor_original - ld_valor_pagado <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_valor_original - ld_valor_pagado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp
where mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_fec_mcpa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prdr_nom_prdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prdr_ide_prdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' max((select max(dmcp_fec_paga) from afcdmcp where
mcpa_cod_mcpa = m.mcpa_cod_mcpa and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)) as fecha_pagada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor_original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcmcpa m')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prdr_cod_prdr = mcpa_cod_prdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND MCPA_COD_ESTA <> 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcpa_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and MCPA_FEC_MCPA between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having (sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp
where mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor_original - ld_valor_pagado <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_valor_original - ld_valor_pagado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp
where mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_fec_mcpa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' max((select max(dmcp_fec_paga) from afcdmcp where
mcpa_cod_mcpa = m.mcpa_cod_mcpa and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)) as fecha_pagada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor_original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcmcpa m')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = mcpa_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND MCPA_COD_ESTA <> 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcpa_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcpa_cod_serv = ai_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and MCPA_FEC_MCPA between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having (sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp
where mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor_original - ld_valor_pagado <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_valor_original - ld_valor_pagado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp
where mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_fec_mcpa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prdr_nom_prdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prdr_ide_prdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' max((select max(dmcp_fec_paga) from afcdmcp where
mcpa_cod_mcpa = m.mcpa_cod_mcpa and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)) as fecha_pagada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor_original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcmcpa m')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prdr_cod_prdr = mcpa_cod_prdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND MCPA_COD_ESTA <> 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcpa_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcpa_cod_serv = ai_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and MCPA_FEC_MCPA between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having (sum((select nvl(sum(dmcp_val_dmcp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((sum((select sum(dmcp_val_dmcp) from afcdmcp
where mcpa_cod_mcpa = m.mcpa_cod_mcpa and dmcp_cod_tran = 75')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dmcp_fec_paga between ada_fec_inic and
ada_fec_fina)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by mcpa_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor_original - ld_valor_pagado <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_valor_original - ld_valor_pagado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_gestion_cobranza(ai_cod_rubr integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as dividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_gcob decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_dias_base')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_rubr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_venc date ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dias_base = ft_cod_parametros(9);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_cred = divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre in(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = ada_fec - lda_fec_venc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select gcob_cod_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcgcob')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mont_cod_mont = gcob_cod_mont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and plaz_cod_plaz = gcob_cod_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mont_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and plaz_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and plaz_cod_modu = 17')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mont_cod_modu = 17 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and li_dias between plaz_ini_plaz and plaz_fin_plaz ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ld_val_calc between mont_ini_mont and mont_fin_mont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and gcob_cod_rubr =24')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dirb_val_dirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_gcob')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc=li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dirb_cod_rubc = ai_cod_rubr;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_gcob is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---update bcadirb set dirb_val_dirb=ld_valor where
dirb_cod_rubc=24 and dirb_cod_divc=li_cod_divc and dirb_val_paga=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_lsms_dividendosporvencer(ada_fec_inic date
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define coop char(30) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define telefono char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcred char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numclie integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT ft_cod_parametros(39) as coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' $||(select sum(dirb_val_dirb)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = x.divc_cod_divc) as valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_numero_telefonos(clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(to_char(divc_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred || as numcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie as numclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadivc x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE divc_num_cred = cred_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_fec_venc between ada_fec_inic and ada_fec_fina
and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred not in (select divc_num_cred from
bcadivc where divc_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_venc< ada_Fec_inic) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie not in (select lsms_cod_clie from
afclsms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(lsms_fec_serv) = year(ada_Fec_inic) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' month(lsms_fec_serv) = month(ada_Fec_inic)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and lsms_cod_plan = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ORDER BY cred_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure
informix.sp_limites_concetracion_cartera_vinculados( ai_anio integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(13) as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as mensaje1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ide_clie char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_mensaje')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_limite')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor_total decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_denominacion = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha = ft_fin_fecha_mes(ai_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_limite= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacalf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_fec_Calf = lda_Fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select coop_cod_segm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_segm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct clie_cod_clie as clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_fec_calf = lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_tvin <> 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp dinamica;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie = clie_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_limite = ld_Valor / ad_patrimonio*100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_mensaje = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_mensaje1 = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_limite> ad_limite then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_mensaje = INCUMPLE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_segm <4 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor> ld_val_sbu * 400 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_mensaje1 = INCUMPLE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' drop table dinamica;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_sig_mensaje_limites_riegos(titulo char(100)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' returning char(600) as mensaje')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define mensaje char(600);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select vprm_val_vprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into mensaje')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prms_cod_modu = 51 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' vprm_cod_prms = prms_cod_prms and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(vprm_asu_vprm) = trim(alerta) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(titulo) like trim(prms_des_prms) || %')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return trim(mensaje);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_limites_depositos100(ada_Fec_fina date)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ide_clie char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nombres char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_mensaje char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_limite decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor_total decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ai_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ai_mes = month(ada_Fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ai_anio = year(ada_Fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha = ft_fin_fecha_mes(ai_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_limite= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(mcdv_fec_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 35;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if lda_fec_inic is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select min(mcdv_fec_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afchdpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf) =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and hdpf_plz_hdpf <=90;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_total = 0 or li_total is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(hdpf_Fec_hdpf)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afchdpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf) <ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and hdpf_plz_hdpf <=90;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct clie_cod_clie as clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between lda_fec_inic and
ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between lda_fec_inic and
ada_Fec_fina) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> ft_cod_parametros(1301)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct hdpf_cod_clie as clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afchdpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf) =lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and hdpf_plz_hdpf <=90')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp dinamicadv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_clie = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cli_ante = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(monto)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from dinamicadv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (li_num<=100) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_total = ld_valor_total + ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- let li_conitnue = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num = li_num +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' drop table dinamicadv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_valor_total/2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_nombre_actividad_nivel4_cred( as_cod_ocup
char(15))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(100) as nombre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nivel5 char(100) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ocup_rec_ocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_rec_ocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ocup_sib_ocup = trim(as_cod_ocup);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_rec_ocup is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ocup is not null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(ocup_des_ocup)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_nivel5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ocup_cod_ocup = li_cod_ocup;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(ocup_des_ocup)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_nivel5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ocup_cod_ocup = li_rec_ocup;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ls_nivel5 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_nivel5 =''NO DEFINIDO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_nivel5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_cartera_gestion_garantia(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_disp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case dcal_cod_ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then ''Cartera por Vencer'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''Cartera Vencida'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''Cartera Que No Devenga Inter�s'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''Castigada'' end as tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(tgar_des_tgar) as garantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri as tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(distinct cred_num_cred) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_tgar = tgar_cod_tgar and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_fec_calf = ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv <>6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case dcal_cod_ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then ''Cartera por Vencer'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''Cartera Vencida'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''Cartera Que No Devenga Inter�s'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''Castigada'' end as tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(tgar_des_tgar) as garantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri as tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(distinct cred_num_cred) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_tgar = tgar_cod_tgar and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_fec_calf = ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv <>6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_cartera_gestion_genero(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(30) as sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_disp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case dcal_cod_ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then ''Cartera por Vencer'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''Cartera Vencida'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''Cartera Que No Devenga Inter�s'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''Castigada'' end as tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(clna_cod_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('17 as tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(distinct cred_num_cred) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_fec_calf = ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv <>6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select case dcal_cod_ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then ''Cartera por Vencer'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''Cartera Vencida'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''Cartera Que No Devenga Inter�s'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''Castigada'' end as tcdv_des_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(clna_cod_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('17 as tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(distinct cred_num_cred) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_fec_calf = ada_fec_fina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv <>6 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sigc_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_des_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sig_cartera_administrada_linea ( ada_fecha
DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURNING VARCHAR (50) as oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_monto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_amonto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_anumero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECUPERO CARTERA CONCEDIDA POR oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccre_des_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''VENCIDOS'' as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(dcal_val_dcal) as valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(distinct cred_num_cred) as conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' afcdcal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaediv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_cod_ccre = cred_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv = ediv_cod_ediv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = ada_fec_fina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv = 2 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = ai_moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccre_des_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' rubr_des_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as porcentaje')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(distinct cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = divc_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ediv_cod_ediv = dcal_cod_ediv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_cod_ccre = cred_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_divc = dirb_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' rubr_cod_rubr = dirb_cod_rubc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = ada_fec_fina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc = 7 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = ai_moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccre_des_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''VENCIDOS'' as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(dcal_val_dcal) as valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(distinct cred_num_cred) as conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' afcdcal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaediv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_cod_ccre = cred_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv = ediv_cod_ediv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = ada_fec_fina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv = 2 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccre_des_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' rubr_des_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as porcentaje')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(distinct cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = divc_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ediv_cod_ediv = dcal_cod_ediv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_cod_ccre = cred_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_divc = dirb_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' rubr_cod_rubr = dirb_cod_rubc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = ada_fec_fina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc = 7 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = ai_moneda and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- INICIALIZO VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_amonto = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_anumero = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sigc_val_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sig_cartera_concedidos_zona ( ada_fecha
DATE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURNING VARCHAR (50) as oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_actividad VARCHAR(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_monto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_amonto DECIMAL(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_anumero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECUPERO CARTERA CONCEDIDA POR oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct trim(tsec_des_tsec) as ccre_des_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE cred_cod_sect = sect_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = tsec_cod_tsec and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct trim(tsec_des_tsec) as ccre_des_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE cred_cod_sect = sect_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = tsec_cod_tsec and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_fec_inic between ada_fecha and ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone = ai_moneda and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- INICIALIZO VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_amonto = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_anumero = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sigc_val_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_monto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcsigc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RETURN Trim(ls_actividad)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sig_clienteactividad ( ada_Fecha date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING CHAR(180)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_asocio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_actividad CHAR(180);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigs;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECUPERO NUMERO DE CLIENTES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct ocup_des_ocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = acli_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ocup_cod_ocup = acli_cod_ocup and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri = ai_persona and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_fec_ingr <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2) as Socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = acli_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ocup_cod_ocup = acli_cod_ocup and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri = ai_persona and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_fec_ingr <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2) as Cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = acli_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ocup_cod_ocup = acli_cod_ocup and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri = ai_persona and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_fec_ingr <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2) as Cliente_Ext')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ocup_cod_ocup = acli_cod_ocup ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''SIN INFORMACION'' as ocup_des_ocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie not in (select acli_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where acli_cod_clie = clie_cod_clie
and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri =
ai_persona) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_fec_ingr <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 1) as Socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie not in (select acli_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where acli_cod_clie = clie_cod_clie
and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri =
ai_persona) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_fec_ingr <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 0) as Cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie not in (select acli_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where acli_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri =
ai_persona) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_fec_ingr <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 2) as Cliente_Ext')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct ocup_des_ocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = acli_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ocup_cod_ocup = acli_cod_ocup and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri = ai_persona and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_fec_ingr <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_ofic = ai_oficina) as Socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = acli_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ocup_cod_ocup = acli_cod_ocup and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri = ai_persona and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_fec_ingr <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_ofic = ai_oficina) as Cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = acli_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ocup_cod_ocup = acli_cod_ocup and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri = ai_persona and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_fec_ingr <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_ofic = ai_oficina) as Cliente_Ext')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ocup_cod_ocup = acli_cod_ocup ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''SIN INFORMACION'' as ocup_des_ocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie not in (select acli_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where acli_cod_clie = clie_cod_clie
and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri =
ai_persona) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_fec_ingr <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_ofic = ai_oficina ) as Socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie not in (select acli_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where acli_cod_clie = clie_cod_clie
and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri =
ai_persona) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_fec_ingr <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_ofic = ai_oficina) as Cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie not in (select acli_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where acli_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nat_juri =
ai_persona) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_fec_ingr <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_ofic = ai_oficina) as Cliente_Ext')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_asocio = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_acliente = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_aclie_ext = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT *')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcsigs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_contador = li_contador + 1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF (li_contador < 7 and li_socio <> 0)THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_asocio = li_asocio + li_socio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_acliente = li_acliente + li_cliente;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_aclie_ext = li_aclie_ext + li_clie_ext;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_actividad = OTRAS;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sig_clienteautoidentificacion ( ada_Fecha
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING CHAR(180)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_asocio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_actividad CHAR(180);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaclie set clie_cod_auid = 1 where clie_cod_auid is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigs;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECUPERO NUMERO DE CLIENTES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct nvl(auid_des_auid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_auid = x.auid_cod_auid and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2) as Socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_auid = x.auid_cod_auid and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_auid = x.auid_cod_auid and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2) as Cliente_Ext')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcauid x;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct auid_des_auid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_auid = x.auid_cod_auid and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and clie_cod_ofic = ai_oficina) as
Socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_auid = x.auid_cod_auid and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and clie_cod_ofic = ai_oficina) as
cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_auid = x.auid_cod_auid and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and clie_cod_ofic = ai_oficina) as
Cliente_Ext')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcauid x;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_asocio = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_acliente = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_aclie_ext = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT *')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcsigs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sig_clienteprofesion ( ada_Fecha date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING CHAR(180)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_asocio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE RETORNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_actividad CHAR(180);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaclie set clie_cod_prof = 1 where clie_cod_prof is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsigs;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECUPERO NUMERO DE CLIENTES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct nvl(prof_nom_prof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_prof = x.prof_cod_prof and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2) as Socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_prof = x.prof_cod_prof and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2) as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_prof = x.prof_cod_prof and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli= 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2) as Cliente_Ext')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcprof x;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsigs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct prof_nom_prof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_prof = x.prof_cod_prof and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and clie_cod_ofic = ai_oficina) as
Socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_prof = x.prof_cod_prof and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and clie_cod_ofic = ai_oficina) as
cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_prof = x.prof_cod_prof and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(clie_fec_ingr) <= ada_fechaf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2 and clie_cod_ofic = ai_oficina) as
Cliente_Ext')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcprof x;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_asocio = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_acliente = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_aclie_ext = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT *')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcsigs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_socio>0 or li_cliente>0 or li_clie_ext > 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_porcion_volatilidad(ada_FEc_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_media')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_registros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afccavo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cavo_fec_repr = ada_FEc_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_recalcular = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_registros > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete afccavo where cavo_fec_repr = ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_registros = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_j = ai_Datos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_i = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fec_fina = ada_FEc_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_fila = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_val_fond1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_registros = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' while li_i <= ai_datos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (weekday(lda_Fec_fina) =0 or weekday(lda_Fec_fina)= 6) and
lda_fec_fina <> ada_fec_fina then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --return ld_Val_fond1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_fond2 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_fond3 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_fond4 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_fond5 =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ejer_ani_ejer = year(lda_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = month(lda_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = li_mes - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = date(month(lda_fec_fina) || /01/ ||
year(lda_fec_fina)); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if substr(as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas( li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ld_val_fond1 is null and (ld_val_fond1 > 0 )THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_fond1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afccavo values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_i = li_i + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_j = li_j - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --return ld_Val_fond1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_Fec_fina = lda_fec_fina - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end while ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_por_temp = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select band_val_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ai_banda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcband')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_j = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_banda <= 30 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' for li_i = ai_banda to ai_Datos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cavo_cod_cavo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_cavo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afccavo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cavo_fec_repr= ada_FEc_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cavo_num_cavo = ai_datos - li_i + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cavo_val_fon1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afccavo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cavo_fec_repr= ada_FEc_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cavo_num_cavo = ai_datos - li_j + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_Val_fond1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Val_fond1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_Valor = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_variacion = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- return ld_Val_fond1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- let ld_variacion = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_variacion = logn(ld_Val_fond1/ld_Valor) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afccavo set cavo_val_cal1 = ld_variacion where
cavo_cod_cavo =li_cod_cavo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_total = ld_total + ld_Variacion;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_i = ai_datos and ai_banda = 7 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ldo_sal_ctas = ld_val_fond1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_j = li_j + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end for;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_media = ld_total /((ai_Datos - ai_banda)+1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' for li_i = ai_banda to ai_datos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cavo_cod_cavo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_cavo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afccavo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cavo_fec_repr= ada_FEc_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cavo_num_cavo = li_i;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor = ld_valor - ld_media;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_valor * ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afccavo set cavo_val_pro1 = ld_valor where
cavo_cod_cavo =li_cod_cavo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_total = ld_total + ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end for;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_por = ld_total /( (ai_Datos - ai_banda)+1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_por = sqrt(ld_por);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_por = 1- (exp ((ld_por*-1) * ad_por_conf));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_por_temp = ld_por;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_banda = 99999 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_por = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_por_temp = ld_por;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_por = ld_por * sqrt(ai_banda/30); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (ld_por * ldo_sal_ctas) > ldo_sal_ctas then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ldo_Sal_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_por * ldo_sal_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---return ld_por')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ldo_sal_ctas = ldo_sal_ctas - ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_por = ld_por_temp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcband set band_val_band = ld_valor where band_cod_band =
ai_cod_band;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select band_val_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ai_banda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcband')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_historial_crediticio(ai_cod_clie
integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as diasmora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as calfprom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_ecre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_Cap_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_calf char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afchicr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(divc_fec_pago) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_cod_ediv = 5 and divc_num_cred =
x.cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(divc_cap_pago) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_cod_ediv = 5 and
divc_num_cred = x.cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred as cap_prestado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' lcre_desc_lcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( select max(calf_dias_venc) from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_num_cred = x.cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(dirb_val_dirb)+sum(dirb_val_paga)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = x.cred_num_cred and dirb_cod_rubc =
2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(dirb_val_dirb)+sum(dirb_val_paga)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = divc_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = x.cred_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc = 4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( select sum(dirb_val_dirb)+sum(dirb_val_paga)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = divc_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = x.cred_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaecre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ecre_cod_ecre = cred_cod_ecre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_cod_ccre = cred_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_lcre = lcre_cod_lcred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_clie = ai_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre in (3) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred not in (select hicr_num_cred from afchicr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select hicr_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hicr_des_ecre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hicr_des_ccre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hicr_fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hicr_fec_ultp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hicr_val_pago ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hicr_fec_venc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hicr_cap_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hicr_des_lcre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hicr_cod_calf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hicr_dia_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hicr_val_inte')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hicr_val_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hicr_val_otro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afchicr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where hicr_cod_clie = ai_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred as cap_prestado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' lcre_desc_lcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaecre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ecre_cod_ecre = cred_cod_ecre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_cod_ccre = cred_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_lcre = lcre_cod_lcred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_clie = ai_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre not in (4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(divc_fec_pago)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_ultp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_ediv = 5 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = li_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(calf_dias_venc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_dias_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_num_cred = li_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --execute procedure
ft_calf_promedio_creditos(li_num_cred ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --into ls_cod_calf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --end foreach ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dirb_val_dirb)+sum(dirb_val_paga)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_inte')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = divc_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = li_num_cred and dirb_cod_rubc = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dirb_val_dirb)+sum(dirb_val_paga)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_Val_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = divc_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = li_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc = 4;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dirb_val_dirb)+sum(dirb_val_paga)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_otro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = divc_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = li_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_nombres_garantes(al_num_cred integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(150) as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nombre char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_gar char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_gar = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT trim(clie_ide_clie) ||-||TRIM(clie_ape_clie) || ||
nvl(TRIM(y.clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaclie y')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE clie_cod_clie = gara_cod_clie AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' gara_num_cred =al_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_gar = trim(ls_nombre) || ; || trim(ls_gar) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_gar;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_captaciones_ingresosegresos(ada_Fecha_ini
date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_fecha_fin <> today then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ai_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ada_fecha_ini and ada_fecha_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_ingresos is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_ingresos = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_egresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ai_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ada_fecha_ini and ada_fecha_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_egresos is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_egresos = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_ingresos = ld_ingresos - ld_egresos ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpvi_Sal_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi = ai_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_ingresos ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cosede_beneficiarios(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(5) as codigoefi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_clie integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_sib_coop char(5);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ruc_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_coop char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tide char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_num_tele char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_fec_aper char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_estado char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_num_dpvi char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_tip_ctas char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_num_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacoop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpfi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_fec_inic between ada_Fec_inic and ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_edpf not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv = ft_cod_parametros(1302)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_ide_clie in (select bcos_ide_bcos from afcbcos where
bcos_ban_bcos = 0 )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_num_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacoop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_dpvi = mcdv_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_Fec_mcdv between ada_Fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_Cod_tcdv <> ft_cod_parametros(1301)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_ide_clie in (select bcos_ide_bcos from afcbcos where
bcos_ban_bcos = 0 )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_limites_concentracion_cartera( ai_anio
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ide_clie char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nombres char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_mensaje char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_limite decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor_total decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_indicador decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_registros integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha = ft_fin_fecha_mes(ai_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_limite= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_registros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afccode')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where code_Fec_actu =lda_Fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and code_cod_tipo in (''C'');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_recalcular = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete afccode where code_Fec_fina = lda_Fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and code_cod_tipo in (''C'');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_registros = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(calf_Sal_Cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_valor_total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_fec_Calf = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(distinct clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie where clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('in (select cred_cod_clie from bcacalf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf= lda_Fecha);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_total = li_total +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_limite = (ld_valor_total /2)/2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- umbral ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_limite = (ld_valor_total/2) + ld_limite;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_registros = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afccode')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_fec_calf = lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_clie = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cli_ante = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select code_val_code')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afccode')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where code_Fec_fina = lda_Fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and code_cod_tipo =''C''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (ld_valor_total + ld_valor) < ld_limite then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num = li_num +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_total = ld_valor_total + ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_indicador = li_num / li_total;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete afcsigc where sigc_num_sigc = 45;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc values(CONCENTRACION CARTERA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_limites_concentracion_depositos(ai_anio
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ide_clie char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nombres char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_mensaje char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_limite decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_concentracion decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor_total decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha = ft_fin_fecha_mes(ai_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_limite= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(mcdv_fec_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_tran = 35;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if lda_fec_inic is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select min(mcdv_fec_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afccode')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where code_Fec_actu =lda_Fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and code_cod_tipo in (''V''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_recalcular = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete afccode where code_Fec_fina = lda_Fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and code_cod_tipo in (''V''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_total = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afccode')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between lda_fec_inic and
lda_fecha)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between lda_fec_inic and
lda_fecha) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> ft_cod_parametros(1301);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afccode')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afchdpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf) =lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(code_val_code)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_Valor_total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afccode')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where code_fec_fina = lda_fecha ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and code_cod_tipo in (''V''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(distinct code_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afccode')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where code_val_code <> 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and code_Fec_fina = lda_Fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and code_cod_tipo in (''V''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_total = li_total +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_limite = (ld_valor_total /2)/2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- umbral ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_limite = (ld_valor_total/2) + ld_limite;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_clie = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cli_ante = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(code_val_code)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afccode')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where code_Fec_fina=lda_Fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and code_cod_tipo in (''V''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (ld_valor_total + ld_valor) < ld_limite then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num = li_num +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_total = ld_valor_total + ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- let li_conitnue = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_concentracion = li_num / li_total;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete afcsigc where sigc_num_sigc = 46;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsigc values(CONCENTRACION DEPOSITOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_reporte_garantias(ada_fec_inic date
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as estadocredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---returning char(5000)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE c_query CHAR(5000);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ofic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_clie integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_bien chaR(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_des_cgti char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_valorterreno char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valorbien decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_gtia integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_cred integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_Valorgarantizado decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ecre integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--// en operacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofic = and cred_cod_ofic > 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofic = and cred_cod_ofic = || ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_opcion = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_opcion = bcacgti.cgti_cod_cgti > 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_opcion = bcacgti.cgti_cod_cgti = || ai_opcion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_tipo = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = SELECT bcaclie.clie_num_clie,trim(bcaclie.clie_ape_clie) ||
'' '' || nvl(trim(bcaclie.clie_nom_clie), '''') as nombres,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagtia.gtia_des_bien,
bcacgti.cgti_des_cgti, bcagbie.gbie_ava_cotr || '''', bcagbie.gbie_ava_cocn, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagbie.gtia_num_gtia,
bcagtcr.gtcr_num_cred, bcagtcr.gtcr_val_gtcr, bcacred.cred_cap_cred, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacred.cred_cod_ecre ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcagbie, bcagtia, bcaclie,
bcacgti, bcagtcr, bcacred ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE bcagtia.gtia_num_gtia =
bcagbie.gtia_num_gtia and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcaclie.clie_cod_clie =
bcagtia.gtia_cod_clie and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacgti.cgti_cod_cgti =
bcagtia.gtia_cod_cgti and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagtcr.gtcr_num_gtia =
bcagtia.gtia_num_gtia and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacred.cred_num_cred =
bcagtcr.gtcr_num_cred and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacred.cred_cod_clie =
bcaclie.clie_cod_clie and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacred.cred_cod_ecre not in (3,4) AND
;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_opcion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || union ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || SELECT bcaclie.clie_num_clie,
trim(bcaclie.clie_ape_clie) || '' '' || nvl(trim(bcaclie.clie_nom_clie), ''''),;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_des_bien, bcacgti.cgti_des_cgti,
gchq_num_ctab, gchq_val_gchq, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || gtia_num_gtia, bcagtcr.gtcr_num_cred,
bcagtcr.gtcr_val_gtcr, bcacred.cred_cap_cred, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacred.cred_cod_ecre ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcaclie, bcacred,
bcagtia x, bcagtcr, bcacgti, bcagchq ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE ( bcacred.cred_cod_clie =
bcaclie.clie_cod_clie ) and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_cod_clie = bcaclie.clie_cod_clie
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagtcr.gtcr_num_gtia = x.gtia_num_gtia
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagtcr.gtcr_num_cred =
bcacred.cred_num_cred and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacgti.cgti_cod_cgti = x.gtia_cod_cgti
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacred.cred_cod_ecre not in (3,4)
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_num_gtia = bcagchq.gchq_num_gtia
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_opcion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || union ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || SELECT bcaclie.clie_num_clie,
trim(bcaclie.clie_ape_clie) || '' '' || nvl(trim(bcaclie.clie_nom_clie), ''''),;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_des_bien, bcacgti.cgti_des_cgti,
count(*) || '''', sum(endc_val_endc), ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || gtia_num_gtia, bcagtcr.gtcr_num_cred,
bcagtcr.gtcr_val_gtcr, bcacred.cred_cap_cred, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacred.cred_cod_ecre ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcaclie, bcacred,
bcagtia x, bcagtcr, bcacgti, bcaendc ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE bcacred.cred_cod_clie =
bcaclie.clie_cod_clie and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_cod_clie = bcaclie.clie_cod_clie
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagtcr.gtcr_num_gtia = x.gtia_num_gtia
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagtcr.gtcr_num_cred =
bcacred.cred_num_cred and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacgti.cgti_cod_cgti = x.gtia_cod_cgti
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || endc_num_gtia=x.gtia_num_gtia and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacred.cred_cod_ecre not in (3,4)
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_opcion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || group by 7, 8,9,10,1,2,3,4,
cred_cod_ecre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || union ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || SELECT bcaclie.clie_num_clie,
trim(bcaclie.clie_ape_clie) || '' '' || nvl(trim(bcaclie.clie_nom_clie), ''''),;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_des_bien, bcacgti.cgti_des_cgti,
0 || '''', gpre_ava_fact, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || gtia_num_gtia, bcagtcr.gtcr_num_cred,
bcagtcr.gtcr_val_gtcr, bcacred.cred_cap_cred, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacred.cred_cod_ecre ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcaclie, bcacred,
bcagtia x, bcagtcr, bcacgti, bcagpre ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE bcacred.cred_cod_clie =
bcaclie.clie_cod_clie and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_cod_clie = bcaclie.clie_cod_clie
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagtcr.gtcr_num_gtia = x.gtia_num_gtia
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagtcr.gtcr_num_cred =
bcacred.cred_num_cred and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacgti.cgti_cod_cgti = x.gtia_cod_cgti
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagpre.gpre_num_gtia = x.gtia_num_gtia
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacred.cred_cod_ecre not in (3,4)
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_opcion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || union ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || SELECT bcaclie.clie_num_clie,
trim(bcaclie.clie_ape_clie) || '' '' || nvl(trim(bcaclie.clie_nom_clie), ''''),;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_des_bien, bcacgti.cgti_des_cgti,
0 || '''', gtit_val_merc, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || gtia_num_gtia, bcagtcr.gtcr_num_cred,
bcagtcr.gtcr_val_gtcr, bcacred.cred_cap_cred, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacred.cred_cod_ecre ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcaclie, bcacred,
bcagtia x, bcagtcr, bcacgti, bcagtit ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE bcacred.cred_cod_clie =
bcaclie.clie_cod_clie and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_cod_clie = bcaclie.clie_cod_clie
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagtcr.gtcr_num_gtia = x.gtia_num_gtia
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagtcr.gtcr_num_cred =
bcacred.cred_num_cred and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacgti.cgti_cod_cgti = x.gtia_cod_cgti
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || gtit_num_gtia = x.gtia_num_gtia and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacred.cred_cod_ecre not in (3,4)
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_opcion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || union ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || SELECT bcaclie.clie_num_clie,
trim(bcaclie.clie_ape_clie) || '' '' || nvl(trim(bcaclie.clie_nom_clie), ''''),;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_des_bien, bcacgti.cgti_des_cgti,
0 || '''', GAUL_VAL_gAUL, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || gtia_num_gtia, bcagtcr.gtcr_num_cred,
bcagtcr.gtcr_val_gtcr, bcacred.cred_cap_cred, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacred.cred_cod_ecre ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcaclie, bcacred,
bcagtia x, bcagtcr, bcacgti, afcgaul ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE bcacred.cred_cod_clie =
bcaclie.clie_cod_clie and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_cod_clie = bcaclie.clie_cod_clie
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagtcr.gtcr_num_gtia = x.gtia_num_gtia
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagtcr.gtcr_num_cred =
bcacred.cred_num_cred and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacgti.cgti_cod_cgti = x.gtia_cod_cgti
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || GAUL_num_gtia = x.gtia_num_gtia and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacred.cred_cod_ecre not in (3,4)
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_opcion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ORDER BY bcaclie.clie_num_clie ASC,
gtia_num_gtia ASC ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofic = and gtia_cod_ofic > 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofic = and gtia_cod_ofic = || ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = SELECT bcaclie.clie_num_clie, trim(bcaclie.clie_ape_clie)
|| '' '' || nvl(trim(bcaclie.clie_nom_clie), ''''),;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_des_bien, bcacgti.cgti_des_cgti,
gbie_ava_cotr || '''', gbie_ava_cocn, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_num_gtia, 0, 0, 0, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcagbie, bcagtia x, bcaclie,
bcacgti ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE x.gtia_num_gtia =
bcagbie.gtia_num_gtia and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcaclie.clie_cod_clie = x.gtia_cod_clie
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacgti.cgti_cod_cgti = x.gtia_cod_cgti
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || gtia_fec_ingr between '' || ada_fec_inic
|| '' and '' || ada_Fec_fina || '' and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_opcion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || union ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || SELECT bcaclie.clie_num_clie,
trim(bcaclie.clie_ape_clie) || '' '' || nvl(trim(bcaclie.clie_nom_clie), ''''),;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_des_bien, bcacgti.cgti_des_cgti,
gchq_num_ctab, gchq_val_gchq, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_num_gtia, 0, 0, 0, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcaclie, bcagtia x,
bcacgti, bcagchq ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_cod_clie = bcaclie.clie_cod_clie
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacgti.cgti_cod_cgti = x.gtia_cod_cgti
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_num_gtia = bcagchq.gchq_num_gtia
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || gtia_fec_ingr between '' || ada_fec_inic
|| '' and '' || ada_Fec_fina || '' and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_opcion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || union ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || SELECT bcaclie.clie_num_clie,
trim(bcaclie.clie_ape_clie) || '' '' || nvl(trim(bcaclie.clie_nom_clie), ''''),;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_des_bien, bcacgti.cgti_des_cgti,
count(*) || '''', sum(endc_val_endc), ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_num_gtia, 0, 0, 0, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcaclie, bcagtia x,
bcacgti, bcaendc ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_cod_clie = bcaclie.clie_cod_clie
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacgti.cgti_cod_cgti = x.gtia_cod_cgti
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || endc_num_gtia=x.gtia_num_gtia and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || gtia_fec_ingr between '' || ada_fec_inic
|| '' and '' || ada_Fec_fina || '' and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_opcion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || group by 7,1,2,3,4;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || union ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || SELECT bcaclie.clie_num_clie,
trim(bcaclie.clie_ape_clie) || '' '' || nvl(trim(bcaclie.clie_nom_clie), ''''),;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_des_bien, bcacgti.cgti_des_cgti,
0 || '''', gpre_ava_fact, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_num_gtia, 0, 0, 0, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcaclie, bcagtia x,
bcacgti, bcagpre ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_cod_clie = bcaclie.clie_cod_clie
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacgti.cgti_cod_cgti = x.gtia_cod_cgti
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcagpre.gpre_num_gtia = x.gtia_num_gtia
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || gtia_fec_ingr between '' || ada_fec_inic
|| '' and '' || ada_Fec_fina || '' and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_opcion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || union ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || SELECT bcaclie.clie_num_clie,
trim(bcaclie.clie_ape_clie) || '' '' || nvl(trim(bcaclie.clie_nom_clie), ''''),;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_des_bien, bcacgti.cgti_des_cgti,
0 || '''', gtit_val_merc, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_num_gtia, 0, 0, 0, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcaclie, bcagtia x,
bcacgti, bcagtit ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_cod_clie = bcaclie.clie_cod_clie
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacgti.cgti_cod_cgti = x.gtia_cod_cgti
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || gtit_num_gtia = x.gtia_num_gtia and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || gtia_fec_ingr between '' || ada_fec_inic
|| '' and '' || ada_Fec_fina || '' and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_opcion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || union ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || SELECT bcaclie.clie_num_clie,
trim(bcaclie.clie_ape_clie) || '' '' || nvl(trim(bcaclie.clie_nom_clie), ''''),;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_des_bien, bcacgti.cgti_des_cgti,
0 || '''', GAUL_VAL_gAUL, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_num_gtia, 0, 0, 0, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcaclie, bcagtia x,
bcacgti, afcgaul ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || x.gtia_cod_clie = bcaclie.clie_cod_clie
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacgti.cgti_cod_cgti = x.gtia_cod_cgti
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || GAUL_num_gtia = x.gtia_num_gtia and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || gtia_fec_ingr between '' || ada_fec_inic
|| '' and '' || ada_Fec_fina || '' and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_opcion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ORDER BY bcaclie.clie_num_clie ASC,
gtia_num_gtia ASC ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--return c_query;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('PREPARE c_stmt FROM c_query;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DECLARE c_cur CURSOR FOR c_stmt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('OPEN c_cur ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while (1 = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FETCH c_cur INTO ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF (SQLCODE != 100) THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN li_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('EXIT;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END WHILE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CLOSE c_cur;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FREE c_cur;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FREE c_stmt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_indicemorosidad( ai_cod_ejer
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as codperiodo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cla_cred char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_mese char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ccre_ante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_val_genet = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_val_venct = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ((trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud)
from afcdccr where dccr_cod_ccre = y.ccre_cod_ccre and dccr_num_para<=9 and not
dccr_num_para in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri <= x.peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = ai_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud)
from afcdccr where dccr_cod_ccre = y.ccre_cod_ccre and dccr_num_para in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri <= x.peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = ai_cod_ejer) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud)
from afcdccr where dccr_num_para <=9 ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri <= x.peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = ai_cod_ejer) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaperi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mese_cod_mese = peri_mes_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri between ai_per_inic and ai_per_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (nvl((select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ((trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud)
from afcdccr where dccr_cod_ccre = y.ccre_cod_ccre and dccr_num_para<=9 and not
dccr_num_para in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri <= x.peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = ai_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud)
from afcdccr where dccr_cod_ccre = y.ccre_cod_ccre and dccr_num_para in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri <= x.peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = ai_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_parc = ld_val_venc / (ld_val_venc+ ld_val_acti)* 100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_gene= ld_val_venc /ld_tot_cart*100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ccre <> li_ccre_ante and ll_i >1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_venct = ld_val_venc+ ld_val_venct; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_genet = ld_val_venct/ld_tot_cart*100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_venct = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ccre_ante = li_cod_ccre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_i = ll_i +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ((trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud)
from afcdccr where dccr_cod_ccre = y.ccre_cod_ccre and dccr_num_para<=9 and not
dccr_num_para in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri <= x.peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = ai_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud)
from afcdccr where dccr_cod_ccre = y.ccre_cod_ccre and dccr_num_para in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri <= x.peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = ai_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud)
from afcdccr where dccr_num_para <=9 ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri <= x.peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = ai_cod_ejer) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaperi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mese_cod_mese = peri_mes_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri between ai_per_inic and ai_per_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (nvl((select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ((trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud)
from afcdccr where dccr_cod_ccre = y.ccre_cod_ccre and dccr_num_para<=9 and not
dccr_num_para in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri <= x.peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = ai_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(sact_sal_debi - sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon) in (select TRIM(dccr_ctaS_deud)
from afcdccr where dccr_cod_ccre = y.ccre_cod_ccre and dccr_num_para in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri <= x.peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = ai_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_parc = ld_val_venc / (ld_val_venc+ ld_val_acti)* 100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_gene= ld_val_venc /ld_tot_cart*100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ccre <> li_ccre_ante and ll_i >1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_venct = ld_val_venc+ ld_val_venct; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_genet = ld_val_venct/ld_tot_cart*100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_venct = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ccre_ante = li_cod_ccre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_i = ll_i +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_nivelactividadeconomica(as_cod_ocup
char(15))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15) as ocupacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ocup char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_cod_ocup = trim(as_cod_ocup) || %;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(ocup_sib_ocup)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_ocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ocup_sib_ocup like ls_cod_ocup;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return trim(ls_cod_ocup);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_mascara(as_cadena char(15))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning chaR(15) as mascara')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ceros char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ai_espacios integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ai_espacios = 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num = length(trim(as_cadena));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_ceros =;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_num - ai_espacios > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for li_i =1 to li_num loop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_i < li_num - ai_espacios then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_ceros = trim(ls_ceros) || X;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_ceros = trim(ls_ceros) || substr(as_cadena')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---return ls_ceros with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end loop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--let ls_ceros = trim(ls_ceros) || trim(as_cadena) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_ceros ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--return ls_ceros ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sri_formulario104(ai_num_mes integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as row;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_campo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ruc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_coop char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (select count(*) from afcfval where fval_cam_101 = ai_num_mes and
fval_cam_102 =ai_num_anio and fval_cod_form =''104'') =0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select coop_ruc_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_ruc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcfval values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select fval_cod_fval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_fval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcfval where fval_cam_101 = ai_num_mes and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fval_cam_102 =ai_num_anio and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fval_cod_form =''104'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ----campo 401 ventas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(tlve_baim_iva) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlve_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlve_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tlve_ban_Cele>0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tlve_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ----campo 401 ventas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(tlve_baim_iva) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlve_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlve_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tlve_cod_comp = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tlve_ban_Cele>0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tlve_cod_modu = 14;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo2 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo2 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo3 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo3 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval set fval_cam_401 = ld_campo+ ld_campo2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fval_cam_409 = ld_campo+ ld_campo2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fval_cam_480 = ld_campo+ ld_campo2 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_val_dtlc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_ban_iva = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_mon_iva > 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tpco_cod_tpco = ''01'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_val_dtlc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_ban_iva = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_mon_iva = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tpco_cod_tpco = ''01'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_mon_iva)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_ban_iva = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tpco_cod_tpco = ''01'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo2 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo2 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval set fval_cam_502 = ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fval_cam_507 = ld_campo2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fval_cam_509 = ld_campo+ld_campo2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_val_dtlc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_ban_iva = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_mon_iva > 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tpco_cod_tpco <> ''01'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_val_dtlc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_ban_iva = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_mon_iva = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tpco_cod_tpco <> ''01'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_mon_iva)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_ban_iva = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tpco_cod_tpco <> ''01'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo2 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo2 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval set fval_cam_508 = ld_campo + ld_campo2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fval_cam_509 = fval_cam_509+ ld_campo+ld_campo2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_val_dtlc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_ban_iva = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_532 = ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval= li_cod_fval;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(drtr_bas_imre)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcarefi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(refi_fec_ingr) = ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(refi_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bcarefi.refi_cod_refi = bcadrtr.refi_cod_Refi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_val_dtlc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_ban_iva = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo2 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo2 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_531 = ld_Campo2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (select fval_cam_419 from afcfval where fval_cod_fval =
li_cod_fval) > 0then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_563 =
(fval_cam_411+fval_cam_412+fval_cam_415+fval_cam_416+fval_cam_417+fval_cam_418)/
fval_cam_419')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (select fval_cam_499- fval_cam_564 from afcfval where fval_cod_fval
= li_cod_fval) > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_601 = (fval_cam_499- fval_cam_564)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_mon_rete)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_reti = p.pibi_cod_pibi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pibi_ban_tipo =''S''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_609= ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (select fval_cam_601- fval_cam_602 - fval_cam_603 - fval_cam_604-
fval_cam_605 - ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fval_cam_606- fval_cam_607 - fval_cam_608- ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fval_cam_609 + fval_cam_610 + fval_cam_611+ ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fval_cam_612+ fval_cam_613+ fval_cam_614')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval) > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_620 = fval_cam_601- fval_cam_602 - fval_cam_603 -
fval_cam_604- fval_cam_605 - ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fval_cam_606- fval_cam_607 - fval_cam_608- ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fval_cam_609 + fval_cam_610 + fval_cam_611+fval_cam_612+
fval_cam_613+ fval_cam_614 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_699 = fval_cam_620+ fval_cam_621')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_mon_rete)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_reti = p.pibi_cod_pibi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pibi_des_pibi = 20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_mon_rete)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_reti = p.pibi_cod_pibi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pibi_des_pibi = 10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_mon_rete)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_reti = p.pibi_cod_pibi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pibi_des_pibi = 50')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_721 = ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_mon_rete)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_reti = p.pibi_cod_pibi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pibi_des_pibi = 30')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pibi_ban_tipo =''B''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo =0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_725 = ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_mon_rete)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_reti =p.pibi_cod_pibi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pibi_des_pibi = 30')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pibi_ban_tipo =''S''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_campo is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_campo = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_725 = fval_cam_725 + ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_mon_rete)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_reti = p.pibi_cod_pibi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pibi_des_pibi = 70')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pibi_ban_tipo =''S''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_729 = ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dtlc_mon_rete)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where month(tlco_fec_ingr) =ai_num_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(tlco_fec_ingr) = ai_num_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_tlco = tlco_cod_tlco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dtlc_cod_reti = p.pibi_cod_pibi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pibi_des_pibi = 100')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pibi_ban_tipo =''S''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp in (select comp_cod_comp from bcacomp where
comp_anulado = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_731 = ld_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_799 = fval_cam_721+ fval_cam_723+ fval_cam_727+
fval_cam_729 +fval_cam_731')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_801 = fval_cam_799- fval_cam_800')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_859 = fval_cam_699+ fval_cam_801')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_902 = fval_cam_859 - fval_cam_898')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_999 =(fval_cam_859 - fval_cam_898) +
fval_cam_903+fval_cam_904')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcfval')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set fval_cam_905 =fval_cam_999')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where fval_cod_fval = li_cod_fval;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_saldo_bancos(ai_cod_cban integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_inicial date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_fecha char(10); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT MAX(sdct_fec_sdct)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO lda_inicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE sdct_cod_cban = ai_cod_cban AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sdct_fec_sdct < ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if lda_inicial is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_fecha= lda_inicial;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT sdct_con_sdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE sdct_cod_cban = ai_cod_cban AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sdct_fec_sdct = lda_inicial;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldo is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_saldo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_reporte_notificaciones( ada_Fec_inic
date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--returning char(4500)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentificacion char(1) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(150) ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nomclase char(20) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define capital decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define linea')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define oficina integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define clie_cod integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE c_query CHAR(4500);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_dias_mora char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_num_cuot char(160);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ofic char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_tipo char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_cod_ofic = and cred_cod_ofic > 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofic = and cred_cod_ofic = || ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_tipo = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_tipo = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_tipo = and cred_fec_venc > '' || ada_fec_inic || '' and
cred_fec_venc <='' ||')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ada_Fec_fina || '' and cred_cod_ecre < 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif ai_tipo = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_tipo = and cred_fec_venc <='' || ada_Fec_fina || '' and
cred_cod_ecre = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_tipo = and cred_num_cred in (select divc_num_cred from bcadivc
where divc_cod_ediv < 4 and divc_fec_venc < '' || ada_fec_fina || '' ) and
cred_cod_ecre < 2 ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_dias_mora = (select '' || ada_fec_fina || ''-
min(divc_fec_venc) from bcadivc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_dias_mora = trim(ls_dias_mora) || where divc_cod_ediv in (1,2,
3) and divc_num_cred = bcacred.cred_num_cred ) as diasmora,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_num_cuot = (select count(*) from bcadivc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_num_cuot = trim(ls_num_cuot ) || where divc_cod_ediv in (1,2,
3) and divc_num_cred = bcacred.cred_num_cred and divc_fec_venc < ''||
ada_fec_fina || '') as numcuot, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if length(trim(as_nom_cond))> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let as_nom_cond = and || trim(as_nom_cond) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let as_nom_cond = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = SELECT bcaclie.clie_num_clie, clie_cod_tide,
clie_ide_clie , ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || trim(bcaclie.clie_ape_clie) || '' ''
|| nvl(trim( bcaclie.clie_nom_clie), '' '') as nombres, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || cred_num_cred,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || bcacred.cred_cod_ccre, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || bcaccre.ccre_des_ccre, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || bcacred.cred_cap_cred,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || bcacred.cred_cod_lcre,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || bcacred.cred_cod_iden,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || ls_dias_mora ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || cred_cod_ofic,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || ls_num_cuot ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || 0 as control , cred_cod_clie ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || FROM bcacred ,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || bcaclie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || bcaccre ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || WHERE clie_cod_clie =
cred_cod_clie ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || and ccre_cod_ccre = cred_cod_ccre ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || ls_tipo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || as_nom_cond ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let c_query = trim(c_query) || order by cred_cod_ofic,10,1,4;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--return c_query ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--end procedure ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('PREPARE c_stmt FROM c_query;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DECLARE c_cur CURSOR FOR c_stmt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('OPEN c_cur ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while (1 = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FETCH c_cur INTO cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('numcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF (SQLCODE != 100) THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.ft_saldo_credito_fecha(clie_cod')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('numcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('EXIT;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END WHILE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CLOSE c_cur;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FREE c_cur;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FREE c_stmt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_quita_signo_numero(as_val char(15))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15) as numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_numero char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_pos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_largo = length(trim(as_val));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOR loop = 0 to li_largo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF substr(as_val')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ls_numero = substr(as_val')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_pos = loop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit for; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOR;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_numero = trim(ls_numero) || substr(as_val')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_numero;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure
informix.sp_cartera_reporte_seguro_desgravamen( ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(20) as categoria')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cate char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ide_clie char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_fec_nac ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_sal_cred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_num_paga char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT TITULAR as categoria')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie as numero_documento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ape_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(to_char(cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(to_char(cred_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_sal_cred as valor_asegurado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_paga as numerodelcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cate')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_num_cred = cred_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_clie = clie_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf = ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_apellido ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --let ls_primer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_cate')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cfam = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT CONYUGE as categoria')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cfam_ide_cfam as numero_documento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(cred_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_sal_cred as valor_asegurado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_paga as numerodelcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cate')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_num_cred = cred_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_clie = cfam_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cfam_cod_fami = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_fec_calf = ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cfam_cod_tcfa = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cfam_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_Cred = li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_apellido ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --let ls_primer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cfam >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_cate')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_prm_globales(lp_codigo_moneda integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as codigoefectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as codigotrancheque')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as valortrantrans')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as valordivisas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as codigotrannc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as codigospi1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as codigospi2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables de control de procedimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigo integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre char(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Variables (parametros globales) retorno de procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nomprm1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valprm1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codprm1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_6 = 0; --Parametro de cuenta de efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_7 = 0; --Parametro de cuenta de cheques del pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_11 = 0; --Parametro de cuenta transitoria de cheques')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_13 = 0; --Parametro de cuenta transitoria transferencia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_14 = 0; --Parametro de cuenta de posicion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_15 = 0; --Parametro de cuenta de divisas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_22 = 0; --Parametro de cheques devueltos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_21 = 0; --Parametro de transitoria debito/credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_400 = 0; --Cuenta Banco Central ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_401 = 0; --CUenta SPI1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_402 = 0; --CUenta SPI2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valorasu = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm8asu = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Recupera todos los parametros dinamicos segun el parametro de moneda ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select prms_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaprms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where prms_cod_prms = vprm_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vprm_cod_prms = ctap_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ctap_cod_mone = lp_codigo_moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ctap_cod_prms in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Almacena nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codigo = 6 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_6 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 7 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_7 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 13 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_13 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 11 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_11 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 14 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_14 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 15 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_15 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 22 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_22 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 21 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_21 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 400 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_400 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 401 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_401 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif codigo = 402 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let prm_402 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Verifica si ha estado definido parametros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_6 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm1 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_7 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm2 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm2 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm2 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_11 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm4 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm4 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm4 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_13 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm3 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm3 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm3 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_14 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm5 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm5 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm5= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_15 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm6 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm6 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm6 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_22 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm7 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm7 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm7 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_21 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm9 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm9 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm9 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_400 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm8 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm8 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm8 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_401 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm10 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm10 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm10 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if prm_402 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let codprm11 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let nomprm11 = ''No definido'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valprm11 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return codprm1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('codprm10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_nombre_oficina(ai_cod_ofic integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(50) as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nombre char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(ofic_nom_ofic)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ofic_cod_ofic = ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_nombre ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_reporte_ahorro_cert(ada_fecha date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_abdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ide_clie char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_rubr = ft_cod_parametros(1790);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_val_disp= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select abdv_val_abdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_abdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_num_cred = divc_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie = cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_divc = abdv_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tcdv_cod_tcdv = dpvi_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_pape = pape_cod_pape and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_divc = divc_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie = dpvi_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv = 8 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_eacd in(1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_pago in (select pago_cod_pago from bcapago where
pago_ctr_pago= 1) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(abdv_fec_abdv) = ada_fecha and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_rubr = 25 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_auxi is null')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_val_abdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select didv_val_ahor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select dpvi_sal_disp from bcadpvi where dpvi_cod_dpvi =
x.dpvi_dpv_Debi) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_abdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tcdv_cod_tcdv = dpvi_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie = clie_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv = ai_producto and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_dpvi = didv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' didv_cod_rubr = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' didv_cod_edid = 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_eacd in(1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' didv_Fec_venc <= ada_fecha ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_val_abdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_reporte_recuperacion(ada_Fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--returning char(2500) as scrip;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date as fechavenc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE c_query CHAR(2500);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numclie integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define clase char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define linea char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcred integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numdivc integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechapago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define rubro char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define oficina integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estadodiv integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define oficial char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codfpago integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofic = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofic = and cred_cod_ofic = || ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofct = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofct = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofct = and clie_cod_ofct = || ai_cod_ofct;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if as_cod_caja = ''XX'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_caja = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_caja = and and abdv_cod_pago in (select pdte_cod_pago from
bcapdte where pdte_cod_caja ''= || as_cod_caja || '');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_lcre = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_lcre = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_lcre = and cred_cod_lcre = || ai_cod_lcre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_tfpg = 99 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_tfpg = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_tfpg = and abdv_cod_pago in (select pdte_cod_pago from
bcapdte where pdte_cod_tfpg = || ai_cod_tfpg || ) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = select distinct clie_num_clie,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_ide_clie ,; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || trim(clie_ape_clie) || '' '' ||
nvl(trim(clie_nom_clie), '''') as nombres, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ccre_des_ccre,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || trim(lcre_desc_lcred) as
lcre_desc_lcred,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || cred_num_cred, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || divc_num_divc, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || divc_fec_venc, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || abdv_fec_abdv as divc_fec_pago,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || sum(abdv_val_abdv) as valor,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || trim(ft_llena_espacios(abdv_cod_rubr,2))
|| trim(rubr_des_rubr) as rubr_des_rubr,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || cred_cod_ofic, abdv_cod_ediv,
ft_nombre_oficial(clie_cod_ofct) as oficial, (select max(pdte_cod_tfpg) from
bcapdte where pdte_cod_pago = y.abdv_cod_pago) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || from bcaclie, bcacred, bcadivc x,
bcaccre, bcaabdv y , bcalcre, bcarubr ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || where clie_cod_clie = cred_cod_clie
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ccre_cod_ccre = cred_cod_ccre and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || lcre_cod_lcred = cred_cod_lcre and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || cred_num_cred = divc_num_cred and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || abdv_cod_rubr = rubr_cod_rubr and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || abdv_cod_pago in (select pago_cod_pago
from bcapago where pago_ctr_pago =1) and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || cred_cod_ecre in (0,1,2,3) and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || divc_cod_divc = abdv_cod_divc and ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || date(abdv_fec_abdv) between '' ||
ada_fec_inic || '' and '' || ada_fec_fina || '';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || and (abdv_sal_abdv is null or
abdv_sal_abdv = 0 ) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_caja; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofct;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_lcre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_tfpg;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || group by abdv_cod_rubr,rubr_des_rubr,
12,1,2,3,4,5,6,7,8,9, 13,14,15;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || order by cred_cod_ofic,
ccre_des_ccre,lcre_desc_lcred,clie_num_clie, cred_num_cred,divc_num_divc, 11;;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--return c_query ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('PREPARE c_stmt FROM c_query;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DECLARE c_cur CURSOR FOR c_stmt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('OPEN c_cur ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while (1 = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FETCH c_cur ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO numclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF (SQLCODE != 100) THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return numclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('EXIT;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END WHILE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CLOSE c_cur;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FREE c_cur;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FREE c_stmt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_conafis(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(20) as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_sal_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cuotas char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''1 a 3 Meses'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf = ada_Fec_inic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)<=3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)>0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ccre = ai_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''4 a 6 Meses'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf = ada_fec_inic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)<=6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)>3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ccre = ai_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''7 a 9 Meses'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf = ada_fec_inic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)<=9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)>6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ccre = ai_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''10 a 12 Meses'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf = ada_Fec_inic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)<=12')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)>9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ccre = ai_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''13 a 15 Meses'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf = ada_Fec_inic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)<=15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)>12')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ccre = ai_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''16 a 18 Meses'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf = ada_Fec_inic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)<=18')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)>15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ccre = ai_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''19 a 24''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf = ada_Fec_inic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)<=24')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)>18 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ccre = ai_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''25 a 36 Meses'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf = ada_Fec_inic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)>24')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)<=36')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ccre = ai_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''37 a 48 Meses'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf = ada_Fec_inic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)>36')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)<=48')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ccre = ai_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''49 a 60 Meses'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf = ada_Fec_inic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)>48')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)<=60')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ccre = ai_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ''Mayor 60 Meses'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf = ada_Fec_inic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (select count(divc_cod_divc)/(30/y.intv_num_dias) from bcadivc where
divc_num_cred = x.cred_num_cred)>60')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ccre = ai_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_historico_dpfi ()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---define li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_count integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---define ld_val_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_count ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afchdpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf )= today;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_count>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete afchdpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf )= today;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afchdpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(prpf_val_prpf) from bcaprpf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' current')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select pgpf_fec_fina from bcapgpf where pgpf_cod_rubr = 1 and
pgpf_cod_dpfi = x.dpfi_cod_dpfi and pgpf_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select pgpf_fec_inic from bcapgpf where pgpf_cod_rubr = 1 and
pgpf_cod_dpfi = x.dpfi_cod_dpfi and pgpf_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi x where dpfi_cod_edpf not in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_count ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afchdpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf )= today;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_count ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_codigo_actividadeconomica_nivel5( al_cod_clie
integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(7) as nombre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nivel5 char(7) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(ocup_sib_ocup)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_nivel5 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where acli_cod_clie = al_cod_Clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and acli_cod_tact = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ocup_cod_ocup in (select ocup_rec_ocup from bcaocup where
ocup_cod_ocup = z.acli_cod_ocup);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ls_nivel5 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_nivel5 =''NO DEFINIDO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_nivel5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end function')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_uaf_matrizlavadoactivos(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(13) as identificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as lugaroficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as fremes8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---returning date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define actividadecono char(7);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nacionalidad char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lugarresidencia char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ctaahorro char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ctacorriente char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define inversion char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define credito char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lugaroficina char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define canal char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define trxmes1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fremes1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_clie integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_mes_inicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define edad integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_codigo_actividadeconomica_nivel5(clie_cod_clie) as
actividadecono')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pais_nac_pais as nacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when (select count(*) from bcadpvi where dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else '''' end as ctaahorro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as ctacorriente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when (select count(*) from afchdpf where hdpf_est_dpfi in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else '''' end as inversion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when (select count(*) from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else '''' end as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select trim(ft_llena_espacios(ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''VTA'' as canal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(drie_val_drie) from afcdrie where drie_cod_clie =
x.clie_cod_clie and drie_cod_ineg = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(drie_val_drie) from afcdrie where drie_cod_clie =
x.clie_cod_clie and drie_cod_ineg = 2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_pais = pais_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie in (select dpvi_cod_clie from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --and clie_ape_clie like ''LUCAS G%''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let trxmes1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fremes1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes_inicio = month(ada_fec_inic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anio_inicio = year(ada_fec_inic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes_fin = month(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anio_fin = year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHILE li_mes_inicio > 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = li_mes_inicio||/01/||
li_anio_inicio ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_fina =
ft_fin_fecha_mes(li_mes_inicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_numtrans = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valortran = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sp_numregis_dpvi_fecha
(lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sp_numvalor_dpvi_fecha
(lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_numtrans = li_numtrans +
li_numero;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valortran = ld_valortran +
ld_Valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let trxmes1 = li_numtrans;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fremes1 = ld_valortran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li= 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let trxmes2 = li_numtrans;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fremes2 = ld_valortran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li= 3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let trxmes3 = li_numtrans;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fremes3 = ld_valortran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li= 4 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let trxmes4 = li_numtrans;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fremes4 = ld_valortran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li= 5 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let trxmes5 = li_numtrans;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fremes5 = ld_valortran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li= 6 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let trxmes6 = li_numtrans;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fremes6 = ld_valortran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li= 7 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let trxmes7 = li_numtrans;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fremes7 = ld_valortran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li= 8 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let trxmes8 = li_numtrans;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fremes8 = ld_valortran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li= 9 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let trxmes9 = li_numtrans;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fremes9 = ld_valortran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li= 10 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let trxmes10 = li_numtrans;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fremes10 = ld_valortran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li= 11 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let trxmes11 = li_numtrans;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fremes11 = ld_valortran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li= 12 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let trxmes12 = li_numtrans;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fremes12 = ld_valortran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li =li + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes_inicio = li_mes_inicio + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_mes_inicio> 12 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes_inicio = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anio_inicio = li_anio_inicio +
1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_fina = ada_fec_fina then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes_inicio = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --return lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END WHILE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trxmes1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fremes1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_contabilidad_reporte_saldo_cta(ac_cta_ini
char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15) as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_ccon char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nom_ctas char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_des_mese char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_debitos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select peri_mes_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ai_mes_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaperi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where peri_cod_peri = ai_mes_fin;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon >= ac_cta_ini')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon <= ac_cta_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ejer = ai_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and length(trim(ccon_cod_ccon)) <= ai_nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_sal_cta_mes(li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select *')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lc_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from t_saldos_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mese_cod_mese <= ai_mes_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_subtotal = ld_debitos - ld_creditos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_subtotal <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return lc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' drop table t_saldos_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create function informix.ft_proceso_cartera_comisiones(ai_cod_comi
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_ban_segu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_dias integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_fina date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select intv_num_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaintv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where intv_cod_intv =as_cod_intv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select comi_ban_segu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_ban_segu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacomi where comi_cod_comi = ai_cod_comi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dia_calc= ai_dia_calc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_segu is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ban_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_cert = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ad_porcentaje = round(ad_porcentaje')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_fina = ada_fec_inic + (li_num_dias* ai_num_cuot);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_num_dias = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_fina = ada_fec_ppag;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif (li_num_dias * ai_num_cuot) = 360 and li_dia_calc = 365
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_fina = ada_fec_inic+ li_dia_calc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_firl = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --Fondo irreparable de 200 a 5000 al 3% de 5001 en adelante al
2%.')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ad_cap_cred > 5000 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ad_porcentaje = 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = lda_fec_fina -ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_flat = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = li_dia_calc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' If li_dias >= li_dia_calc Then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor= (ad_cap_cred * ad_porcentaje)/100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_segu<> 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor= ((ad_cap_cred * ad_porcentaje) *
li_dias)/ (li_dia_calc*100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor= (ad_cap_cred * ad_porcentaje)/100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' End If')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_segu =1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_valor * ai_num_cuot;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if as_cod_intv =''B'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select gcob_val_gcob')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ad_porcentaje')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcgcob')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where gcob_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and gcob_cod_plaz = plaz_cod_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and plaz_cod_modu = 17')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ai_num_cuot between plaz_ini_plaz and plaz_fin_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and gcob_cod_mont= mont_cod_mont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mont_cod_modu = 17')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ad_cap_cred between mont_ini_mont and mont_fin_mont;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor= (ad_cap_cred * ad_porcentaje)/100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end FUNCTION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_reporte_productoscoactivas(ada_Fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(13) as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(30) as producto_financiero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE nombre char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE producto_financiero char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE numero_producto_financiero char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE moneda char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE estado char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(clie_ape_clie) || ||nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_des_tcdv as producto_financiero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_num_dpvi as numero_producto_financiero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''USD'' as moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case dpvi_cod_eacd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 1 then ''A''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''I'' end as estado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpvi_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_tcdv = tcdv_cod_tcdv AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(clie_ape_clie) || ||nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcre_desc_lcred as tipodeproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred || as numero_producto_financiero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_sal_cred as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''USD'' as moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''A'' as estado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_lcre = lcre_cod_lcred AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = calf_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_fec_Calf = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(clie_ape_clie) || ||nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''DPF'' as tipodeproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_num_dpfi || as numero_producto_financiero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_val_dpfi as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''USD'' as moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''A'' as estado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpfi_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_dpfi = hdpf_cod_dpfi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(hdpf_Fec_hdpfg) = ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_vipg_insumos_clientes(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(13) as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as nacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechacorte')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechanaci char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipocliente char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define genero char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estadocivil char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define edad integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nacionalidad char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ingresosmensuales decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define actividadeconomica char(7);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valactivos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ingresosdeclarados decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipodeproducto char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define canal char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define listascontrol char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define residencia char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codzonageo char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechacorte char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(clie_ape_clie) || ||nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case clie_nat_juri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 0 then ''N''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''J'' end as tipocliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_sexo as genero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_eciv as estadocivil')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_calculo_edad(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_nac_pais as nacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select max(ocup_sib_ocup) from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ocup_cod_ocup = acli_cod_ocup and acli_cod_clie =
x.clie_cod_clie and acli_cod_tact =1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ocup_fec_fina is null and ocup_rec_ocup is not null and
ocup_ban_ocup = 0 )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_des_tcdv as tipodeproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''VENTANILLA'' as canal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(''''' as listascontrol')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(ft_llena_espacios(prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(ft_llena_espacios((select prov_sib_prov from bcaprov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(date(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ingresosdeclarados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_sect = sect_cod_sect and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sect_cod_ciud = ciud_cod_ciud and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prov_cod_prov = ciud_cod_prov and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_cod_pais = clie_cod_pais and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = clna_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = dpvi_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_tcdv = tcdv_cod_tcdv AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let actividadeconomica = ft_quita_ceros(actividadeconomica);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ingresosdeclarados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(clie_ape_clie) || ||nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case clie_nat_juri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 0 then ''N''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''J'' end as tipocliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_sexo as genero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_eciv as estadocivil')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_calculo_edad(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_nac_pais as nacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select max(ocup_sib_ocup) from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ocup_cod_ocup = acli_cod_ocup and acli_cod_clie =
x.clie_cod_clie and acli_cod_tact =1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ocup_fec_fina is null and ocup_rec_ocup is not null and
ocup_ban_ocup = 0 )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcre_desc_lcred as tipodeproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''VENTANILLA'' as canal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(''''' as listascontrol')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(ft_llena_espacios(prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(ft_llena_espacios((select prov_sib_prov from bcaprov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(date(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ingresosdeclarados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_sect = sect_cod_sect and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sect_cod_ciud = ciud_cod_ciud and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prov_cod_prov = ciud_cod_prov and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_cod_pais = clie_cod_pais and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = clna_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_lcre = lcre_cod_lcred AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre in (0) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <=ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let actividadeconomica = ft_quita_ceros(actividadeconomica);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ingresosdeclarados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(clie_ape_clie) || ||nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case clie_nat_juri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 0 then ''N''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''J'' end as tipocliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_sexo as genero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_eciv as estadocivil')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_calculo_edad(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_nac_pais as nacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select max(ocup_sib_ocup) from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ocup_cod_ocup = acli_cod_ocup and acli_cod_clie =
x.clie_cod_clie and acli_cod_tact =1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ocup_fec_fina is null and ocup_rec_ocup is not null and
ocup_ban_ocup = 0 )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ding_val_deta from bcading where ding_cod_clie =
x.clie_cod_clie and ding_cod_ineg = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''DPF'' as tipodeproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''VENTANILLA'' as canal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(''''' as listascontrol')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(ft_llena_espacios(prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(ft_llena_espacios((select prov_sib_prov from bcaprov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(date(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ingresosdeclarados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_sect = sect_cod_sect and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sect_cod_ciud = ciud_cod_ciud and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prov_cod_prov = ciud_cod_prov and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_cod_pais = clie_cod_pais and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = clna_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = dpfi_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr) <= ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let actividadeconomica = ft_quita_ceros(actividadeconomica);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ingresosdeclarados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_vipg_insumo_transacciones(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechatransaccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define num_clie integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre char(100); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombreproducto char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define canal char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valortransaccion decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechatransaccion char(10) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipotransaccion char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorcredito decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechainicialcred char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechafinalcred char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuotapagadacred decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valordpf decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechainicialdpf char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechafinaldpf char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorrenovacion decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorprecancelacion decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define oficina char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechacorte char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || ||nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(tcdv_des_tcdv) as nombreproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''VENTANILLA'' as canal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_val_mcdv as deposito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(mcdv_fec_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(tran_des_tran) as tipotransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valorcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechainicialcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechafinalcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as cuotapagadacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valordpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechainicialdpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechafinaldpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valorrenovacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_nombre_oficina(mcdv_cod_ofic) as oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(date(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechatransaccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotapagadacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran = tran_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape not in (select pape_cod_pape from bcapape where
pape_cod_tran in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechatransaccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotapagadacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--CREDITOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Otorgacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || ||nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccre_Des_ccre) as nombreproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''VENTANILLA'' as canal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred as deposito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechatransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''OTORGACION CREDITO'' as tipotransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_Cred as valorcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as cuotapagadacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valordpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechainicialdpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechafinaldpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valorrenovacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_nombre_oficina(cred_cod_ofic) as oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(date(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechatransaccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotapagadacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ccre = ccre_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechatransaccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotapagadacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---Cancelaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || ||nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccre_des_ccre) as nombreproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''VENTANILLA'' as canal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as deposito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(pdte_fec_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''PAGO CUOTA CREDITO'' as tipotransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred as valorcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pdte_val_pdte as cuotapagadacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valordpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechainicialdpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechafinaldpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valorrenovacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_nombre_oficina(cred_cod_ofic) as oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(date(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechatransaccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotapagadacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ccre = ccre_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_cred = divc_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_divc = abdv_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pdte_cod_pago = abdv_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pdte_fec_pago between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechatransaccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotapagadacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---DPF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Nuevos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || ||nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''DPF'' as nombreproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''VENTANILLA'' as canal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as deposito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(dpfi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''DPF'' as tipotransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valorcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechainicialcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechafinalcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as cuotapagadacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_val_dpfi as valordpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(dpfi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select to_char(pgpf_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valorrenovacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_nombre_oficina(dpfi_cod_ofic) as oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(date(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechatransaccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotapagadacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_Fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_dpfi not in (select rvpf_cod_dpfi from bcarvpf)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechatransaccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotapagadacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- renovacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || ||nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''DPF'' as nombreproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''VENTANILLA'' as canal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as deposito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(dpfi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''RENOVACION DPF'' as tipotransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valorcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechainicialcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechafinalcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as cuotapagadacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valordpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(dpfi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select to_char(pgpf_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_val_dpfi as valorrenovacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_nombre_oficina(dpfi_cod_ofic) as oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(date(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechatransaccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotapagadacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_Fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_dpfi in (select rvpf_cod_dpfi from bcarvpf)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechatransaccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotapagadacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- cancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || ||nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''DPF'' as nombreproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''VENTANILLA'' as canal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as deposito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(depg_Fec_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''CANCELACION DPF'' as tipotransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valorcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechainicialcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' '''' as fechafinalcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as cuotapagadacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valordpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(dpfi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select to_char(pgpf_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as valorrenovacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' depg_val_depg as valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_nombre_oficina(dpfi_cod_ofic) as oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(date(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechatransaccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotapagadacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_dpfi = dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_pgpf = depg_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_fec_pago between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechatransaccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cuotapagadacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valorprecancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_vipg_insumo_empleados(ada_Fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(13) as identificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cargo char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define agencia char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaingreso char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define remuneracionmensual decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ingresosconyuge decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define otrosingresos decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define gastos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_ide_Clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' carg_nom_carg as cargo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_nom_ofic as oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(empl_fec_ingr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(drie_val_drie) from afcdrie where drie_cod_ineg = 1
and drie_cod_riec=1 and x.clie_cod_clie = drie_cod_clie) as remuneracionmensual')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(drie_val_drie) from afcdrie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(drie_val_drie) from afcdrie where drie_cod_ineg = 1
and drie_cod_riec<>1 and x.clie_cod_clie = drie_cod_clie) as otrosingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(drie_val_drie) from afcdrie where drie_cod_ineg = 2
and x.clie_cod_clie = drie_cod_clie) as gastos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(drie_val_drie) from afcdrie where drie_cod_ineg = 4
and x.clie_cod_clie = drie_cod_clie) as activos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(drie_val_drie) from afcdrie where drie_cod_ineg = 5
and x.clie_cod_clie = drie_cod_clie) as pasivos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into identificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaempl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where empl_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_carg = carg_cod_carg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_fec_sali is null')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return identificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE FUNCTION informix.ft_asu_parametros(al_cod_para integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING char(100) as parametros;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ll_cod_ctas INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_val_vprm char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(vprm_asu_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_val_vprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavprm ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where vprm_cod_prms = al_cod_para;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_val_vprm;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FUNCTION;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_creditos_concedidos(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as cod_ofct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define num_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ide_clie char(13) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define num_soli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cap_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define des_ecre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define por_segd decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cod_ocup char(7) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcheque char(30) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define provincia char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_venc integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_dias integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_sect integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define genero char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tasaefectiva decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE c_query CHAR(4500);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let cap_pagado = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let acreditado = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let cheque = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let numcheque =;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let comisiones = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let oficial = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valoranterior = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let depen= ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let cod_depe = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let provincia= ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num_venc = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dias = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let genero = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcaclna ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie not in (select clna_cod_clie from bcaclna);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_ban_canc = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_ban_canc = and cred_cod_ecre >=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_ban_canc = and cred_cod_ecre not in (3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ccre = 99 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccre = and cred_cod_ccre >0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccre = and cred_cod_ccre = || ai_cod_ccre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofic = and cred_cod_ofic > 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofic = and cred_cod_ofic = || ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let as_nom_cond = replace (trim(as_nom_cond)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if length(trim(as_nom_cond))> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let as_nom_cond = and || trim(as_nom_cond) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let as_nom_cond = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = SELECT clie_num_clie, clie_ide_clie,
clie_ape_clie, clie_nom_clie, cred_num_cred, cred_num_soli,
cred_num_paga, cred_fec_inic, cred_cap_cred, cred_tas_cred, cred_fec_venc,
intv_des_intv, cred_cod_intv, ecre_des_ecre, cred_cod_ecre, dtcr_des_dtcr,
cred_cod_dtcr, cred_por_segd,tcse_des_tcse, cred_cod_tcse,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || cred_cod_tcre,tamo_des_tamo,
cred_cod_tamo, cred_cod_mone, cred_cod_ccre, tvin_des_tvin, cred_cod_tvin,
tgar_des_tgar, cred_cod_tgar, usua_nom_usua, cred_cod_usua, cred_num_orec,
ofic_nom_ofic, cred_cod_ofic,cred_cod_clie, ffin_dec_ffin, cred_cod_ffin,
lcre_desc_lcred, cred_cod_lcre, cred_fec_pago, cred_cod_comp,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || cred_cod_iden, eope_des_eope,
cred_cod_eope, cred_cod_ocup, cred_num_cuot, nvl((select sum(divc_cap_pago) from
bcadivc where divc_num_cred = x.cred_num_cred ) ,0) as cap_pagado, nvl((select
sum(mcdv_val_mcdv) from bcamcdv where mcdv_cod_pape = x.cred_cod_pape),0) as
acreditado, nvl((select sum(orec_val_orec) from bcaorec where ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || orec_cod_orec=x.cred_num_orec),0) as
cheque, (select trim(clie_ape_clie) || '' '' || trim(cban_num_cban) || '' CH. Nº:''
|| chqs_num_chqs from bcaorec, bcachqs , bcamban, bcacban, bcaclie, bcabanc
where chqs_cod_chqs = orec_cod_chqs and chqs_cod_mban = mban_cod_mban and
mban_cod_cban = cban_cod_cban and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || cban_cod_banc = banc_cod_banc and
clie_cod_clie = banc_cod_clie and orec_cod_orec = x.cred_num_orec) as numcheque,
nvl((select sum(cocr_val_cocr) from bcacocr, bcacomi where comi_cod_comi =
cocr_cod_comi and cocr_num_cred = x.cred_num_cred),0) as comisiones,
ft_nombre_oficial(clie_cod_ofct) as oficial,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || nvl(clie_cod_ofct,2) as clie_cod_ofct,
ft_cartera_valor_credito_anterior(cred_num_cred) as valoranterior,
ft_nombre_garante(cred_num_cred) as garantes, nvl((select trim(depe_nom_depe) from
bcadepe, bcaclna, bcadecl where clna_cod_clna = decl_cod_clna and depe_cod_depe =
decl_cod_depe and clna_cod_clie = x.cred_cod_clie),;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || ''NO DEPENDENCIA'') as depen,
nvl((select depe_cod_depe from bcadepe, bcaclna, bcadecl where clna_cod_clna =
decl_cod_clna and depe_cod_depe = decl_cod_depe and clna_cod_clie =
x.cred_cod_clie),0) as cod_depe,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || nvl((select prov_nom_prov from bcaciud,
bcasect, bcaprov where sect_cod_ciud = ciud_cod_ciud and prov_cod_prov =
ciud_cod_prov and sect_cod_sect = x.cred_Cod_sect),''NO ASIGNADO'') as
provincia, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || nvl(clna_cod_sexo, ''N'') as genero ,
;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || nvl((select count(*) from bcadivc
where divc_num_cred = x.cred_num_cred and divc_cod_ediv = 2),0) as li_num_venc,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || nvl((select today - min(divc_fec_venc)
from bcadivc where divc_num_cred = x.cred_num_cred and divc_cod_ediv in
(1,2,3) ),0) as li_dias,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || cred_cod_sect, cred_tas_tea FROM
bcaclie, bcacred x, bcausua, bcaeope, bcatamo, bcaecre, bcadtcr, bcatgar,
bcatcse, bcaintv, bcalcre, bcaffin, bcatvin, bcaofic, bcaclna;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || WHERE cred_cod_clie = clie_cod_clie and
cred_cod_clie = clna_cod_clie and cred_fec_inic between '';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || ada_Fec_inic || '' and '' ||
ada_fec_fina || '' and cred_cod_usua = usua_cod_usua and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || cred_cod_ecre not in (4) and
cred_cod_eope = eope_cod_eope and tamo_cod_tamo = cred_cod_tamo and
cred_cod_ecre = ecre_cod_ecre and cred_cod_dtcr = dtcr_cod_dtcr and
cred_cod_tcse = tcse_cod_tcse and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || cred_cod_intv = intv_cod_intv and
cred_cod_lcre = lcre_cod_lcred and cred_cod_ffin = ffin_cod_ffin and
cred_cod_tvin = tvin_cod_tvin and cred_cod_tgar = tgar_cod_tgar and
cred_cod_ofic = ofic_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = trim(c_query ) || ls_ban_canc || ls_cod_ccre ||
ls_cod_ofic || trim(as_nom_cond) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('PREPARE c_stmt FROM c_query;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DECLARE c_cur CURSOR FOR c_stmt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('OPEN c_cur ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while (1 = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FETCH c_cur INTO num_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cod_tamo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF (SQLCODE != 100) THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_dias <0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN num_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cod_tamo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('EXIT;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END WHILE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CLOSE c_cur;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FREE c_cur;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FREE c_stmt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_contabilidad_saldo_diario(an_cod_ejer
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15) as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombrecuenta char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define expresado ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsctd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_cod_ctas = ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd <= ada_fechafin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_peri in (select peri_cod_peri from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon like as_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cuenta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsctd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_cod_ctas = ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd <= ada_fechafin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_peri in (select peri_cod_peri from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon like as_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cuenta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_liquidezestructural(ai_tipo integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(40) as grupo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_grupo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tind integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_Fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tind_des_tind as grupo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_nom_indi as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(indi_nom1_indi) || / || trim(indi_nom2_indi) as formula')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('round((vind_val_indi*100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vind_fec_vind')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_grupo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcvind')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where i.tind_cod_tind = t.tind_cod_tind')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vind_cod_indi = indi_cod_indi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tind_cod_dmon = ai_tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vind_fec_vind between ada_fec_inic and ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by vind_fec_vind')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_grupo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_i = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return LIQUIDEZ ESTRUCTURAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return LIQUIDEZ ESTRUCTURAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_vol_abso = (ld_val_vola * 2.5)* ld_Val_deno/100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return LIQUIDEZ ESTRUCTURAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_may_depo = sp_limites_depositos100(lda_fecha);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return LIQUIDEZ ESTRUCTURAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_mayor = ld_vol_abso;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_vol_abso < ld_may_depo then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_mayor = ld_may_depo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return LIQUIDEZ ESTRUCTURAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return LIQUIDEZ ESTRUCTURAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_i = 0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_i = li_i +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsl01_fechas(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(6) as codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_grupo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_nume')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tind integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_Fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_i ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lunes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct vind_fec_vind')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcvind')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where liqe_cod_liqe = vind_cod_indi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and vind_val_deno = liqe_cod_liqe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and vind_val_nume = liqe_cod_liqe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and vind_val_vola = liqe_cod_liqe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and vind_fec_vind between ada_fec_inic and ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by vind_fec_vind')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lunes = to_char(lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_i = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let martes = to_char(lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_i = 3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let miercoles = to_char(lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_i = 4 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let jueves = to_char(lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_i = 5 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let viernes = to_char(lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_i = li_i + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return FECH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_balancediario(an_cod_ejer integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15) as cuenta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_long integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ctas integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_ccon char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_moneda char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tcue char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_ejer integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_sal_anterior ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define mesanterior ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define grupo char(20) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let as_cod_ccon = trim(as_cod_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete comp_sal_cta where cod_ctas>0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--añadir las cuentas que se seleccionó')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into comp_sal_cta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon LIKE as_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_mone = ai_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = an_cod_ejer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_peri in (select peri_cod_peri from bcaperi where
peri_cod_ejer = an_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ctas = sctd_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd between ada_fechaini and ada_fechafin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into comp_sal_cta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon LIKE as_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_mone = ai_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = an_cod_ejer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ctas = sctd_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_peri<=an_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_peri in (select peri_cod_peri from bcaperi where
peri_cod_ejer = an_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into comp_sal_cta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon LIKE as_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_mone = ai_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = an_cod_ejer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_peri in (select peri_cod_peri from bcaperi where
peri_cod_ejer = an_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ctas = sctd_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd between ada_fechaini and ada_fechafin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into comp_sal_cta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon LIKE as_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_mone = ai_mone and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer = an_cod_ejer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ctas = sctd_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_peri<=an_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_peri in (select peri_cod_peri from bcaperi where
peri_cod_ejer = an_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end If;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select mone_des_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mone_cod_mone = ai_mone;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ejer_ani_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ejer_cod_ejer = an_cod_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select mese_des_mese ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into mesanterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where peri_mes_peri = mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_cod_peri=an_cod_peri;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select mese_des_mese ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into mesactual')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mese_cod_mese = month(ada_fechafin);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cont_cta_ingr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into cta_ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cont_cod_cont = ejer_cod_cont and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ejer_cod_ejer =an_cod_ejer; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from comp_sal_cta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --devolver los valores')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --let ld_valor = (ld_valor*ad_coti)/ai_expr;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct ccon_nom_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into grupo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where length(ccon_cod_ccon) = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ejer = an_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (ld_val_peri +(ld_val_debe- ld_val_cred))<>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (ld_val_peri +(ld_val_debe- ld_val_cred)) = 0 and
ls_cod_tcue=''A'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsl01(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(6) as codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_grupo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_nume')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tind integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_Fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_i ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lunes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha_ante = ada_Fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_j = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ante = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_codigo = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_val_vola = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select coop_cod_segm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_segm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select liqe_sib_liqe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_grupo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcvind')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where liqe_cod_liqe = vind_cod_indi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vind_val_deno = liqe_cod_liqe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vind_val_nume = liqe_cod_liqe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vind_val_vola = liqe_cod_liqe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and liqe_ban_liqe = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and vind_fec_vind between ada_fec_inic and ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by liqe_cod_liqe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_tind <> li_cod_ante then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ls_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_j = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_vola = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tind in (23')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor = round(ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor = round(ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_segm = 5 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if month(lda_fecha) <> month(ada_Fec_inic) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lunes = ld_valor ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_i = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let martes = ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_i = 3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let miercoles = ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_i = 4 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let jueves = ld_valor ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_i = 5 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let viernes = ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_segm = 5 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if month(lda_fecha) <> month(ada_Fec_inic) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_vola = ld_val_vola ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_vola = ld_val_vola + ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_j = li_j + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_vola = ld_val_vola + ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_j = li_j + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_codigo = ls_grupo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ante = li_cod_tind ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_i = li_i + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ls_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_valor_confirmar (ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldos_ante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldos = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_fec_inic <> ada_fec_fina then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dchv_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_saldos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadchv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcdv_cod_mcdv= dchv_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dchv_cod_mcdv>1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dchv_cod_modu in (5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_cod_tran in (8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (dchv_fec_esac >ada_fec_fina or dchv_fec_esac is null or
dchv_est_Actu= 5 )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv =ai_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv = tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cco_acti <> tcdv_cco_dxcf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_dpvi = ai_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldos is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldos = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldos_ante is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldos_ante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldos = ld_saldos + ld_saldos_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return ld_saldos ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_malareclasificacionddic(ada_fec date)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numerocredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_cred integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_Ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ddic_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcddic where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_fec_Calf = ada_fec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ddic_cod_Ediv = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ddic_fec_divc>= date(ada_fec) - 60')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_conteo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcddic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ddic_num_cred =li_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_fec_Calf = ada_fec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_num_divc< li_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_cod_Ediv =2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_conteo = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ediv = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ediv = 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcddic set ddic_cod_Ediv= li_cod_ediv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ddic_num_cred = li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_num_divc>= li_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_fec_Calf = ada_fec;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_conteo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num_divc = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ddic_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcddic where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_fec_Calf = ada_fec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ddic_cod_Ediv = 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcddic where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ddic_fec_Calf = ada_fec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_num_cred = li_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_num_divc = li_conteo then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcddic set ddic_cod_Ediv=1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ddic_num_cred = li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_fec_Calf = ada_fec;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_conteo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num_divc = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_mov_ctas(ada_fec_ini date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(15) as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nom_ctas char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_tdoc char(03);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_benefi char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_detalle varchar(255);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_aux_cta = '''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_fec_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (case dcom_cod_tasi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''D'' then dcom_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''C'' then dcom_valor * -1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end) as valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas = ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_tcue = ''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ejer = ai_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_fec_comp between ada_fec_ini and ada_fec_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon between ac_cta_ini and ac_cta_fin ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --let ld_total =0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lc_aux_cta <> lc_cod_ccon then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_total = sp_saldo_cuenta(li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_aux_cta = lc_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return lc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' comp_fec_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (case dcom_cod_tasi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''D'' then dcom_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''C'' then dcom_valor * -1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end) as valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp = dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas = ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_tcue = ''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ejer = ai_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_fec_comp between ada_fec_ini and ada_fec_fin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ccon between ac_cta_ini and ac_cta_fin ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lc_aux_cta <> lc_cod_ccon then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_total = sp_saldo_cuenta(li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_aux_cta = lc_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return lc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cuentas_volatilidad(ada_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning date as fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_i integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_encontrado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon char (15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_ccon char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_fec char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_fest date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_exp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_var_fond')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_Fec_fina = ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_i = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_var_fond = 21;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_Var_fond1 = 2101;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_Var_fond2 = 210135;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_Var_fond3 = 2103;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_var_fond4 = 2104;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_Var_fond5 = 2105;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while li_i <= 90')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_encontrado = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anio= year( lda_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = month( lda_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_dia = weekday(lda_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into an_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaejer where ejer_ani_ejer = li_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into an_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where peri_cod_ejer = an_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = li_mes - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dfes_fec_dfes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_fec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadfes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dfes_anio = li_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_FEc_fest = substr(ls_fec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_fest = lda_fec_fina then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_encontrado = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ada_fechaini = li_mes || /01/|| li_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_num_dia = 0 or li_num_dia = 7 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_encontrado = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_encontrado = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
sp_contabilidad_saldo_diario(an_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor1 = ld_Valor1 *- 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- return lda_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
sp_contabilidad_saldo_diario(an_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor2 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor2 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor2 = ld_Valor2 *- 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- return lda_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
sp_contabilidad_saldo_diario(an_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor3 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor3 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor3 = ld_Valor3 *- 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- return lda_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
sp_contabilidad_saldo_diario(an_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor4 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor4 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor4 = ld_Valor4 *- 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- return lda_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
sp_contabilidad_saldo_diario(an_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor5 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor5 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor5 = ld_Valor5 *- 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return lda_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_i = li_i + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_Fec_fina = lda_fec_fina - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END WHILE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure
informix.sp_captaciones_reportedetalladoanexo(ada_Fecha_ini date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--returning char(2500) as scrip;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as coddpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(50) as producto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE c_query CHAR(2500);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define coddpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estado integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcliente integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define activa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define producto char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaingreso char(10); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define direccion char(100) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define edad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define interes decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechanacimiento char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_sexo char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofic = and dpvi_cod_ofic > 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofic = and dpvi_cod_ofic = || ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_tcdv = 999 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_tcdv = and dpvi_cod_tcdv > 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_tcdv = and dpvi_cod_tcdv = || ai_cod_tcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = SELECT dpvi_cod_dpvi, dpvi_cod_clie, dpvi_num_dpvi,
dpvi_cod_eacd, clie_ide_clie, clie_num_clie,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || trim(clie_ape_clie) || '' '' ||
nvl(trim(clie_nom_clie),'''') as nombres ,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || case when dpvi_cod_eacd =1 then ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || sp_captaciones_ingresosegresos('' ||
ada_Fecha_ini || '','' || ada_fecha_fin || '', x.dpvi_cod_dpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || else 0 end as activa,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || case when dpvi_cod_eacd not in (1)
then ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || sp_captaciones_ingresosegresos('' ||
ada_Fecha_ini || '','' || ada_fecha_fin || '', x.dpvi_cod_dpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || else 0 end as inactiva,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || trim(ft_llena_espacios(dpvi_cod_tcdv,2))
||''-''||trim(tcdv_des_tcdv) as producto,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || date(clie_fec_ingr) as clie_fec_ingr,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_dir_domi, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || (year('' || ada_fecha_fin || '') -
year(clie_fec_nac)) as edad,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || sp_dpvi_provision(dpvi_cod_dpvi,'' ||
ada_fecha_fin || '') as interes ,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_fec_nac, dpvi_cod_ofic,
clna_cod_sexo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcadpvi x, bcaclie, bcatcdv, outer
bcaclna;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE dpvi_cod_clie = clie_cod_clie
AND;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || dpvi_cod_tcdv = tcdv_cod_tcdv and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_cod_clie = clna_cod_clie ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_tcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || order by dpvi_cod_tcdv, clie_num_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--return c_query ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('PREPARE c_stmt FROM c_query;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DECLARE c_cur CURSOR FOR c_stmt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('OPEN c_cur ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while (1 = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FETCH c_cur INTO ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coddpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('producto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF (SQLCODE != 100) THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (activa + inactiva+interes)>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN coddpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('producto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('EXIT;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END WHILE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CLOSE c_cur;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FREE c_cur;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FREE c_stmt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_providencias_judiciales_vipg(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(13) as identificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define producto_financiero char(30) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numero_producto_financiero char(15) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define moneda char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estado char(10) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into identificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = eacd_cod_eacd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv not in (1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return identificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_srirtf(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_tran char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_garantes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--let ad_val_parm = ft_cod_parametros (16);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_val_parm =5000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf3_transacciones where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf1_clientes where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf2_productos where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf4_bancos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---depositos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pape_cod_tran not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --and mcdv_cod_pape not in(select cred_cod_pape from bcacred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---tranferencias debitos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_tran in (37)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie <>(select max(dpvi_cod_clie) from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi not in (select stmp_cod_dpvi from bcastmp))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---transferencias creditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_tran in (12)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie <>(select max(dpvi_cod_clie) from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi not in (select stmp_cod_dpvi from bcastmp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi not in (select stmp_dpv_debi from bcastmp))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('having sum(valor)>=ad_val_parm;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---creditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(cred_cap_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_clie in (select clie from uaf0_socios)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---plazos fijos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct sum(depg_val_depg) as valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_edpf not in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_cod_pgpf = pgpf_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_dpfi = dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having sum(depg_val_depg) >= ad_val_parm ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(cred_cap_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_clie not in (select clie from uaf0_socios)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having sum(cred_cap_cred)>= ad_val_parm;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---plazos fijos renovaciones y cancelaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct sum(depg_val_depg) as valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_edpf not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_cod_pgpf = pgpf_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_dpfi = dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_fec_pago between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_clie not in (select clie from uaf0_socios)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having sum(depg_val_depg) >= ad_val_parm;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from uaf0_socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- transacciones captaciones ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(mcdv_fec_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(mcdv_num_mcdv)= 0 or mcdv_num_mcdv is null then
mcdv_cod_mcdv || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran in (14')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(mcdv_num_mcdv) end as numerotransacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN PAPE_COD_TRAN IN (24')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( clie_num_clie || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select max(cred_num_cred) from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_num_cred = divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_cod_divc = abdv_cod_divc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (abdv_cod_pape = y.mcdv_cod_pape or abdv_cod_pape = z.pape_pap_ante
or abdv_cod_divc = z.pape_cod_divc))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN PAPE_COD_TRAN IN (32) THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( clie_num_clie || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select max(cred_num_cred) from bcacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_cred = divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_divc = abdv_cod_divc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_divc = z.pape_cod_divc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_pago in (select pago_cod_pago from bcapago where
pago_ctr_pago = 0 and pago_fec_anul = date(z.pape_fec_pape)))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( clie_num_clie || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (37) then trunc(round(mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (10) and pape_cod_tran not in (43) then
trunc(round(mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 8 and (select count(*) from bcaddte where
ddte_cod_mcdv= y.mcdv_cod_mcdv and ddte_cod_tfpg = 1) >= 1 then trunc((select
round(SUM(DDTE_VAL_DDTE)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 43 then trunc(round(mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 9 then trunc(round(mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran =8 and (select count(*) from bcaddte where
ddte_cod_mcdv= y.mcdv_cod_mcdv and ddte_cod_tfpg in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- when pape_cod_tran = 10 then trunc(round(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as cheque')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 8 then nvl((trunc((select
round(SUM(DDTE_VAL_DDTE)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((trunc((select round(SUM(DDTE_VAL_DDTE)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trunc(round(mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 8 then ''03''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 9 then ''71''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =37 and mcdv_cod_tran = 37 then ''04''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =37 and mcdv_cod_tran = 12 then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =1then ''06''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =19 then ''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 5 then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 24 then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 59 then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 11 then ''05'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 54 then ''05'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 10 then ''04'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 53 then''04'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 43 then ''25'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 14 then ''05'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and pape_cod_tran = 55 then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 24 or pape_cod_tran = 47)
then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 32) then ''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 64) then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 64) then ''04''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 72) then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 74) then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 75) then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 73) then ''04''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 48 then ''23''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 3) then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 4) then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran in (24')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(( select distinct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_tgar in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_tgar in (10) then
ft_nombres_garantes(cred_num_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''SOBRE FIRMAS'' end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred w ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_cod_clie = 19882')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_cred = divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_divc = abdv_cod_divc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_pape = z.pape_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''593'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(coop_nom_coop) end as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select ft_llena_Espacios(dpvi_num_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi = y.mcdv_cod_dpvi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as dpvi_num_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_sib_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case when pape_cod_tran in (24')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''NA'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pape_cod_tran not in (13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- solo transferencias DEBITO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(mcdv_fec_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(mcdv_num_mcdv)= 0 or mcdv_num_mcdv is null then
mcdv_cod_mcdv || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(mcdv_num_mcdv) end as numerotransacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( clie_num_clie || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (37) then trunc(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (10) and pape_cod_tran not in (10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 8 and (select count(*) from bcaddte where
ddte_cod_mcdv= y.mcdv_cod_mcdv and ddte_cod_tfpg = 1) >= 1 then trunc((select
SUM(DDTE_VAL_DDTE) from bcaddte where ddte_cod_mcdv= y.mcdv_cod_mcdv and
ddte_cod_tfpg = 1))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 43 then trunc(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran =8 and (select count(*) from bcaddte where
ddte_cod_mcdv= y.mcdv_cod_mcdv and ddte_cod_tfpg in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 10 then trunc(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as cheque')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trunc(mcdv_val_mcdv) as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 8 then ''03''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 9 then ''71''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =37 and mcdv_cod_tran = 37 then ''04''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =37 and mcdv_cod_tran = 12 then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =1then ''06''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =19 then ''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 5 then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 24 then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 59 then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 11 then ''05'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 54 then ''05'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 10 then ''04'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 53 then''04'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 43 then ''25'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 14 then ''05'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and pape_cod_tran = 55 then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 24 or pape_cod_tran = 47)
then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 32) then ''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 64) then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 64) then ''04''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 72) then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 74) then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 75) then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 73) then ''04''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 48 then ''23''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 3) then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 4) then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''593'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(coop_nom_coop) end as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select dpvi_num_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi = y.mcdv_cod_dpvi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as dpvi_num_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_sib_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''NA'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pape_cod_tran in (37)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie <>(select max(dpvi_cod_clie) from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- solo transferencias CREDITO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(mcdv_fec_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(mcdv_num_mcdv)= 0 or mcdv_num_mcdv is null then
mcdv_cod_mcdv || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(mcdv_num_mcdv) end as numerotransacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( clie_num_clie || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (37) then trunc(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (10) and pape_cod_tran not in (10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 8 and (select count(*) from bcaddte where
ddte_cod_mcdv= y.mcdv_cod_mcdv and ddte_cod_tfpg = 1) >= 1 then trunc((select
SUM(DDTE_VAL_DDTE) from bcaddte where ddte_cod_mcdv= y.mcdv_cod_mcdv and
ddte_cod_tfpg = 1))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 43 then trunc(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran =8 and (select count(*) from bcaddte where
ddte_cod_mcdv= y.mcdv_cod_mcdv and ddte_cod_tfpg in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 10 then trunc(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as cheque')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trunc(mcdv_val_mcdv) as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 8 then ''03''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 9 then ''71''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =37 and mcdv_cod_tran = 37 then ''04''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =37 and mcdv_cod_tran = 12 then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =1then ''06''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran =19 then ''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 5 then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 24 then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 59 then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 11 then ''05'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 54 then ''05'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 10 then ''04'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 53 then''04'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 43 then ''25'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 14 then ''05'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and pape_cod_tran = 55 then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 24 or pape_cod_tran = 47)
then ''13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 32) then ''11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 64) then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 64) then ''04''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 72) then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 74) then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 75) then ''05''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 10 and (pape_cod_tran = 73) then ''04''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran = 48 then ''23''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 3) then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran = 11 and (pape_cod_tran = 4) then ''12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''593'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(coop_nom_coop) end as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when pape_cod_tran not in (53')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select dpvi_num_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi = y.mcdv_cod_dpvi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as dpvi_num_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_sib_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''NA'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pape_cod_tran in (37)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie <>(select max(dpvi_cod_clie) from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----2--- CREDITOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(cred_cap_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having sum(cred_cap_cred)>= ad_val_parm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--------descuentos roles')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(pdte_fec_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pago_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( clie_num_clie || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pdte_val_pdte as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as cheque')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pdte_val_pdte as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''13'' as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''593'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''NA'' as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''NA''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_sib_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''NA'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pago_cod_pago = abdv_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pago_cod_pago = pdte_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pago_ctr_pago = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_cod_divc = divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pdte_cod_pago= abdv_cod_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pdte_cod_tfpg not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pdte_fec_pago between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----nuevos creditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( clie_num_clie || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select nvl(trunc(round(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select nvl(round(sum(cocr_val_cocr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacocr where cocr_num_cred = y.cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_num_orec is null then 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else nvl((select nvl(trunc(round(orec_val_orec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select nvl(trunc(round(sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select nvl(trunc(round(orec_val_orec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select nvl(round(sum(cocr_val_cocr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacocr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cocr_num_cred = y.cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''11'' as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_tgar in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_tgar in (10) then ft_nombres_garantes(cred_num_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''SOBRE FIRMAS'' end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''593'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''NA'' as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''NA''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_sib_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''NA'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop =coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(cred_fec_inic) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_nombres =;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_cred = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---///renovaciones de creditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred || - || (select nvl(max(abdv_cod_pago)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc = abdv_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_reli = y.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv = y.cred_fec_inic)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( clie_num_clie || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select nvl(trunc(sum(abdv_val_abdv))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc = abdv_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_reli = y.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv = y.cred_fec_inic) as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as efectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as cheque')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select nvl(trunc(sum(abdv_val_abdv))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc = abdv_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_reli = y.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv = y.cred_fec_inic) as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''13'' as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_tgar in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_tgar in (10) then ft_nombres_garantes(cred_num_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''SOBRE FIRMAS'' end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''593'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''NA'' as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''NA''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NA''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and (select nvl(trunc(sum(abdv_val_abdv))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc = abdv_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_reli = y.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv = y.cred_fec_inic) <>0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(cred_fec_inic) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_nombres =;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_cred = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----3---PLAZOS FIJOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from uaf0_socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(dpfi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_num_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( clie_num_clie || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select trunc(sum(depg_val_depg)) from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select trunc(sum(depg_val_depg)) from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select trunc(sum(depg_val_depg)) from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trunc(dpfi_val_dpfi) as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''06'' as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(trim(clie_nom_clie))=0 or clie_nom_clie is null then
trim(clie_ape_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ape_clie) || || trim(clie_nom_clie) end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''593'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(coop_nom_coop) as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_llena_Espacios(dpfi_num_dpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''NA'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpfi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(dpfi_fec_inic) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- renovaciones polizas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select trim(to_char(max(depg_fec_pago)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_fec_pago between ada_fec_inic and ada_fec_fina) as
fectrasans')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_num_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios( clie_num_clie || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select trunc(sum(depg_val_depg)) from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_fec_pago between ada_fec_inic and ada_fec_fina and
depg_cod_tran not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select trunc(sum(depg_val_depg)) from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_fec_pago between ada_fec_inic and ada_fec_fina and
depg_cod_tran not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trunc(dpfi_val_dpfi) as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''12'' as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(trim(clie_nom_clie))=0 or clie_nom_clie is null then
trim(clie_ape_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ape_clie) || || trim(clie_nom_clie) end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''593'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(coop_nom_coop) as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_llena_Espacios(dpfi_num_dpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''NA'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpfi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf in (7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_dpfi in (select pgpf_cod_dpfi from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_fec_pago between ada_fec_inic and ada_fec_fina and
depg_cod_tran not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----ACREDITACIONES DE INTERES PLAZO FIJO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf3_transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as codtide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(depg_fec_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_num_dpfi || - || depg_cod_depg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(clie_num_clie || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when depg_cod_tfpg in (6) then trunc(depg_val_depg) else 0 end as
credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when depg_cod_tfpg in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when depg_cod_tfpg in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trunc(depg_val_depg) as valortotal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''12'' as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(trim(clie_nom_clie))=0 or clie_nom_clie is null then
trim(clie_ape_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ape_clie) || || trim(clie_nom_clie) end as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''593'' as paisdestino')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(coop_nom_coop) as nombreinstitu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_llena_Espacios(dpfi_num_dpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(ciud_cod_prov|| ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' coop_sib_codi as coop_sib_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''NA'' as csw')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as isd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpfi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_cod_tran in (5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_cod_pgpf = pgpf_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_dpfi = dpfi_cod_dpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(depg_fec_pago) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsci01(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(1) as tipoIdentificacionSujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as identificacionSujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(200) as nomApellidoNomRazonSocial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as canalRecepcion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaRecepcion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as tipoTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as concepto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as estadoReclamo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaRespuesta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as tipoResolucion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoIdentificacionSujeto char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacionSujeto char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nomApellidoNomRazonSocial char(200);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define canalRecepcion char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaRecepcion char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoTransaccion char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define concepto char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estadoReclamo char(1) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaRespuesta char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoResolucion char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define montoRestituido decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define interesMonto decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define totalRestituido decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_cod_tide as tipoIdentificacionSujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie as identificacionSujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(clie_ape_clie) || || trim(nvl(clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fptr_sib_fptr as canalRecepcion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(DREC_FEC_RECL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('loca_sib_loca as tipoTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcor_sib_dcor as concepto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('erec_sib_erec as estadoReclamo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(drec_fec_reso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(trre_sib_erec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(drec_val_mont ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(drec_Val_inte')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(drec_Val_tota')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoIdentificacionSujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('identificacionSujeto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nomApellidoNomRazonSocial ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('canalRecepcion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaRecepcion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tipoTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('concepto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('estadoReclamo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaRespuesta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tipoResolucion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('montoRestituido ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('interesMonto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('totalRestituido ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcfptr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where drec_Cod_fptr = fptr_cod_fptr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and loca_cod_loca = drec_cod_loca')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_Cod_clie = drec_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and drec_cod_dcor = dcor_cod_dcor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and erec_cod_erec = drec_cod_erec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and trre_Cod_trre = drec_cod_trre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and DREC_FEC_RECL between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacionSujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('canalRecepcion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('estadoReclamo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('interesMonto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure
informix.sp_cartera_reporte_creditos_anulados(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' char(50) as apellidos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' char(50) as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' char(13) as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' char(50) as clasecredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' integer as numoperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' char(15) as numpagare')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' char(15) as numsolicitud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date as fechainicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date as fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' char(20) as oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' integer as situacioncredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' char(20) as usuariocreacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' char(20) as usuarioanulacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' char(30) as observacion ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcliente integer; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define apellidos char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define nombres char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define clasecredito char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define numoperacion integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define numpagare char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define numsolicitud char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define fechainicio date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define fechavencimiento date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define capital decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define oficina char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define situacioncredito integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define usuariocreacion char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define usuarioanulacion char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define observacion char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define li_cod_ofic integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_cod_ofic= 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_des_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_paga')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_soli || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_nom_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usua_nom_usua as usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select usua_nom_usua from bcausua where usua_cod_usua =
y.crce_cod_usua) as usuarioanulacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clasecredito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechainicio ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usuariocreacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_cod_ccre = cred_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = crce_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ofic_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_usua= usua_cod_usua and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre = 4 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by cred_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clasecredito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechainicio ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usuariocreacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_des_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_paga')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_soli || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_nom_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usua_nom_usua as usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select usua_nom_usua from bcausua where usua_cod_usua =
y.crce_cod_usua) as usuarioanulacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clasecredito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechainicio ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usuariocreacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_cod_ccre = cred_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = crce_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ofic_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_usua= usua_cod_usua and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre = 4 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by cred_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clasecredito ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechainicio ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usuariocreacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_buror06(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char (1) as tipoidentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as identificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechanacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as genero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(100) as direccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as telefono')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(30) as provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(30) as canton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(32) as numerooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as tipoidentgarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as identgarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as tipoGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as causaelimigarantecodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentificacionsujeto char (1); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacionsujeto char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechanacimiento char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define genero char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define direccion char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define telefono char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define provincia char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define canton char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerooperacion char(32);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentgarantecodeudor char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identgarantecodeudor char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoGaranteCodeudor char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaelimigarantecodeudor char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define causaelimigarantecodeudor char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT CLIE_COD_TIDE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_sexo as genero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_dir_domi as direccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(ft_numero_telefonos(clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prov_nom_prov as provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciud_nom_ciud as canton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CRED_num_paga || ''''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_ide_cfam ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''G'' as tipoGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(''''' as fechaElimiGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(''''' as causaElimiGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoidentificacionsujeto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('direccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('identgarantecodeudor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM BCACLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = CLIE_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND CRED_COD_ECRE not IN (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND cfam_cod_clie = clie_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND CFAM_COD_TCFA = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cfam_cod_fami >0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf =ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_num_cred=0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoidentificacionsujeto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('direccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('identgarantecodeudor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---garante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT y.CLIE_COD_TIDE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(y.clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_sexo as genero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('y.clie_dir_domi as direccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(ft_numero_telefonos(y.clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prov_nom_prov as provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciud_nom_ciud as canton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CRED_NUM_paga || ''''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('z.clie_cod_tide as tipoidenconyuge')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--nvl((select cfam_cod_tide from bcacfam where cfam_cod_clie =
y.clie_cod_clie and cfam_cod_tcfa =1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('z.clie_ide_clie as ideconyuge')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--nvl((select cfam_ide_cfam from bcacfam where cfam_cod_clie =
y.clie_cod_clie and cfam_cod_tcfa =1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''G'' as tipoGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(''''' as fechaElimiGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(''''' as causaElimiGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoidentificacionsujeto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('direccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('identgarantecodeudor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM BCAgara')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE cred_COD_CLIE = y.CLIE_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and y.clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gara_num_Cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and y.clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND CRED_COD_ECRE not IN (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gara_cod_clie = z.clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf =ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--and cred_Fec_inic between ada_Fec_inic and ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoidentificacionsujeto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('direccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('identgarantecodeudor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_dir_domi as direccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(ft_numero_telefonos(clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prov_nom_prov as provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciud_nom_ciud as canton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CRED_NUM_paga || ''''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_ide_cfam ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''G'' as tipoGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(''''' as fechaElimiGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(''''' as causaElimiGaranteCodeudor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoidentificacionsujeto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('direccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('identgarantecodeudor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM BCACLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_COD_CLIE = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND CRED_COD_ECRE not IN (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND cfam_cod_clie = gara_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND CFAM_COD_TCFA = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cfam_cod_fami >0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and gara_num_Cred = cred_num_Cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf =ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--and cred_Fec_inic between ada_Fec_inic and ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoidentificacionsujeto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('direccion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('identgarantecodeudor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_amortizacion_credito( as_cod_intv char(1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_int_cap ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_int_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_int_extra')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_cap_cred = ad_cap_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_cap_tota =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--/* selecci�n del intervalo de dias para pagar*/')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select intv_num_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_int_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaintv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where intv_cod_intv = as_cod_intv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--/*Se determina el valor de cada cuota')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_cap_cuot = (ad_cap_cred/al_num_cuot);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--/*Se establece la primera fecha de asignacion del credito*/')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fec_pago= ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_cap_cuot= round(ld_cap_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--// Obtiene n�mero de d�as de a�o base')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tamo_dia_tamo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_bas_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatamo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tamo_cod_tamo= ai_cod_tamo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_bas_dias is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_bas_dias = ft_cod_parametros(9);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('If li_bas_dias<= 0 Then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Return;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('End If')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_nct_grac is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ai_nct_grac = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cuotas = al_num_cuot;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_tamo = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --/*cuotas variables*/')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --/*Se llena la tabla de amortizaci�n*/')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_divc = ld_Cap_cuot;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' for ll_for = 1 to li_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = ada_fec_ppag;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_for_pago = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = lda_fec_pago + li_int_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = ft_calculo_fecha(lda_fec_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- //Calcula los dias exactos entre los pagos para generar el
interes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha1= ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha2= lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha1 = lda_fec_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha2 = lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_dias = ld_fecha1 - ld_fecha2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_dias = abs(ll_num_dias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_calc=( ld_cap_cred * ad_tas_cred *
ll_num_dias)/(li_bas_dias * 100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = ada_fec_inic - lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = abs(ll_ran_dias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = ft_cuenta_cartera(al_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if as_cod_tcse =''FP'' then --seguro prorrateado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = round((ad_cap_cred *
ad_por_segd)/al_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse =''FF'' then --seguro inh')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = round(ad_cap_cred * ad_por_segd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''NA'' then --seguro en cadadividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''PA'' then ---pago anticipado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''SD'' then ---pago antes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = round((ld_cap_cred *ad_por_segd *
ll_num_dias)/30')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_nct_grac < ll_for then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cuot = ld_cap_divc ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cuot = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cred = ld_cap_cred - round(ld_cap_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_tota = ld_cap_tota + ld_cap_cuot;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_ante = lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = li_cuotas then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_tota = ad_cap_cred - ld_cap_tota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cuot= ld_cap_cuot + ld_cap_tota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ll_for')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end for;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_tamo = 2 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_periodos = li_bas_dias /li_int_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_fijo = ad_tas_cred/li_periodos/100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_cap = ft_calcula_base_exponente((1/(1+ld_int_fijo))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_cap = round((ld_cap_cred / ((1 -ld_int_cap)/ld_int_fijo))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---/*Se llena la tabla de amortizaci�n*/')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' for ll_for= 1 to li_cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = ada_fec_ppag;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_for_pago = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = lda_fec_pago + li_int_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = ft_calculo_fecha(ada_fec_ppag ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha1 = ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha2 = lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha1 = lda_fec_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha2 = lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_dias = ld_fecha1 - ld_fecha2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_dias = abs(ll_num_dias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_calc = ld_cap_cred * ad_tas_cred * ll_num_dias /
(li_bas_dias * 100 );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = ada_fec_inic - lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = abs(ll_ran_dias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = ft_cuenta_cartera(al_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if as_cod_tcse =''FP'' then --seguro prorrateado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = round((ad_cap_cred *
ad_por_segd)/al_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse =''FF'' then --seguro inh')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu= round(ad_cap_cred * ad_por_segd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''NA'' then --seguro en cada dividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''PA''then ---pago anticipado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''SD'' then ---pago antes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = round((ld_cap_cred *ad_por_segd *
ll_num_dias)/30')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_extra= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_num_dias > li_int_dias then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_extra= ld_cap_cred * ad_tas_cred *
(ll_num_dias - li_int_dias) / (li_bas_dias * 100 );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_nct_grac < ll_for then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cuot = ld_int_cap- ld_int_calc + ld_int_extra
;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cuot = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cred = ld_cap_cred - ld_cap_cuot;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_tota = ld_cap_tota + ld_cap_cuot ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = li_cuotas then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_tota = ad_cap_cred - ld_cap_tota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cuot = ld_cap_cuot + ld_cap_tota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ll_for')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_ante = lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end for;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_tamo = 3 then -- /*Pago al Vencimiento*/')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cuot = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' for ll_for= 1 to al_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = ada_fec_ppag;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_for_pago = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = lda_fec_pago + li_int_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = ft_calculo_fecha(lda_fec_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha1 = ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha2 = lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_venc = ld_fecha1 + (al_num_cuot *
li_int_dias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = month(lda_fec_venc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anio = month(lda_fec_venc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = month(ld_fecha1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_venc = date(li_mes || / || li_dias || / ||
li_anio);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_dias = ld_fecha1 - lda_fec_venc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_dias = abs(ll_num_dias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_calc=( ld_cap_cred * ad_tas_cred *
ll_num_dias)/(li_bas_dias * 100)/ al_num_cuot;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha1 = lda_fec_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha2 = lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = ada_fec_inic - lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = abs(ll_ran_dias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = ft_cuenta_cartera(al_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if as_cod_tcse =''FP'' then --seguro prorrateado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = round((ad_cap_cred *
ad_por_segd)/al_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse =''FF'' then --seguro inh')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = round(ad_cap_cred * ad_por_segd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''NA'' then --seguroen cada dividendolet
ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''PA'' then ---pago anticipado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''SD'' then ---pago antes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = round((ld_cap_cred *ad_por_segd *
ll_num_dias)/30')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- let ld_cap_cred = ld_cap_cred - ld_cap_cuot;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- let ld_cap_tota = ld_cap_tota + ld_cap_cuot;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = al_num_cuot then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_tota = ad_cap_cred - ld_cap_tota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cuot = ld_cap_cuot + ld_cap_tota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ll_for')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_ante = lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end for;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_tamo = 4 then -- Pagos fin de mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_fijo = ad_tas_cred/(li_bas_dias * 100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' for ll_for= 1 to al_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --if ll_for = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- let lda_fec_pago = ada_fec_ppag;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = month(lda_fec_pago);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anio = year(lda_fec_pago);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = day(lda_fec_pago);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_mes = 12 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anio =li_anio + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_mes < 12 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = li_mes + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_mes = 2 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if mod(li_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = 29;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = 28;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_mes = 1 or li_mes =3 or li_mes =5 or li_mes =7 or
li_mes =8 or li_mes =10 or li_mes =12 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias= 31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = 30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = date(li_mes || / || li_dias
||/ ||li_anio);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_dias = li_int_dias;let ll_num_dias =
abs(ll_num_dias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_calc = ld_cap_cred * ld_int_fijo * ll_num_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_n = al_num_cuot - (ll_for -1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_cap = 1+(ld_int_fijo * ll_num_dias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_cap = ((ft_calcula_base_exponente(ld_int_cap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cuot = round(ld_cap_cred * (1/ld_int_cap)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = ada_fec_inic - lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = abs(ll_ran_dias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = ft_cuenta_cartera(al_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if as_cod_tcse =''FP'' then --seguro prorrateado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = round((ad_cap_cred *
ad_por_segd)/al_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse =''FF'' then --seguro inh')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu= round(ad_cap_cred * ad_por_segd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''NA'' then --seguro en cada dividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''PA'' then ---pago anticipado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''SD'' then ---pago antes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = round((ld_cap_cred *ad_por_segd *
ll_num_dias)/30')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cred = ld_cap_cred - ld_cap_cuot;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_tota = ld_cap_tota + ld_cap_cuot;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = al_num_cuot then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_tota = ad_cap_cred - ld_cap_tota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cuot = ld_cap_cuot + ld_cap_tota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ll_for')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end for;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_tamo = 5 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --/*cuotas variables pagos fin de mes*/')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --/*Se llena la tabla de amortizaci�n*/')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' for ll_for = 1 to al_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = ada_fec_ppag;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = month(lda_fec_pago);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anio = year(lda_fec_pago);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = day(lda_fec_pago);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_mes = 12 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anio =li_anio + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' li_mes < 12 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = li_mes + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_mes = 2 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if mod(li_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = 29;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = 28;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_mes = 1 or li_mes =3 or li_mes =5 or li_mes =7 or
li_mes =8 or li_mes =10 or li_mes =12 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias= 31;else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias = 30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_pago = date(li_mes || / ||
li_dias ||/ ||li_anio);end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_dias = li_int_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_dias = abs(ll_num_dias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_calc=( ld_cap_cred * ad_tas_cred *
ll_num_dias)/(li_bas_dias * 100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = ada_fec_inic - lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ran_dias = abs(ll_ran_dias);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = ft_cuenta_cartera(al_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if as_cod_tcse =''FP'' then --seguro prorrateado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = round((ad_cap_cred *
ad_por_segd)/al_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse =''FF'' then --seguro inh')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = round(ad_cap_cred * ad_por_segd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''NA'' then --seguro en cada dividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''PA'' then ---pago anticipado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif as_cod_tcse = ''SD'' then ---pago antes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_segu = round((ld_cap_cred *ad_por_segd *
ll_num_dias)/30')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cred = ld_cap_cred - round(ld_cap_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_tota = ld_cap_tota + ld_cap_cuot;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_ante = lda_fec_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_for =al_num_cuot then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_tota = ad_cap_cred - ld_cap_tota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_cuot = ld_cap_cuot+ ld_cap_tota;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ll_for')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end for;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_malareclasificacion(ada_fec date)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numerocredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_cred integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_Ediv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc where divc_cod_Ediv = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_fec_venc>= date(ada_fec) - 30')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_Cred in (select cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred where cred_cod_ecre in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_conteo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_Cred =li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_divc< li_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv =2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_conteo = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ediv = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ediv = 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc set divc_cod_ediv= li_cod_ediv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_divc>= li_num_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_saldos_dpvi_d01(lda_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(2) as tipocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipocuenta char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerocuenta char(15) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct trim(tcap_cod_siba) as tipocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between lda_fec_inic and
lda_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between lda_fec_inic and
lda_fec_fina) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv= tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tcap = tcap_cod_tcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tcdv not in (1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between lda_fec_inic and
lda_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between lda_fec_inic and
lda_fec_fina) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE procedure informix.sp_bcetin(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---MODIFICADO POR:Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---FECHA 14 marzo 2024')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Nuevos parametros de lineas de credito y ventas para el tipo de
credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as codsegcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as moneda ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(7) as actividadeconomica')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as tipogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaconcesion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipocredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define actividadeconomica char(7) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tasainteresnominal ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codsegcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define descripcionoperacion char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerocredvigentes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estadooperacion char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define parroquia char(6);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define sexo char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigooficina char(5);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define edad decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define destinogeografico char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechanacimiento chaR(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nivelestudio char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_Clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorasociado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN CRED_COD_CCRE = 1 THEN 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN CRED_COD_CCRE= 2 THEN 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN CRED_COD_CCRE = 3 THEN 7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when CRED_COD_CCRE =9 then 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when CRED_COD_CCRE = 4 and lcre_por_enca = 4 then 10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 4 and lcre_por_enca = 5 then 11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 4 and lcre_por_enca = 6 then 12')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else 12 end as codsegCredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE CRED_COD_CCRE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 1 THEN ''1401''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 2 THEN ''1402''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 3 THEN ''1403''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 4 then ''1404'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 9 then ''1473'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''1404'' end as codctasCredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN CRED_COD_CCRE =1 THEN ''CY''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE=2 then ''CO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE =3 then ''IN''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 9 then ''EV''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 4 and lcre_por_enca = 4 then ''MM''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 4 and lcre_por_enca = 5 then ''MS''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 4 and lcre_por_enca = 6 then ''MA''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''MM'' end as tipoCredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 1 as moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_venc - cred_fec_inic as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_tas_cred as tasaInteresNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_tasa_efectiva(cred_tas_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 1 as cantidadcreditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' intv_num_dias as frecuenciapagos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as periodoreajuste')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred as valorprincipal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select obcr_ing_obcr from bcaobcr where obcr_num_cred=
y.cred_num_Cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case cred_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else eope_sib_eope end as estadooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when clie_nat_juri = 1 then ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clna_cod_intr end as nivelestudio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case CRED_COD_CCRE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 9 then ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_nivelactividadeconomica(cred_cod_ocup)) end as
actividadEconomica')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(dtcr_sib_dtcr)=0 then CT')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when dtcr_sib_dtcr =''MV'' then ''CT''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when dtcr_sib_dtcr =''MC'' then ''CT''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else dtcr_sib_dtcr end asdestinoFinanciero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case CRED_COD_CCRE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then (select dcre_sib_dcre from afcdcre where dcre_cod_dcre =
y.cred_cod_dcre)else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''0'' end as destinohipotecario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case cred_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then (select dcre_sib_dcre from afcdcre where dcre_cod_dcre=
y.cred_cod_dcre)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''0'' end as destinoconsumo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case cred_cod_tgar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then ''A11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''A12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''A13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''A11'' end as tipogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_ecre = 3 then nvl((select gtcr_val_gtcr from
bcagtcr where gtcr_num_cred = y.cred_num_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as valorcomercial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_ecre = 3 then nvl((select gtcr_val_gtcr from
bcagtcr where gtcr_num_cred = y.cred_num_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as valormetrogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''OD'' as instrumentada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when cred_cod_ccre = 4 then ''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''P'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end as tipoidentificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsoc_sib_tsoc as tipoPersona')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''A'' tasareferencialajuste')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(ft_llena_espacios(prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_sib as codigooficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''1'' as destinogeografico')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0.0 valorencaje')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select case clna_cod_sexo when ''X'' then ''0'' else clna_cod_sexo
end from bcaclna where clna_cod_clie = x.clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into codsegcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' codigooficina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred y')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_nat_juri = tsoc_cod_tsoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and eope_cod_eope = cred_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ccre = ccre_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ofic_cod_ofic = cred_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_lcre = lcre_cod_lcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_dtcr = dtcr_cod_dtcr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ecre not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_eope<= 2 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into numerocredvigentes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_cod_ecre not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_fec_inic<= ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerocredvigentes is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerocredvigentes = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(divc_cap_divc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_cod_ecre not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_fec_inic<= ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldo is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if plazo < frecuenciapagos then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let plazo = frecuenciapagos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if totalingresos = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let totalingresos = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ccre = 4 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let totalingresos = totalingresos *12;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return codsegcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('parroquia ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN CRED_COD_CCRE = 1 THEN 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN CRED_COD_CCRE= 2 THEN 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN CRED_COD_CCRE = 3 THEN 7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when CRED_COD_CCRE =9 then 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when CRED_COD_CCRE = 4 and lcre_por_enca = 4 then 10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 4 and lcre_por_enca = 5 then 11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 4 and lcre_por_enca = 6 then 12')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else 12 end as codsegCredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE CRED_COD_CCRE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 1 THEN ''1401''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 2 THEN ''1402''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 3 THEN ''1403''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 4 then ''1404'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 9 then ''1473'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''1404'' end as codctasCredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN CRED_COD_CCRE =1 THEN ''CY''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE=2 then ''CO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE =3 then ''IN''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 9 then ''EV''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 4 and lcre_por_enca = 4 then ''MM''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 4 and lcre_por_enca = 5 then ''MS''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 4 and lcre_por_enca = 6 then ''MA''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''MM'' end as tipoCredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 1 as moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_venc - cred_fec_inic as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_tas_cred as tasaInteresNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_tasa_efectiva(cred_tas_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 1 as cantidadcreditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' intv_num_dias as frecuenciapagos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as periodoreajuste')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred as valorprincipal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select obcr_ing_obcr from bcaobcr where obcr_num_cred=
y.cred_num_Cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case cred_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else eope_sib_eope end as estadooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when clie_nat_juri = 1 then ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clna_cod_intr end as nivelestudio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case CRED_COD_CCRE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 9 then ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_nivelactividadeconomica(cred_cod_ocup)) end as
actividadEconomica')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(dtcr_sib_dtcr)=0 then CT')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when dtcr_sib_dtcr =''MV'' then ''CT''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when dtcr_sib_dtcr =''MC'' then ''CT''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else dtcr_sib_dtcr end asdestinoFinanciero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case CRED_COD_CCRE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then (select dcre_sib_dcre from afcdcre where dcre_cod_dcre =
y.cred_cod_dcre)else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''0'' end as destinohipotecario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case cred_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then (select dcre_sib_dcre from afcdcre where dcre_cod_dcre=
y.cred_cod_dcre)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''0'' end as destinoconsumo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case cred_cod_tgar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then ''A11''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then ''A12''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 3 then ''A13''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''A11'' end as tipogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_ecre = 3 then nvl((select gtcr_val_gtcr from
bcagtcr where gtcr_num_cred = y.cred_num_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as valorcomercial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_ecre = 3 then nvl((select gtcr_val_gtcr from
bcagtcr where gtcr_num_cred = y.cred_num_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 0 end as valormetrogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''OD'' as instrumentada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when cred_cod_ccre = 4 then ''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''P'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end as tipoidentificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsoc_sib_tsoc as tipoPersona')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''A'' tasareferencialajuste')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(ft_llena_espacios(prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_sib as codigooficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''1'' as destinogeografico')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0.0 valorencaje')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select case clna_cod_sexo when ''X'' then ''0'' else clna_cod_sexo
end from bcaclna where clna_cod_clie = x.clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into codsegcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' parroquia ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred y')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_nat_juri = tsoc_cod_tsoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ccre = ccre_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ofic_cod_ofic = cred_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_lcre = lcre_cod_lcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and eope_cod_eope = cred_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_dtcr = dtcr_cod_dtcr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ecre in (3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_eope<=2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_fec_pago>ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into numerocredvigentes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_cod_ecre not in (3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_fec_inic<= ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerocredvigentes is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerocredvigentes = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(divc_cap_divc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_cod_ecre in (3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_fec_inic<= ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldo is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if plazo < frecuenciapagos then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let plazo = frecuenciapagos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if totalingresos = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let totalingresos = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ccre = 4 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let totalingresos = totalingresos *12;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return codsegcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nivelestudio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('parroquia ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- pasivas plazo fijo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select to_char(pgpf_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_tas_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1 as cantidadcreditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_val_dpfi as valorprincipal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(drie_val_drie) from afcdrie where drie_cod_ineg = 1 and
drie_cod_clie = x.clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when (select count(*) from bcarvpf where rvpf_cod_dpfi =
y.dpfi_cod_dpfi)>0 then ''V''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''N'' end as estadooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when tsoc_sib_tsoc =''J'' then ''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clna_cod_intr end as nivelestudio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as tipogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(ft_llena_espacios(prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_sib as codigooficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''1'' as destinogeografico')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0.0 as valorencaje')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when tsoc_sib_tsoc =''J'' then ''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clna_cod_sexo = ''X'' then ''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else nvl(clna_cod_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into codsegcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('instrumentada ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tipopersona ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpfi y')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpfi_cod_edpf not in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ofic_cod_ofic = dpfi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clna_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_nat_juri = tsoc_cod_tsoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_Fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if plazo <30 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let plazo = 30 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if totalingresos = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let totalingresos = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return codsegcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('instrumentada ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tipopersona ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- pasivas depositos a la vista ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case tcap_cod_tcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 1 then 210135')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as tasaInteresNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as tasaEfectivaAnual')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('count(*) as cantidadcreditos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum(mcdv_val_mcdv) as valorprincipal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as totalingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0''as estadooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as nivelestudio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as actividad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as tipogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''000000'' as parroquia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as codigooficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''1'' as destinogeografico')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0.0 as valorencaje')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as fechanacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0.00')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into codsegcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tipopersona ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi y')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpvi_cod_tcdv = tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tcap = tcap_cod_tcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv not in (1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_cod_tran in (8)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcap_cod_tcap < 2 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tpdv = 6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select min(tadv_tas_acti) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tasaInteresNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatadv where tadv_cod_tcdv = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let tasaEfectivaAnual =tasaInteresNominal;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if valorprincipal <=0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valorprincipal = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return codsegcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_reporte_solicitudes(ada_FEc_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as identificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(50)as apellidos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(50) as nombres ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numsolicitud ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as estado ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date as fechaingreso ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date as fechaaprobacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as usuario ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as usuarioaprobacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as vinculacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as cuotas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define apellidos char(50) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numsolicitud integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define capitalsolicitado decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define capitalaprobado decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaingreso date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaaprobacion date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define usuario char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estado char(20) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define usuarioaprobacion char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define vinculacion char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuotas integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_Cod_esol<>99 and ai_cod_usua>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_num_socr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_cap_socr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_cap_apro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' esol_des_esol')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_fec_ingr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(dsoc_fec_apro) from ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' afcdsoc where dsoc_cod_socr= bcasocr.socr_cod_socr) as
socr_fec_apro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usua_nom_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(dsoc_cod_usua) from afcdsoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bcasocr.socr_cod_socr=dsoc_cod_socr) as usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tvin ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 4 then ''NO VINCULADO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''VINCULADO''end as causalvin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = socr_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usua_cod_usua = socr_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' esol_cod_esol = socr_cod_esol and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_cod_usua = ai_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_cod_esol = ai_Cod_esol and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_fec_ingr between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by socr_cod_esol')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif ai_Cod_esol<>99 and ai_cod_usua=0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_num_socr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_cap_socr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_cap_apro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' esol_des_esol')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_fec_ingr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(dsoc_fec_apro) from ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' afcdsoc where dsoc_cod_socr= bcasocr.socr_cod_socr) as
socr_fec_apro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usua_nom_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(dsoc_cod_usua) from afcdsoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bcasocr.socr_cod_socr=dsoc_cod_socr) as usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tvin ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 4 then ''NO VINCULADO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''VINCULADO''end as causalvin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = socr_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usua_cod_usua = socr_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' esol_cod_esol = socr_cod_esol and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_cod_esol = ai_Cod_esol and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_fec_ingr between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by socr_cod_esol')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif ai_Cod_esol=99 and ai_cod_usua=0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_num_socr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_cap_socr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_cap_apro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' esol_des_esol')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_fec_ingr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(dsoc_fec_apro) from ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' afcdsoc where dsoc_cod_socr= bcasocr.socr_cod_socr) as
socr_fec_apro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usua_nom_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(dsoc_cod_usua) from afcdsoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bcasocr.socr_cod_socr=dsoc_cod_socr) as usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tvin ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 4 then ''NO VINCULADO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''VINCULADO''end as causalvin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = socr_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usua_cod_usua = socr_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' esol_cod_esol = socr_cod_esol and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_fec_ingr between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by socr_cod_esol')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif ai_Cod_esol=99 and ai_cod_usua>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_num_socr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_cap_socr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_cap_apro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' esol_des_esol')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_fec_ingr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(dsoc_fec_apro) from ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' afcdsoc where dsoc_cod_socr= bcasocr.socr_cod_socr) as
socr_fec_apro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usua_nom_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(dsoc_cod_usua) from afcdsoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bcasocr.socr_cod_socr=dsoc_cod_socr) as usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tvin ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 4 then ''NO VINCULADO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''VINCULADO''end as causalvin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = socr_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' usua_cod_usua = socr_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_cod_usua = ai_cod_usua and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' esol_cod_esol = socr_cod_esol and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' socr_fec_ingr between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by socr_cod_esol')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sepsb13(ada_Fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nivel integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigo char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define total decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estado integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define elemento char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipocuenta char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ctas integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define an_cod_peri integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define an_cod_ejer integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_sal_peri decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_natu char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO an_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ejer_ani_ejer = year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO an_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where peri_cod_ejer = an_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri = month(ada_fec_fina) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let an_cod_peri = an_cod_peri - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ada_fec_inic = MONTH(ada_fec_fina) || /01/ || year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete comp_sal_ctab13 where cod_ctas>0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into comp_sal_ctab13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct ccon_cod_ctas as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon) as codigo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' length(x.ccon_cod_ccon) as nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when substr(ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when (select ccon_cod_ccon from bcaccon where ccon_cod_ctas
=x.ccon_cod_ctas and ccon_cod_ccon like ''74%'') = ccon_cod_ccon then -1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 1 end as estado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_tcue as tipocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cla_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_mone = (select trim(vprm_val_vprm) from bcavprm
where vprm_cod_prms = 2) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = an_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cla_ccon like ''SEPS''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and not (ccon_cod_ccon like ''62%'' or ccon_cod_ccon like ''63%''
or ccon_cod_ccon like ''72%'' or ccon_cod_ccon like ''73%'') ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cod_ctas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from comp_Sal_ctab13 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sctd_sal_debe) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsctd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_fec_sctd <=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_peri in (select peri_cod_peri from bcaperi where
peri_mes_peri between 1 and 12 and peri_cod_ejer = an_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_ctas = li_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sctd_sal_debe) - sum(sctd_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_sal_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsctd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_cod_peri in (select peri_cod_peri from bcaperi where
peri_mes_peri = 0 and peri_cod_ejer = an_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_ctas = li_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sctd_sal_debe) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsctd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_fec_sctd <=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_peri in (select peri_cod_peri from bcaperi where
peri_mes_peri between 1 and 12 and peri_cod_ejer = an_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_ofic = ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sctd_sal_debe) - sum(sctd_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_sal_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcsctd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_cod_peri in (select peri_cod_peri from bcaperi where
peri_mes_peri = 0 and peri_cod_ejer = an_cod_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_cod_ofic = ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_Valor_cred is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor_cred = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_sal_peri is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_sal_peri = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_cod_ofic <>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update comp_sal_ctab13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sal_mes_debe = ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cod_ofic = ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update comp_sal_ctab13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sal_mes_debe = ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cod_ofic = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select LENGTH(cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from comp_sal_ctab13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cla_ccon =''SEPS''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and not (cod_ccon like ''62%'' or cod_ccon like ''63%'' or cod_ccon
like ''72%'' or cod_ccon like ''73%'') ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ls_cod_natu =''S'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let total = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsb11_12(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nivel integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigo char(15); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define total decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estado integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define elemento integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT DISTINCT')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' length(x.ccon_cod_ccon) as nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(x.ccon_cod_ccon) as codigo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(x.ccon_nom_ccon) as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(sum(bcasact.sact_sal_debi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when (select ccon_cod_ccon from bcaccon where ccon_cod_ctas
=x.ccon_cod_ctas and ccon_cod_ccon like ''74%'') = ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('then -1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else 1 end as estado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM outer bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaperi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcasact.sact_cod_ctas = x.ccon_cod_ctas ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcaejer.ejer_cod_ejer = x.ccon_cod_ejer ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcasact.sact_cod_peri = bcaperi.peri_cod_peri ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = year(ada_fec_fina) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= month(ada_fec_fina) + 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( length(x.ccon_cod_ccon)<7) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = ejer_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( x.ccon_cod_mone = (select trim(vprm_val_vprm) from bcavprm
where vprm_cod_prms = 2))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and not (ccon_cod_ccon like ''62%'' or ccon_cod_ccon like ''63%'' or
ccon_cod_ccon like ''72%'' or ccon_cod_ccon like ''73%'') ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and not (ccon_cod_ccon like ''4%'' or ccon_cod_ccon like ''5%'')')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cla_ccon =''SEPS''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if natu =''S'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let total = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' length(x.ccon_cod_ccon) as nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(x.ccon_cod_ccon) as codigo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(x.ccon_nom_ccon) as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(sum(bcasact.sact_sal_debi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when (select ccon_cod_ccon from bcaccon where ccon_cod_ctas
=x.ccon_cod_ctas and ccon_cod_ccon like ''74%'') = ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('then -1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else 1 end as estado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM outer bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaperi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcasact.sact_cod_ctas = x.ccon_cod_ctas ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcaejer.ejer_cod_ejer = x.ccon_cod_ejer ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcasact.sact_cod_peri = bcaperi.peri_cod_peri ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = year(ada_fec_fina) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= month(ada_fec_fina) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( length(x.ccon_cod_ccon)<7) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = ejer_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( x.ccon_cod_mone = (select trim(vprm_val_vprm) from bcavprm
where vprm_cod_prms = 2))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and not (ccon_cod_ccon like ''62%'' or ccon_cod_ccon like ''63%'' or
ccon_cod_ccon like ''72%'' or ccon_cod_ccon like ''73%'') ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (ccon_cod_ccon like ''4%'' or ccon_cod_ccon like ''5%'')')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and not (ccon_cod_ccon like ''59%'')')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cla_ccon =''SEPS''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if natu =''S'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let total = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select DISTINCT 2 as nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(x.ccon_nom_ccon) as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abs(sum((select nvl(sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_cod_comp = y.comp_cod_comp and dcom_cod_tasi =''D'')) -')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum((select nvl(sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_cod_comp = y.comp_cod_comp and dcom_cod_tasi =''C'')) ) as
total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1 as estado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacomp y')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where comp_fec_comp =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_cod_tdoc =''CI''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_beneficia =''Cierre cuentas Utilidad o P�rdida''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ccon_cod_ccon like ''59%''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ccon_cod_ejer in (select ejer_cod_ejer from bcaejer where
ejer_ani_ejer = year(ada_fec_fina) )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ORDER BY 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if natu =''S'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let total = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else --- oficinas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT DISTINCT')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' length(x.ccon_cod_ccon) as nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(x.ccon_cod_ccon) as codigo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(x.ccon_nom_ccon) as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(sum(bcasact.sact_sal_debi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when (select ccon_cod_ccon from bcaccon where ccon_cod_ctas
=x.ccon_cod_ctas and ccon_cod_ccon like ''74%'') = ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('then -1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else 1 end as estado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM outer bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaperi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcasact.sact_cod_ctas = x.ccon_cod_ctas ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcaejer.ejer_cod_ejer = x.ccon_cod_ejer ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcasact.sact_cod_peri = bcaperi.peri_cod_peri ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = year(ada_fec_fina) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= month(ada_fec_fina) + 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( length(x.ccon_cod_ccon)<7) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = ejer_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( x.ccon_cod_mone = (select trim(vprm_val_vprm) from bcavprm
where vprm_cod_prms = 2))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and not (ccon_cod_ccon like ''62%'' or ccon_cod_ccon like ''63%'' or
ccon_cod_ccon like ''72%'' or ccon_cod_ccon like ''73%'') ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and not (ccon_cod_ccon like ''4%'' or ccon_cod_ccon like ''5%'')')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cla_ccon =''SEPS''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if natu =''S'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let total = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT DISTINCT')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' length(x.ccon_cod_ccon) as nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(x.ccon_cod_ccon) as codigo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(x.ccon_nom_ccon) as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(sum(bcasact.sact_sal_debi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when (select ccon_cod_ccon from bcaccon where ccon_cod_ctas
=x.ccon_cod_ctas and ccon_cod_ccon like ''74%'') = ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('then -1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else 1 end as estado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM outer bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaperi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcasact.sact_cod_ctas = x.ccon_cod_ctas ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcaejer.ejer_cod_ejer = x.ccon_cod_ejer ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcasact.sact_cod_peri = bcaperi.peri_cod_peri ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = year(ada_fec_fina) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= month(ada_fec_fina) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( length(x.ccon_cod_ccon)<7) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = ejer_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( x.ccon_cod_mone = (select trim(vprm_val_vprm) from bcavprm
where vprm_cod_prms = 2))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and not (ccon_cod_ccon like ''62%'' or ccon_cod_ccon like ''63%'' or
ccon_cod_ccon like ''72%'' or ccon_cod_ccon like ''73%'') ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (ccon_cod_ccon like ''4%'' or ccon_cod_ccon like ''5%'')')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and not (ccon_cod_ccon like ''59%'')')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cla_ccon =''SEPS''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sact_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if natu =''S'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let total = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select DISTINCT 2 as nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(x.ccon_nom_ccon) as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abs(sum((select nvl(sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_cod_comp = y.comp_cod_comp and dcom_cod_tasi =''D'')) -')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sum((select nvl(sum(dcom_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_cod_comp = y.comp_cod_comp and dcom_cod_tasi =''C'')) ) as
total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1 as estado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacomp y')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where comp_fec_comp =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_anulado = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_cod_tdoc =''CI''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_beneficia =''Cierre cuentas Utilidad o P�rdida''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ccon_cod_ccon like ''59%''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ccon_cod_ejer in (select ejer_cod_ejer from bcaejer where
ejer_ani_ejer = year(ada_fec_fina) )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ORDER BY 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if natu =''S'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let total = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsb11(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nivel integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigo char(15); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombre char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define total decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estado integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define elemento integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT DISTINCT')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' length(x.ccon_cod_ccon) as nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(x.ccon_cod_ccon) as codigo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(x.ccon_nom_ccon) as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(sum(bcasact.sact_sal_debi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when (select ccon_cod_ccon from bcaccon where
ccon_cod_ctas =x.ccon_cod_ctas and ccon_cod_ccon like ''74%'') = ccon_cod_ccon then
-1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 1 end as estado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM outer bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaperi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcasact.sact_cod_ctas = x.ccon_cod_ctas ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcaejer.ejer_cod_ejer = x.ccon_cod_ejer ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcasact.sact_cod_peri = bcaperi.peri_cod_peri ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = year(ada_fec_fina) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= month(ada_fec_fina) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( length(x.ccon_cod_ccon)<7) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = ejer_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( x.ccon_cod_mone = (select trim(vprm_val_vprm) from bcavprm
where vprm_cod_prms = 2))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and not (ccon_cod_ccon like ''62%'' or ccon_cod_ccon like ''63%'' or
ccon_cod_ccon like ''72%'' or ccon_cod_ccon like ''73%'') ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cla_ccon =''SEPS''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ORDER BY 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if natu =''S'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let total = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT DISTINCT')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' length(x.ccon_cod_ccon) as nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(x.ccon_cod_ccon) as codigo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(x.ccon_nom_ccon) as nombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(sum(bcasact.sact_sal_debi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when (select ccon_cod_ccon from bcaccon where
ccon_cod_ctas =x.ccon_cod_ctas and ccon_cod_ccon like ''74%'') = ccon_cod_ccon then
-1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 1 end as estado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(x.ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM outer bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaperi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcasact.sact_cod_ctas = x.ccon_cod_ctas ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcaejer.ejer_cod_ejer = x.ccon_cod_ejer ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcasact.sact_cod_peri = bcaperi.peri_cod_peri ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = year(ada_fec_fina) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= month(ada_fec_fina) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( length(x.ccon_cod_ccon)<7) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = ejer_cod_ejer and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( x.ccon_cod_mone = (select trim(vprm_val_vprm) from bcavprm
where vprm_cod_prms = 2))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and not (ccon_cod_ccon like ''62%'' or ccon_cod_ccon like ''63%'' or
ccon_cod_ccon like ''72%'' or ccon_cod_ccon like ''73%'') ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cla_ccon =''SEPS''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('GROUP BY 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ORDER BY 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if natu =''S'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let total = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return nivel ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cuentas_inmobilizadas(ada_fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(10) as fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaingr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcliente integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaingr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define direccion char(60) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define rango ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valor = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select to_char(dpvi_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sp_max_fecha_transaccion (ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tcdv_des_tcdv as descripcion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sp_valor_dpvi_fecha (ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || ||nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(clie_fec_ingr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(tele_num_tele) from bcatele where tele_cod_clie =
x.clie_cod_clie) as telefono')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tide = tide_cod_tide and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv = tcdv_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv not in (1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_FEc_inic<=ada_FEc_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fechamaxima = ada_fec_fina - ai_tiempo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if fechatran<= fechamaxima then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if saldo <= 93.5 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let rango = ''RANGO :0.00 - 93.5'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let rango = ''RANGO :93.5 - 374'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select to_char(dpvi_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sp_max_fecha_transaccion (ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tcdv_des_tcdv as descripcion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sp_valor_dpvi_fecha (ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || ||nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(to_char(clie_fec_ingr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(tele_num_tele) from bcatele where tele_cod_clie =
x.clie_cod_clie) as telefono')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tide = tide_cod_tide and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv = tcdv_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv not in (1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_FEc_inic<=ada_FEc_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fechamaxima = ada_fec_fina - ai_tiempo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if fechatran <= fechamaxima then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if saldo <= 93.5 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let rango = ''RANGO :0.00 - 93.5'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let rango = ''RANGO :93.5 - 374'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_scnj_actividad(ai_persona integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(180) as actividad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_numero integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_socio integer; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_ocupac char(180);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_asocio integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cod_oc integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define d_acliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_Des_clie char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=0;let d_asocio=0;let d_acliente=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT count(*) as numero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when acli_cod_ocup is null then ''OTRAS''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else (select ocu1_des_ocu1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ocup_cod_ocup = x.acli_cod_ocup and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu2_cod_ocu2 = ocup_cod_ocu2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu2_cod_ocu1 = ocu1_cod_ocu1 ) end as ocup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into d_socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE acli_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tcli_cod_tcli = clie_cod_tcli and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' year(clie_fec_ingr) <=ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nat_juri = ai_persona and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' acli_cod_tact = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_tcli <> 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_cliente = d_socio ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_socio = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if d_socio <> 0 or d_cliente <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return d_ocupac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let d_numero=0;let d_asocio=0;let d_acliente=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_captaciones_spi_cuentas(as_cta_bene
char(20)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as codigodpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigodpvi integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigocliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentificacion char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define correo char(80);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define oficinacliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpvi_cod_Dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into codigodpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_num_dpvi = as_cta_bene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_ide_clie = as_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return codigodpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('/*')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into :ll_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv<>1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_ide_clie = :ls_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_num_clie = :ls_cta_bene;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' */')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_buro_general(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(10) as fecha_corte ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fecha_nacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fecha_concesion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(30) as tipo_de_riesgo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as tipo_de_credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fecha_corte char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipo_id char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numero_cedula char(13); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fecha_nacimiento char(10); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define genero char(1); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define domicilio char(50); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define telefono char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define provincia char(20); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ciudad char(20) ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor_original decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fecha_concesion char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fecha_vencimiento char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numero_operacion INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipo_de_riesgo char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipo_de_credito char(3); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define calif_propia_SBS char(3); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define total_x_vencer decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define no_devenga_interes decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define total_vencido decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define demanda_judicial decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cartera_castigada decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define total_deuda decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tiempo_vencido_dias integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select to_char(calf_fec_calf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_nat_juri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then clie_rep_lega')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_nat_juri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_cod_tide) end as tipo_id')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_nat_juri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ide_clie) end as numero_cedula')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(clie_fec_nac ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when clna_cod_sexo = ''X'' then ''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else nvl(clna_cod_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_dir_domi as domicilio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(tele_num_tele)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tele_cod_clie = y.clie_cod_clie) as telefono')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prov_nom_prov as provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ciud_nom_ciud as ciudad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred as valor_original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_venc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred as numero_operacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''TITULAR'' as tipo_de_riesgo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_cod_siba as tipo_de_credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SUBSTr(calf_est_calf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when calf_val_cast>0 or calf_val_dema>0 then 0 else calf_val_acti end
as total_x_vencer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when calf_val_cast>0 or calf_val_dema>0 then 0 else calf_val_deve end
as no_devenga_interes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when calf_val_cast>0 or calf_val_dema>0 then 0 else calf_val_venc end
as total_vencido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_val_dema as demanda_judicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_val_cast as cartera_castigada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_sal_cred as total_deuda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_dias_venc as tiempo_vencido_dias ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into fecha_corte ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciudad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('no_devenga_interes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaprov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcasect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' outer bcaclna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie y')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where prov_cod_prov = ciud_cod_prov and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ciud_cod_ciud = sect_cod_ciud and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre = ccre_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_num_cred = cred_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_Fec_calf = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return fecha_corte ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciudad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('no_devenga_interes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select to_char(calf_fec_calf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_nat_juri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 2 then clie_rep_lega')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tide as tipo_id')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (case length(trim(clie_ide_clie))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 9 then ''0''||trim(clie_ide_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else trim(clie_ide_clie) end ) as numero_cedula')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(clie_fec_nac ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when clna_cod_sexo = ''X'' then ''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else nvl(clna_cod_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_dir_domi as domicilio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(tele_num_tele)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tele_cod_clie = y.clie_cod_clie) as telefono')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prov_nom_prov as provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ciud_nom_ciud as ciudad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred as valor_original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_venc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred as numero_operacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''GARANTE'' as tipo_de_riesgo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_cod_siba as tipo_de_credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SUBSTr(calf_est_calf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when calf_val_cast>0 or calf_val_dema>0 then 0 else calf_val_acti end
as total_x_vencer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when calf_val_cast>0 or calf_val_dema>0 then 0 else calf_val_deve end
as no_devenga_interes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when calf_val_cast>0 or calf_val_dema>0 then 0 else calf_val_venc end
as total_vencido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_val_dema as demanda_judicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_val_cast as cartera_castigada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_sal_cred as total_deuda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_dias_venc as tiempo_vencido_dias ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into fecha_corte ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciudad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('no_devenga_interes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaprov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcasect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' outer bcaclna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie y')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcagara')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where prov_cod_prov = ciud_cod_prov and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ciud_cod_ciud = sect_cod_ciud and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' gara_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_num_cred = cred_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' gara_num_cred = cred_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre = ccre_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_Fec_calf = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return fecha_corte ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciudad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('no_devenga_interes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select to_char(calf_fec_calf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cfam_nom_cfam as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cfam_cod_tide as tipo_id')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cfam_ide_cfam numero_cedula')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select to_char(clie_fec_nac ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select case clna_cod_sexo when ''X'' then ''M'' else
clna_cod_sexo end from bcaclna where clna_cod_clie = z.cfam_cod_fami)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_dir_domi as domicilio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(tele_num_tele)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tele_cod_clie = z.cfam_cod_fami) as telefono')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prov_nom_prov as provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ciud_nom_ciud as ciudad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred as valor_original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_venc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred as numero_operacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''CODEUDOR'' as tipo_de_riesgo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_cod_siba as tipo_de_credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SUBSTr(calf_est_calf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when calf_val_cast>0 or calf_val_dema>0 then 0 else calf_val_acti end
as total_x_vencer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when calf_val_cast>0 or calf_val_dema>0 then 0 else calf_val_deve end
as no_devenga_interes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when calf_val_cast>0 or calf_val_dema>0 then 0 else calf_val_venc end
as total_vencido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_val_dema as demanda_judicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_val_cast as cartera_castigada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_sal_cred as total_deuda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_dias_venc as tiempo_vencido_dias ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into fecha_corte ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciudad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('no_devenga_interes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaprov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcasect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie y')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacfam z')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where prov_cod_prov = ciud_cod_prov and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ciud_cod_ciud = sect_cod_ciud and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cfam_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre = ccre_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_num_cred = cred_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cfam_cod_clie = clie_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_iden = 0 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cfam_cod_tcfa = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_Fec_calf = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return fecha_corte ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciudad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('no_devenga_interes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select to_char(calf_fec_calf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cfam_nom_cfam as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cfam_cod_tide as tipo_id')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cfam_ide_cfam as numero_cedula')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select to_char(clie_fec_nac ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select case clna_cod_sexo when ''X'' then ''M'' else
clna_cod_sexo end from bcaclna where clna_cod_clie = z.cfam_cod_fami)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_dir_domi as domicilio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select max(tele_num_tele)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tele_cod_clie = z.cfam_cod_fami) as telefono')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prov_nom_prov as provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ciud_nom_ciud as ciudad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred as valor_original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_venc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred as numero_operacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''GARANTE'' as tipo_de_riesgo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccre_cod_siba as tipo_de_credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SUBSTr(calf_est_calf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when calf_val_cast>0 or calf_val_dema>0 then 0 else calf_val_acti end
as total_x_vencer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when calf_val_cast>0 or calf_val_dema>0 then 0 else
calf_val_deve end as no_devenga_interes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when calf_val_cast>0 or calf_val_dema>0 then 0 else
calf_val_venc end as total_vencido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_val_dema as demanda_judicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_val_cast as cartera_castigada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_sal_cred as total_deuda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_dias_venc as tiempo_vencido_dias ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into fecha_corte ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciudad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('no_devenga_interes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaprov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcasect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaclie y')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcagara')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacfam z')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where prov_cod_prov = ciud_cod_prov and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ciud_cod_ciud = sect_cod_ciud and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' gara_cod_clie <> cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_num_cred = cred_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' gara_num_cred = cred_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre = ccre_cod_ccre and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cfam_cod_clie = clie_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cfam_cod_clie = gara_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cfam_cod_tcfa = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_Fec_calf = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return fecha_corte ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciudad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('no_devenga_interes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure
informix.sp_cartera_reporte_creditos_tramitejudicial(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as numjuicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date as fechafincredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as estadocredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcredito integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define situacioncredito char(20) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldoactivo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldovencido decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldodevenga decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numjuicio char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechajuicio date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define abogado char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define garantes char(200);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechainiciocredito date ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechafincredito date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_Fec_cred date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estadocredito char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldocast decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cred_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into numcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.clie_cod_clie = abog_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abog_cod_abog = juic_cod_abog')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_Cred = juic_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_clie = y.clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and eope_cod_eope = cred_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(calf_fec_calf) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_Fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_num_cred = numcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_fec_Calf<=ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_sal_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' juic_num_juic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ft_nombre_garante(cred_num_cred) as garantes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into numcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' numjuicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.clie_cod_clie = abog_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abog_cod_abog = juic_cod_abog')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre = ecre_cod_Ecre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_Cred = juic_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_clie = y.clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and eope_cod_eope = cred_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_fec_calf = lda_Fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_num_cred = cred_num_Cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_num_cred = numcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return numcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_veri_bcaclie(ai_nat_juri INT')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_conteo integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if exists(select clie_ide_clie from bcaclie where clie_ide_clie =
as_cedula and clie_cod_clie <> an_cod_clie) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ai_nat_juri = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET as_nom_clie = NULL;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_conteo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie where clie_cod_Clie = an_cod_Clie and clie_ban_pdpe <>
ai_ban_pdpe;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (li_conteo >0 ) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afclpdp values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN CURRENT')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_roles_reporte_anexo_sin_detalle(ada_fec_proc
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(13) as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define dependencia char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorenvio decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_depe = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT trim(bcaclie.clie_ide_clie) as identificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(bcaclie.clie_ape_clie) || || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(bcaclie.clie_nom_clie) as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaanrl.anrl_cod_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaanrl.anrl_vta_envi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaanrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcaclie.clie_cod_clie = bcaanrl.anrl_cod_clie ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bcaanrl.anrl_fec_proc=ada_fec_proc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and anrl_cod_eanr <> 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and anrl_cod_ting = as_cod_ting')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and anrl_vta_envi > 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by anrl_cod_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT trim(bcaclie.clie_ide_clie) as identificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(bcaclie.clie_ape_clie) || || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(bcaclie.clie_nom_clie) as nombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaanrl.anrl_cod_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaanrl.anrl_vta_envi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaanrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE ( bcaclie.clie_cod_clie = bcaanrl.anrl_cod_clie ) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bcaanrl.anrl_fec_proc=ada_fec_proc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and anrl_cod_eanr <> 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and anrl_cod_ting = as_cod_ting')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and anrl_vta_envi > 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and anrl_cod_Depe = ai_cod_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by anrl_cod_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure
informix.sp_captaciones_reportes_movimientocaja(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(100) as apellidos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(100) as nombres ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('datetime year to second as fechahora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as tipodocumento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as codigoproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as codigotipotransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(30) as nombreproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as numerocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as codigocaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(100) as detalletransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as codigotransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as nombretransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date as fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as ordenemision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as codigotipotransaccion_dc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(15) as numerotransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numerocheque')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(30) as cuentacontable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as ofinatramsaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as codigooficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---returning char(5500) as consulta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcliente integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define apellidos char(100) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechahora datetime year to second ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipodocumento char(3) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigoproducto integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigotipotransaccion integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombreproducto char(30) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerocuenta char(20) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigocaja char(3) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define detalletransaccion char(100) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigotransaccion integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombretransaccion char(20) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ordenemision integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigotipotransaccion_dc integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerotransaccion char(15) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ingresos decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define egresos decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define efectivo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define chqlocal decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define chqotros decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define chqinternacional decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorcaja decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerocheque integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuentacontable char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ofinatramsaccion INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigooficina integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ofct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE c_query CHAR(5500);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_tran = 999 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_tran = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_tran1 = and pape_cod_tran in (36,51) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_tran = and mcdv_cod_tran = || ai_cod_tran ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_tran1 = and pape_cod_tran= || ai_cod_tran ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if trim(as_cod_caja) = ''XX'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_caja = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_caja1 = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_caja = and mcdv_cod_caja = '' || trim(as_cod_caja) ||
'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_caja1 = and ottr_cod_caja = '' || trim(as_cod_caja) ||
'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofct = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofct = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofct = and clie_cod_ofct = || ai_cod_ofct;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = SELECT clie_num_clie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_ape_clie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || nvl(clie_nom_clie,'''') as
clie_nom_clie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || pape_fec_pape, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || pape_cod_tdoc, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || dpvi_cod_tcdv, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || mcdv_cod_tran, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || tcdv_des_tcdv, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || dpvi_num_dpvi, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || mcdv_cod_caja, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || mcdv_val_mcdv, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || mcdv_det_mcdv, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || mcdv_cod_mcdv, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || tran_des_tran, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || mcdv_fec_mcdv, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || nvl(mcdv_cod_orec,0), ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || nvl(mcdv_cod_tndd,0), ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || mcdv_num_mcdv, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || case when mcdv_cod_tran in
( 8,11,12,13) then mcdv_val_mcdv else 0 end as ingreso, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || case when mcdv_cod_tran in
( 6,9,10,37,25) then mcdv_val_mcdv else 0 end as egreso, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || (select case when ddte_cod_tfpg
in (1,9) then ddte_val_ddte else 0 end from bcaddte where ddte_Cod_mcdv =
x.mcdv_cod_mcdv and ddte_cod_tfpg in (1,9)) as efectivo, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || (select case when ddte_cod_tfpg
in (2,5) then ddte_val_ddte else 0 end from bcaddte where ddte_Cod_mcdv =
x.mcdv_cod_mcdv and ddte_cod_tfpg in (1,9) ) as local, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || (select case when ddte_cod_tfpg
in (3,0,8) then ddte_val_ddte else 0 end from bcaddte where ddte_Cod_mcdv =
x.mcdv_cod_mcdv and ddte_cod_tfpg in (1,9)) as otros, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || (select case when ddte_cod_tfpg
in (4) then ddte_val_ddte else 0 end from bcaddte where ddte_Cod_mcdv =
x.mcdv_cod_mcdv and ddte_cod_tfpg in (1,9)) as internacional, ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || case when mcdv_cod_tran in
( 8,11,12,13) then mcdv_val_mcdv else mcdv_val_mcdv *-1 end as caja, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || nvl((SELECT nvl(chqs_num_chqs, 0)
FROM bcaorec,bcachqs,bcachra,bcacban,bcaccon WHERE orec_cod_orec =
x.mcdv_cod_orec AND ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || orec_cod_chqs = chqs_cod_chqs
AND ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || chqs_cod_chra = chra_cod_chra
AND ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || chra_cod_cban = cban_cod_cban
AND ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || cban_cod_ctas =
ccon_cod_ctas),0) as cheque, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || nvl((SELECT nvl(ccon_cod_ccon,
'''') FROM bcaorec,bcachqs,bcachra,bcacban,bcaccon WHERE orec_cod_orec =
x.mcdv_cod_orec AND ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || orec_cod_chqs = chqs_cod_chqs
AND ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || chqs_cod_chra = chra_cod_chra
AND ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || chra_cod_cban = cban_cod_cban
AND ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || cban_cod_ctas =
ccon_cod_ctas) ,'''') as cuenta, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || mcdv_cod_ofic, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || dpvi_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcamcdv x, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcapape, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcaclie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcadpvi, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacaja, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcatcdv, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcatran ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE ( pape_cod_pape = mcdv_cod_pape )
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ( dpvi_cod_clie = clie_cod_clie )
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ( dpvi_cod_dpvi = mcdv_cod_dpvi )
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ( tcdv_cod_tcdv = dpvi_cod_tcdv )
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ( mcdv_cod_caja = caja_cod_caja )
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ( tran_cod_tran = mcdv_cod_tran )
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ( ( mcdv_fec_mcdv = '' ||
ada_fec_inic || '' )) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofct ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_caja ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_tran ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || union ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || SELECT clie_num_clie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_ape_clie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_nom_clie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || pape_fec_pape, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || pape_cod_tdoc, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || trcj_cod_trcj as
dpvi_cod_tcdv, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 36 as mcdv_cod_tran, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || trcj_desc_trcj as
tcdv_des_tcdv, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || pape_num_tran, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ottr_cod_caja, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || dotr_valor, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ottr_detalle as
ottr_detalle, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || tran_des_tran, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ottr_fecha, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || pape_num_tran as
mcdv_num_mcdv,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || case when trcj_cod_tasi
=''D'' then dotr_valor else 0 end as ingreso, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || case when trcj_cod_tasi
=''C'' then dotr_valor else 0 end as egreso, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || dotr_valor as
efectivo, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0 as chlocal, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0 as otros, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0 as internacional, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || case when trcj_cod_tasi
=''C'' then dotr_valor *-1 else dotr_valor end as caja, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0 as cheque, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || '''' as cuenta , ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || pape_cod_ofic, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || pape_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcaotcl,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcapape, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcaclie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcaottr, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacaja, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcatran ,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcatrcj ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE ( pape_cod_pape =
dotr_cod_pape ) and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || (dotr_cod_pape=ottr_cod_pape)
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || (trcj_cod_trcj= dotr_cod_trcj) and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ( dotr_cod_clie =
clie_cod_clie ) and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ( ottr_cod_caja =
caja_cod_caja ) and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ( tran_cod_tran =
pape_cod_tran ) and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ( ottr_fecha = '' ||
ada_fec_inic || '') ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_tran1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_caja1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || union ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || SELECT clie_num_clie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_ape_clie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_nom_clie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || pape_fec_pape, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || pape_cod_tdoc, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || trcj_cod_trcj as
dpvi_cod_tcdv, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 51 as mcdv_cod_tran, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || trim(trcj_desc_trcj) as
tcdv_des_tcdv, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || pape_num_tran, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ottr_cod_caja, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || dotr_valor, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ottr_detalle as
ottr_detalle, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || tran_des_tran, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ottr_fecha, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || pape_num_tran as
mcdv_num_mcdv,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || case when trcj_cod_tasi
=''C'' then dotr_valor else 0 end as ingreso, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || case when trcj_cod_tasi
=''D'' then dotr_valor else 0 end as egreso, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || dotr_valor as
efectivo, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0 as chlocal, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0 as otros, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0 as internacional, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || case when trcj_cod_tasi
=''D'' then dotr_valor *-1 else dotr_valor end as caja, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || 0 as cheque, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || '''' as cuenta , ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || pape_cod_ofic, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || pape_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcaotcl,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcapape, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcaclie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcaottr, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcacaja, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcatran ,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || bcatrcj ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE ( pape_cod_pape =
dotr_cod_pape ) and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || (dotr_cod_pape=ottr_cod_pape)
and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || (trcj_cod_trcj= dotr_cod_trcj) and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ottr_est_ottr = 2 and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ( dotr_cod_clie =
clie_cod_clie ) and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ( ottr_cod_caja =
caja_cod_caja ) and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ( tran_cod_tran =
pape_cod_tran ) and ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ( ottr_fecha = '' ||
ada_fec_inic || '') ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_tran1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_caja1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || as_orden ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---return c_query ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--end procedure ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('PREPARE c_stmt FROM c_query;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DECLARE c_cur CURSOR FOR c_stmt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('OPEN c_cur ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while (1 = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FETCH c_cur INTO ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('numcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('efectivo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF (SQLCODE != 100) THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN numcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('efectivo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('EXIT;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END WHILE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CLOSE c_cur;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FREE c_cur;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FREE c_stmt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_dpvi_maxfecha (ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(10) as fechamax')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_max char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select to_char(max(mcdv_fec_mcdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_max')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv =ai_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = ai_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran not in (13)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(mcdv_fec_mcdv) <=ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_max is null or length(lda_fec_max) = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select to_char(dpvi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_max')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi where dpvi_cod_dpvi = ai_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_inic> lda_fec_nac then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_inic> lda_fecha then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_Fec_max = to_char(lda_fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_inic> lda_fecha then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_Fec_max = to_char(lda_fec_nac ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return lda_fec_max ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure
informix.sp_cartera_reporte_consolidado_concedido_recuperado(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as cuotas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as cuotaspagadas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as cuotasnopagadas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as cuotasvencidas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cliente integer; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerooperacion integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechainicio date; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechavenc date; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuotas integer; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define capitaloriginal decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define interesoriginal decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuotaspagadas integer; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define capitalpagado decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define interespagado decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuotasnopagadas integer; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define capitalnopagado decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define interesnopagado decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuotasvencidas integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define capitalvencido decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define interesvencido decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define diasmora integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldocertificados decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldoahorros decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_Fec_actu date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select today')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lda_Fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_fec_fina< lda_Fec_actu then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie as cliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred as numerooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_Fec_inic as fechainicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_FEc_venc as fechavenc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cuot as cuotas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_Cap_cred as capitaloriginal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(divc_int_proy) from bcadivc where
divc_num_cred = x.cred_num_Cred) as interesoriginal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cuot -(select sum(dcal_num_divc) from
afcdcal where dcal_num_cred = x.cred_num_Cred and dcal_Fec_calf = ada_fec_fina) as
cuotaspagadas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred - calf_sal_Cred as capitalpagado ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(dcal_val_inte)+sum(dcal_Val_deve) from
afcdcal where dcal_num_cred = x.cred_num_Cred and dcal_Fec_calf = ada_fec_fina) as
interespagado ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(dcal_num_divc) from afcdcal where
dcal_num_cred = x.cred_num_Cred and dcal_Fec_calf = ada_fec_fina) as
cuotasnopagadas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(dcal_Val_dcal) from afcdcal where
dcal_num_cred = x.cred_num_Cred and dcal_Fec_calf = ada_fec_fina and dcal_cod_Ediv
<> 6) as capitalnopagado ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(dcal_val_inte)+sum(dcal_Val_deve) from
afcdcal where dcal_num_cred = x.cred_num_Cred and dcal_Fec_calf = ada_fec_fina) as
interesnopagado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(dcal_num_divc) from afcdcal where
dcal_num_cred = x.cred_num_Cred and dcal_Fec_calf = ada_fec_fina and dcal_cod_ediv
=2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_val_venc as capitalvencido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(dcal_val_inte)+sum(dcal_Val_deve)
from afcdcal where dcal_num_cred = x.cred_num_Cred and dcal_Fec_calf = ada_fec_fina
and dcal_cod_Ediv = 2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_dias_Venc as diasmora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cuotasvencidas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_num_Cred= cred_num_Cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_Cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_fec_Calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let interespagado = interesoriginal - interespagado;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cuotasvencidas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie as cliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_Cred as numerooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_Fec_inic as fechainicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_FEc_venc as fechavenc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cuot as cuotas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_Cap_cred as capitaloriginal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(divc_int_proy) from bcadivc where
divc_num_cred = x.cred_num_Cred) as interesoriginal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cuot -(select sum(dcal_num_divc) from
afcdcal where dcal_num_cred = x.cred_num_Cred and dcal_Fec_calf = ada_fec_fina) as
cuotaspagadas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred - calf_sal_Cred as capitalpagado ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(dcal_val_inte)+sum(dcal_Val_deve) from
afcdcal where dcal_num_cred = x.cred_num_Cred and dcal_Fec_calf = ada_fec_fina) as
interespagado ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(dcal_num_divc) from afcdcal where
dcal_num_cred = x.cred_num_Cred and dcal_Fec_calf = ada_fec_fina) as
cuotasnopagadas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(dcal_Val_dcal) from afcdcal where
dcal_num_cred = x.cred_num_Cred and dcal_Fec_calf = ada_fec_fina and dcal_cod_Ediv
<> 6) as capitalnopagado ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(dcal_val_inte)+sum(dcal_Val_deve) from
afcdcal where dcal_num_cred = x.cred_num_Cred and dcal_Fec_calf = ada_fec_fina) as
interesnopagado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(dcal_num_divc) from afcdcal where
dcal_num_cred = x.cred_num_Cred and dcal_Fec_calf = ada_fec_fina and dcal_cod_ediv
=2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_val_venv as capitalvencido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(dcal_val_inte)+sum(dcal_Val_deve)
from afcdcal where dcal_num_cred = x.cred_num_Cred and dcal_Fec_calf = ada_fec_fina
and dcal_cod_Ediv = 2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_dias_Venc as diasmora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cuotasvencidas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_num_Cred= cred_num_Cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_Cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_Cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_fec_Calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let interespagado = interesoriginal - interespagado;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cuotasvencidas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie as cliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred as numerooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_Fec_inic as fechainicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_FEc_venc as fechavenc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cuot as cuotas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_Cap_cred as capitaloriginal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(divc_int_proy) from bcadivc where
divc_num_cred = x.cred_num_Cred) as interesoriginal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(*) from bcadivc where divc_num_cred =
x.cred_num_Cred and divc_cod_Ediv = 5) as cuotaspagadas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred - (select sum(divc_cap_divc) from
bcadivc where divc_num_cred = x.cred_num_Cred and divc_cod_Ediv not in (5)) as
capitalpagado ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(divc_int_paga) from bcadivc where
divc_num_cred = x.cred_num_Cred and divc_cod_Ediv in (5))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(*) from bcadivc where divc_num_cred =
x.cred_num_Cred and divc_cod_Ediv not in (5)) as cuotasnopagadas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(divc_cap_divc) from bcadivc where
divc_num_cred = x.cred_num_Cred and divc_cod_Ediv not in (5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(divc_int_plaz)+sum(divc_int_deve) from
bcadivc where divc_num_cred = x.cred_num_Cred and divc_cod_Ediv not in (5)) as
interesnopagado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select count(*) from bcadivc where divc_num_cred
= x.cred_num_Cred and divc_cod_Ediv in (2))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(divc_cap_divc) from bcadivc where
divc_num_cred = x.cred_num_Cred and divc_cod_Ediv in (2))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(divc_cap_divc) from bcadivc where
divc_num_cred = x.cred_num_Cred and divc_cod_Ediv in (2))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select lda_fec_actu - min(divc_fec_venc) from
bcadivc where divc_num_cred = x.cred_num_Cred and divc_cod_Ediv not in (5)) as
diasmora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cuotasvencidas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = cred_Cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --- let interespagado = interesoriginal - interespagado;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cuotasvencidas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_num_clie as cliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred as numerooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_Fec_inic as fechainicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_FEc_venc as fechavenc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cuot as cuotas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_Cap_cred as capitaloriginal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(divc_int_proy) from bcadivc where
divc_num_cred = x.cred_num_Cred) as interesoriginal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(*) from bcadivc where divc_num_cred =
x.cred_num_Cred and divc_cod_Ediv = 5) as cuotaspagadas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred - (select sum(divc_cap_divc) from
bcadivc where divc_num_cred = x.cred_num_Cred and divc_cod_Ediv not in (5)) as
capitalpagado ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(divc_int_paga) from bcadivc where
divc_num_cred = x.cred_num_Cred and divc_cod_Ediv in (5))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select count(*) from bcadivc where divc_num_cred =
x.cred_num_Cred and divc_cod_Ediv not in (5)) as cuotasnopagadas ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(divc_cap_divc) from bcadivc where
divc_num_cred = x.cred_num_Cred and divc_cod_Ediv not in (5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(divc_int_plaz)+sum(divc_int_deve) from
bcadivc where divc_num_cred = x.cred_num_Cred and divc_cod_Ediv not in (5)) as
interesnopagado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select count(*) from bcadivc where divc_num_cred
= x.cred_num_Cred and divc_cod_Ediv in (2))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(divc_cap_divc) from bcadivc where
divc_num_cred = x.cred_num_Cred and divc_cod_Ediv in (2))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(divc_cap_divc) from bcadivc where
divc_num_cred = x.cred_num_Cred and divc_cod_Ediv in (2))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select lda_fec_actu - min(divc_fec_venc) from
bcadivc where divc_num_cred = x.cred_num_Cred and divc_cod_Ediv not in (5)) as
diasmora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cuotasvencidas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = cred_Cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_Cod_ofic = ai_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---let interespagado = interesoriginal - interespagado;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cuotasvencidas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_bce_plab01(ada_Fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(10) as fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(6) as parroquiatransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(200) as nombrecliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as denominacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as montototal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define parroquiatransaccion char(6);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentificacion char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombrecliente char(200);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define denominacion integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define montototal integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigomcdv integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select to_char(mcdv_fec_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(prov_sib_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tide as tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_Clie as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || || nvl(trim( clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' camb_val_camb as denominacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' count(distinct dcam_num_deno)*camb_val_camb as montototal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcam_cod_mcdv as codigomcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcdcam')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_Clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_mcdv = dcam_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcam_cod_camb = camb_cod_camb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_sect in (select max(sect_cod_sect) from bcasect where
sect_cod_ciud = x.ciud_cod_ciud)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcam_cod_modu in (5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and not dcam_num_deno is null')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_Fec_inic and ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_crea_papeleta_dpf(ada_fec_pape datetime year
to second ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as papeleta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tdoc char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tran_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran =ai_cod_tran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(pape_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcapape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_pape = li_cod_pape +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Insert into bcapape values(li_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcatran set tran_num_secu = ai_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran = ai_cod_tran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_cod_pape with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_crear_detalle_papeleta(ai_cod_pape integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numpapeleta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_dpap integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcadpap values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num_dpap = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpap_num_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_num_dpap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpap ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpap_cod_pape = ai_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpap_cod_ctas = ai_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return li_num_dpap with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_bcadpfi_renocancauto(ada_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_depg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_num_tdoc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_fina date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_bene char(60);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_rubr char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ruc_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tide char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_num_secu integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_num_acto char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_venc date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_refi integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_fec_venc date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cod_crfi integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_crfi char(5);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_actu datetime year to second;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_banc integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_num_tran integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_dpfi integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fec_actu = current;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- parametros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---execute procedure ft_asu_parametros(1404);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_por_rendi = ft_cod_parametros(1404);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cta_gast = ft_cod_parametros(2114);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cta_prov = ft_cod_parametros(2115);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_par_plaz = ft_cod_parametros(1793);select ctap_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cta_rend')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcactap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ctap_cod_prms = 1404;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select coop_ruc_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_ruc_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select modu_ban_inst')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_ban_cele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcamodu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where modu_cod_modu = 10;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_ban_cele is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ban_cele = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----caja asignada a usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(caja_cod_caja)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where caja_cod_usua = ai_cod_usua;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---interes acreditacion automatica')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_rubr = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- secuencial transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ls_bene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ls_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_dpfi = dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_edpf not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpfi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_rubr = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and crau_cod_dpfi = dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and crau_cod_rubr = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_fec_fina<= ada_fec_actu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by dpfi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select pgpf_val_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapgpf where pgpf_cod_dpfi = li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_rubr= 2 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_fec_fina<=ada_fec_actu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_edpf not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tran_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tran_cod_tran = 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_tran = ll_num_tran + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_prdv = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(prpf_val_prpf)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_prdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaprpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prpf_cod_pgpf = li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and prpf_cod_tasi =''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_prdv is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_prdv = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_rend = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_crea_papeleta_dpf(lda_fec_actu
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcapgpf set pgpf_cod_edpf = 3 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(mcdv_cod_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_mcdv = ll_cod_mcdv +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_cco_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_ahor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamcdv values(ll_cod_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaddte values(ll_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --execute procedure sp_crear_detalle_papeleta(ll_pape ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_por_rendi >= 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_rend = round( (ld_val_pgpf *
ld_por_rendi /100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select setr_cod_setr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_setr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasetr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tptr_cod_tptr = 6 and tpid_cod_iden
=ls_cod_tide;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select offa_num_esta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_num_sees')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaoffa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where offa_cod_tran = 62')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and offa_cod_ofic = li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and offa_cod_esrf = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and offa_ban_Cele = li_ban_cele;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_banc = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_por_rendi>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_crfi =
ft_cod_parametros(1406);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_crfi =
ft_asu_parametros(1406);end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_crfi = ft_cod_parametros(1405);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_secu = ll_num_secu +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcarefi values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(refi_cod_refi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_refi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcarefi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where refi_num_iden = ls_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and refi_fec_ingr = ada_fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select crfi_cod_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_crfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacrfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where crfi_cod_crfi = trim(ls_cod_crfi)and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' crfi_fec_fin is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadrtr values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadeip values(li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcaoffa set offa_num_actu = ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where offa_cod_tran = 62')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and offa_cod_ofic = li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and offa_cod_esrf = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and offa_ban_Cele = li_ban_cele;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --execute procedure sp_crear_detalle_papeleta(ll_pape
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_prdv >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaprpf values(li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --execute procedure sp_crear_detalle_papeleta(ll_pape
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --execute procedure sp_crear_detalle_papeleta(ll_pape ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadepg values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(depg_cod_depg)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_depg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where depg_cod_pgpf = li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_fec_pago = ada_Fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadbpf values(li_cod_depg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ll_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ai_cod_rubr = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_secu = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ----capital acreditacion automatica')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_rubr = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- secuencial transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_rubr = Capital; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_nom_bene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ls_bene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_dpfi = dpfi_cod_dpfi and pgpf_cod_edpf not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and crau_cod_dpfi = dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and crau_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_fec_fina<= ada_fec_actu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_dpfi not in (select pgpf_cod_dpfi from bcapgpf where
pgpf_cod_dpfi = x.dpfi_cod_dpfi and pgpf_cod_edpf in(1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by dpfi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_cco_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_ahor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_tcdv = tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select first 1 prdi_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaprdi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prdi_cod_prms in (2109')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and li_plz_recl<= prdi_plz_prdi ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_edpf = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cta_plaz = ft_cod_parametros(2116);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cta_plaz = ft_cod_parametros(li_cod_prms);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_pape = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select pgpf_val_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapgpf where pgpf_cod_dpfi = li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_edpf not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by pgpf_cod_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tran_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tran_cod_tran = 5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_tran = ll_num_tran + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadepg values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(depg_cod_depg)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_depg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadepg;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadbpf values(li_cod_depg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_crea_papeleta_dpf(lda_fec_actu
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(mcdv_cod_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_mcdv = ll_cod_mcdv +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamcdv values(ll_cod_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaddte values(ll_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcapgpf set pgpf_cod_edpf = 3 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadpfi set dpfi_cod_edpf = 3 where dpfi_cod_dpfi =
li_cod_dpfi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ll_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ai_cod_rubr = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----renovaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---renovacion automatica')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_rubr = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ndoc_num_tdoc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_num_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcandoc where ndoc_cod_tdoc =''PLF''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ndoc_cod_ejer = ft_cod_parametros(101);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- secuencial transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tran_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tran_cod_tran = 4;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('/*')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_nom_bene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ls_bene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_dpfi = dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_edpf not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_Cod_Clie = dpfi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_fec_fina<= ada_fec_actu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---and pgpf_cod_dpfi not in (select pgpf_cod_dpfi from bcapgpf where
pgpf_cod_dpfi = x.dpfi_cod_dpfi and pgpf_cod_edpf in(1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by dpfi_cod_dpfi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_nom_bene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by dpfi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcabanc where banc_cod_clie in (select clie_cod_clie from bcaclie
where clie_ide_clie =ls_ide_clie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select first 1 prdi_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaprdi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prdi_cod_prms in (2109')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and li_plz_recl<= prdi_plz_prdi ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_edpf = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cta_plaz = ft_cod_parametros(2116);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cta_plaz = ft_cod_parametros(li_cod_prms);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cta_reno= ft_cod_parametros(li_cod_prms);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_pape = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_tota=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_crea_papeleta_dpf(lda_fec_actu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_tota = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select pgpf_val_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapgpf where pgpf_cod_dpfi = li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_edpf not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_Cod_rubr = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by pgpf_cod_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_prdv = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(prpf_val_prpf)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_prdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaprpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prpf_cod_pgpf = li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and prpf_cod_tasi =''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_prdv is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_prdv = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_rend = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_por_rete >= 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_rend = round( (ld_val_pgpf * ld_por_rete /100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select setr_cod_setr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_setr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasetr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tptr_cod_tptr = 6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tpid_cod_iden =ls_cod_tide;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select offa_num_esta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_num_sees')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaoffa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where offa_cod_tran = 62')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and offa_cod_ofic = li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and offa_cod_esrf = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and offa_ban_Cele= li_ban_cele;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_banc = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_por_rete>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_crfi = ft_cod_parametros(1406);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_crfi = ft_asu_parametros(1406);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_crfi = ft_cod_parametros(1405);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_secu = ll_num_secu+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcarefi values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcaoffa set offa_num_actu = ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where offa_cod_tran = 62')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and offa_cod_ofic = li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and offa_cod_esrf = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and offa_ban_Cele = li_ban_cele;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(refi_cod_refi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_refi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcarefi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where refi_num_iden = ls_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and refi_fec_ingr = ada_fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select crfi_cod_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_crfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacrfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where crfi_cod_crfi = trim(ls_cod_crfi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and crfi_fec_fin is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadrtr values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadeip values(li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_secu = ll_num_secu +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_prdv >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaprpf values(li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadepg values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(depg_cod_depg)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_depg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadepg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where depg_cod_pgpf = li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and depg_fec_pago = ada_Fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadbpf values(li_cod_depg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcapgpf set pgpf_cod_edpf = 7 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_tota = ld_val_tota + ld_Val_pgpf;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_tdoc = ll_num_tdoc +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_tota = ld_val_tota + ld_Val_dpfi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_plz_dpfi <= 30 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_plz_recl = 30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_plz_dpfi <= 90 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_plz_recl = 90;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_plz_dpfi <= 180 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_plz_recl = 180;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_plz_dpfi <= 360 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_plz_recl= 360;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_plz_recl = 9999;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpfi values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadpfi set dpfi_cod_edpf = 7 where dpfi_cod_dpfi =
li_cod_dpfi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcapgpf set pgpf_cod_edpf = 7 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(dpfi_cod_dpfi )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_fina = ada_fec_actu;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tipo = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_edpf = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_plz_recl = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_plz_recl = li_plz_dpfi /li_num_pago ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_edpf = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' for li_cod_rubr in (1 TO li_num_pago ) loop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_pgpf = ld_val_tota * ld_tas_dpfi * li_plz_recl
/36000;if li_cod_rubr = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapgpf values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---let li_cod_rubr = li_cod_rubr +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(pgpf_cod_pgpf)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapgpf;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapgpf values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadepg values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapgpf values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_fina = lda_fec_fina + li_plz_recl;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end loop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select crau_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacrau')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where crau_cod_dpfi = li_cod_reno')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcacrau values(li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcarvpf values(li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcatran set tran_num_secu= ll_num_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tran_cod_tran =4; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcandoc set ndoc_num_tdoc = ll_num_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ndoc_cod_tdoc =''PLF''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ndoc_cod_ejer = ft_cod_parametros(101);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('*/')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_sepss01(ADA_FEC_INIC DATE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURNING CHAR(1) as tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(15) as numeroIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(200) as apellidosNombres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaNacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as paisnacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as genero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaIngreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as asambleageneral')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaRepresentanteAsamblea')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as directivo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechadirectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoIdentificacion CHAR(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numeroIdentificacion char(15); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define apellidosNombres char(200);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaNacimiento char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define paisnacimiento char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define genero char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorCertifAportacion decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaIngreso char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define asambleaGeneral char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaRepresentanteAsamblea char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define directivo char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechadirectivo char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaclie set clie_cod_pais =56')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_pais is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- socios activos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''M'' then clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clie_cod_tide end as tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''M'' then clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clie_ide_clie END as numeroIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case clie_nat_juri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 0 then to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''NULO'' end as fechaNacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE CLIE_NAT_JURI')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 0 THEN pais_nac_pais ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 1 THEN ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end as paisNacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case clie_nat_juri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 0 then clna_cod_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''N'' end as genero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(date(clie_fec_ingr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''AGS'' as asambleageneral')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case nvl(clie_cal_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when (select count(*) from bcaempl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''NO'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''NO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as directivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case nvl(clie_cal_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when (select count(*) from bcaempl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''NULO'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as fechadirectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('directivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tide = tide_cod_tide and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = clna_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli = tcli_cod_tcli and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie = escl_cod_escl and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_pais = pais_cod_pais and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsoc_cod_tsoc = clie_nat_juri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_tcdv= 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_est_clie not in (2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and date(clie_Fec_ingr)<= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if valorCertifAportacion <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('directivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- socios cambio certificados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''M'' then clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clie_cod_tide end as tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''M'' then clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clie_ide_clie END as numeroIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case clie_nat_juri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 0 then to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''NULO'' end as fechaNacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE CLIE_NAT_JURI')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 0 THEN pais_nac_pais ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 1 THEN ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end as paisNacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case clie_nat_juri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 0 then clna_cod_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''N'' end as genero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(date(clie_fec_ingr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''AGS'' as asambleageneral')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case nvl(clie_cal_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when (select count(*) from bcaempl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''NO'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''NO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as directivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case nvl(clie_cal_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when (select count(*) from bcaempl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''NULO'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as fechadirectivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('directivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tide = tide_cod_tide and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = clna_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli = tcli_cod_tcli and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie = escl_cod_escl and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_pais = pais_cod_pais and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsoc_cod_tsoc = clie_nat_juri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_tcdv= 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and date(clie_fec_ingr) <=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and date(dpvi_fec_cier) >ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if valorCertifAportacion <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('directivo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_bce02(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---Estructura BCE02:')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- Eliminaci�n de las variables C�digo Oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- Incorporaci�n de la variables Estado del Cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- cambio septiembre 2023')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Diego Paredes 18 e septiembre 2023')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(10) as fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as numeroidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as genero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechanacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(25) as numerocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaconcecion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as tipodecredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as estatuscuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as marcatarjeta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as canton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(6) as parroquia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as codigocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as estadocliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentificacion char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numeroidentificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechanacimiento char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define genero char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerocuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipocuenta char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define clasecuenta char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estatuscuenta char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaconcecion char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechacierre char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tarjetadedebito char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define causaldecierre char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define provincia char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define canton char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define parroquia char(6);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechatransaccion char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechavencimiento char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define bandamaduracion char(6);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define plazo integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numeroingresos integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numeroegresos integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigocuenta char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define destinoproducto char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerotitular integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipodecredito char(2) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define marcatarjeta char(1) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerotarjeta char(10) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigooficina char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estadocliente char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''S'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''P'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end as tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie as numeroidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case clna_cod_sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''X'' then ''N'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clna_cod_sexo end as sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(clie_Fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(cred_Fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN cred_cod_ccre = 1 THEN ''PC''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE =2 and cred_fec_inic<= ''04/30/2021'' then ''PN''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE =2 and cred_fec_inic> ''04/30/2021'' then ''CO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_ccre = 3 then ''IN''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_ccre = 4 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when (select count(*) from bcalcre where lcre_cod_lcred =
x.cred_cod_lcre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and (lcre_desc_lcred like ''%AGRICULTURA%'' or
lcre_desc_lcred like ''%GANADERIA%''))>0 then ''MG''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cap_cred>1000 and cred_cap_cred<10000 then
''MS''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cap_cred<=1000 then ''MM''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cap_cred>10000 then ''MA''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''MM'' end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_ccre = 9 then ''ED''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''MM'' end as tipoCredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('EOPE_SIB_EOPE AS ESTADOCREDITO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' AS MARCATARJETA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( ciud_sib_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( sect_sib_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--CALF_SAL_CRED AS SALDO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when sum(dcal_val_dcal)>0 then 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else 0 end as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_sib as oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as numerotarjetasadicionales')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--CASE CRED_COD_CCRE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--WHEN 1 THEN ''1401''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--WHEN 2 THEN ''1402''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--WHEN 3 THEN ''1403''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--when 4 then ''1404''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--when 7then ''1407'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--when 9 then ''1473''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--else ''1404'' end as codigocuenta ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('substr(dcal_divc_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaconcecion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('numerotarjeta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_eope = eope_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_ciud = sect_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_num_cred = calf_num_Cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcal_num_cred = calf_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcal_cod_Ediv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ecre not in ( 4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcal_fec_Calf = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by cred_num_Cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaconcecion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_clientes_reporte_clientessocios(ada_Fec_inic
date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----**** Diego Paredes 6 de febrero 2024 *****----')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--A�adido bandera de discapacidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--a�adido fecha de actualizacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--a�adido sector ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----**** Diego Paredes 6 de febrero 2024 *****----')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- a�adido tipo de residencia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----**** Diego Paredes 20 de febrero 2024 *****----')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(50) as apellidos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechasalida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(50) as telefonos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as edad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as oficial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as genero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as estadocivil')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(200) as referencias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as nacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(100) as ocupaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as identificacionrepre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as paisresidencia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('datetime year to second as fechaactualizacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as discapacidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(50) as sector')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(200) as beneficiario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(30) as tiporesidencia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---returning char(2500) as consulta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE c_query CHAR(2500);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcliente integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentificacion char(1) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define apellidos char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaingreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estado integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define telefonos char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechanaci char(10) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define oficina integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define oficial integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define correo char(30) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define genero ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define direccion char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define referencias char(200);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ocupaciones char(100) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_rfpe char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_clie integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tcli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tcli integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nacionalidad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define acteconomica char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define edad integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define representante char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacionrepre char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define paisresidencia char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaactualizacion datetime year to second ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define discapacidad char(2) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define sector char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define beneficiario char(200);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tiporesidencia char(30);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let referencias = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofic = and clie_cod_ofic > 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ofic = and clie_cod_ofic = || ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_est_clie = 3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_est_clie = and clie_est_clie >= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_est_clie = trim(ls_est_clie ) || and DATE(clie_fec_ingr)
between '' || ada_fec_inic || '' and '' || ada_fec_fina || '' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif ai_est_clie = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_est_clie = and clie_cod_clie in (select distinct
dpvi_cod_clie from bcadpvi where dpvi_cod_eacd = 2 and dpvi_cod_tcdv =
ft_cod_parametros(1302)); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_est_clie = trim(ls_est_clie ) || and DATE(clie_fec_ingr)
between '' || ada_fec_inic || '' and '' || ada_fec_fina || '' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif ai_est_clie = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_est_clie = and DATE(clie_fec_sali) between '' ||
ada_fec_inic || '' and '' || ada_fec_fina || '' AND (clie_est_clie =2 );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_est_clie = and DATE(clie_fec_ingr) between '' ||
ada_fec_inic || '' and '' || ada_fec_fina || '' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_est_clie = trim(ls_est_clie ) || and clie_cod_clie in (select
distinct dpvi_cod_clie from bcadpvi where dpvi_cod_eacd = 1 and dpvi_cod_tcdv =
ft_cod_parametros(1302)); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_tcli = 99 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_tcli = and clie_cod_tcli >= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_tcli = and clie_cod_tcli = || ai_cod_tcli; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = SELECT clie_cod_clie,clie_num_clie, clie_cod_tide,
clie_ide_clie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_ape_clie, clie_nom_clie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || date(clie_fec_ingr) as fec_ingre, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_fec_sali, clie_est_clie,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ft_numero_telefonos_socios(clie_cod_clie)
as telefono,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || date(clie_fec_nac) as fec_nac, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || year('' || ada_fec_fina ||'') -
year(clie_fec_nac) as edad, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_cod_ofic, clie_cod_ofct,
clie_ema_clie, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || (select clna_cod_sexo from bcaclna where
clna_cod_clie = x.clie_cod_clie) as sexo,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || (select clna_cod_intr from bcaclna where
clna_cod_clie = x.clie_cod_clie) as intruc,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || (select clna_cod_eciv from bcaclna where
clna_cod_clie = x.clie_cod_clie) as estadocivi,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_dir_domi, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || nvl((select sum(drie_val_drie) from
afcdrie where drie_cod_clie = x.clie_cod_clie and drie_cod_ineg = 1),0) as
ingresos,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || nvl((select sum(drie_val_drie) from
afcdrie where drie_cod_clie = x.clie_cod_clie and drie_cod_ineg = 2),0) as
gastos,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || nvl((select sum(drie_val_drie) from
afcdrie where drie_cod_clie = x.clie_cod_clie and drie_cod_ineg = 4) ,0) as
activos,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || nvl((select sum(drie_val_drie) from
afcdrie where drie_cod_clie = x.clie_cod_clie and drie_cod_ineg = 5),0) as
pasivos,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_cod_tcli, (select
trim(pais_des_naci) from bcapais where x.clie_cod_pais = pais_cod_pais) as
nacionalidad,;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || (select auid_Des_auid from afcauid where
auid_cod_auid = x.clie_cod_auid) autoiden, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_rep_lega, clie_ide_repr ,(select
trim(pais_des_pais) from bcapais where x.clie_pai_resi = pais_cod_pais) as
paisresidencia, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_fec_uac ,case when clie_cod_disc = 0
then ''NO'' else ''SI'' end , (select trim(sect_des_sect) from bcasect where
x.clie_cod_sect = sect_cod_sect) as sector, ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || (select tres_des_tres from afctres where
tres_cod_tres = x.clie_cod_tres) as tiporesidencia ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || FROM bcaclie x ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || WHERE ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || clie_cod_clie not in (1,2) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_est_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_ofic ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || ls_cod_tcli;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET c_query = TRIM(c_query) || order by clie_cod_ofic, clie_fec_ingr;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--return c_query ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--end procedure ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('PREPARE c_stmt FROM c_query;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DECLARE c_cur CURSOR FOR c_stmt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('OPEN c_cur ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while (1 = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FETCH c_cur INTO ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('li_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechanaci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('li_cod_tcli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF (SQLCODE != 100) THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let referencias = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(rfpe_nom_rfpe) || , || trim(rfpe_num_tele) || , ||
trim(rfpe_num_celu) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_rfpe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcrfpe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where rfpe_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let referencias = trim(referencias) || trim(ls_rfpe)
|| / ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ocupaciones = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(ocu1_Des_ocu1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_rfpe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaacli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ocup_cod_ocup = acli_cod_ocup ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and acli_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ocup_cod_ocu2 = ocu2_cod_ocu2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ocu1_cod_ocu1 = ocu2_cod_ocu1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ocupaciones= trim(ocupaciones) || trim(ls_rfpe) || / ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let beneficiario = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select TRIM(tben_des_tben)|| : || clie_num_clie || '' '' ||
clie_ape_clie || '' '' || clie_nom_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_rfpe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = bene_cod_cben')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bene_cod_tben = tben_cod_tben')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bene_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let beneficiario= trim(beneficiario) || trim(ls_rfpe) || / ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('RETURN numcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechanaci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('representante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('EXIT;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END WHILE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CLOSE c_cur;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FREE c_cur;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FREE c_stmt;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_cambio_fechas_pagos(ai_num_cred
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---CREADO POR : Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----FECHA: 9 de abril 2024')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---OBSERVACION: procedimiento para cambiar fechas de dividendos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as numcuota')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_Fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_Fec_actu = ada_Fec_pago ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_for = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_num_cred = divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_divc>=ai_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv not in (4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_Cred = ai_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by divc_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc set divc_fec_venc = lda_Fec_actu where divc_cod_divc =
li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_actu = ft_calculo_fecha(lda_Fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_for = ll_for + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_corrige_bcadivc(ai_num_cred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_srirtfaho(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----CREADO POR: Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- FECHA: 13 marzo del 2024')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---MODIFICADO POR: Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---FECHA: 21 marzo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---CAMBIOS: Pais_nac_pais por ''593''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---MODIFICADO POR: Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---FECHA: 25 marzo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---CAMBIOS: CASE PARA TIPO identificacion F a E')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---MODIFICADO POR: Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---FECHA: 26 marzo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---CAMBIOS: cambio de consultas por sp por ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(1) as tipoidcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as idcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(100) as razonsocial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as paisnacionalidad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as dirprov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(5) as dircanton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as tipoproducto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(20) as numproducto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numopercred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numoperdeb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as codmoneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidcliente char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define idcliente char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define razonsocial char(100) ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define paisnacionalidad char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define dirprov char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define dircanton char(5);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoproducto char(3); ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numproducto char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldoinic decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valcredito decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numopercred integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valdebito decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numoperdeb integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldofinal decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valcreditocnb decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valdebitocnb decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codmoneda char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ad_val_parm decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_clie integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--let ad_val_parm = ft_cod_parametros (16);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_val_parm =5000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf3_transacciones where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf1_clientes where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf2_productos where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf4_bancos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---depositos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when mcdv_cod_tran in (9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else 1 end as transacciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv y ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> ft_cod_parametros(1301)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having sum(mcdv_val_mcdv)>=ad_val_parm;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into uaf0_socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from uaf0_socios1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from uaf0_socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- transacciones captaciones ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''F'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as tipoidcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as idcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''593'' as paisnacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''AHO'' as tipoproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(dpvi_num_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sp_numvalor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sp_numvalor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select distinct sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where d.dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_det_mcdv like ''%CASH%''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select distinct sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where d.dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_det_mcdv like ''%CASH%''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran in (9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo as codmoneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into tipoidcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> ft_cod_parametros(1301)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoidcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_srirtfdpf(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----CREADO POR: Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- FECHA: 13 marzo del 2024')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---MODIFICADO POR: Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---FECHA: 21 marzo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---CAMBIOS: Pais_nac_pais por ''593''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(1) as tipoidcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as idcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(100) as razonsocial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as paisnacionalidad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as dirprov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(5) as dircanton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as codmoneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidcliente char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define idcliente char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define razonsocial char(100) ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define paisnacionalidad char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define dirprov char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define dircanton char(5);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define capitalinvrs decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codmoneda char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ad_val_parm decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_clie integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--let ad_val_parm = ft_cod_parametros (16);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_val_parm =5000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf3_transacciones where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf1_clientes where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf2_productos where not clie_cod_tide is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf0_socios1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete uaf4_bancos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct dpfi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having sum(dpfi_val_dpfi)>=ad_val_parm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- transacciones captaciones ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''F'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as tipoidcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as idcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''593'' as paisnacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ld_valor as capitalinvrs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo as codmoneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into tipoidcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = pape_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(mcdv_fec_mcdv) between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoidcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_srirtfcred(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----CREADO POR: Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- FECHA: 13 marzo del 2024')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---MODIFICADO POR: Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---FECHA: 21 marzo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---CAMBIOS: Pais_nac_pais por ''593''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---MODIFICADO POR: Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---FECHA: 25 marzo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---CAMBIOS: CASE PARA TIPO identificacion F a E')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---MODIFICADO POR: Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---FECHA: 26 Marzo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---CAMBIOS: suma de valores para creditos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---MODIFICADO POR: Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---FECHA: 1 Abril ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---CAMBIOS: cambio tipo credito educativo ED')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(1) as tipoidcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as idcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(100) as razonsocial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as paisnacionalidad ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as dirprov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(5) as dircanton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as diasmorosidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as tipocredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as estadooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as codmoneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidcliente char(1);define idcliente char(13);define razonsocial
char(100) ; --3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define paisnacionalidad char(3);define dirprov char(3);define dircanton
char(5);define diasmorosidad integer;define tipocredito char(2);define
estadooperacion char(1) ;define totalvalorvencer decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define totalvalorvencernointeres decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define totalvencido decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define gastocarteravencida decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define interesordinario decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define interesmora decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define demandajudicial decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define carteracastigada decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codmoneda char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ad_val_parm decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_clie integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----cartera activa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_tide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_tide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''F'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_cod_tide ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as tipoidcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''S'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''M'' then case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when length(nvl(clie_ide_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_repr end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else clie_ide_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end as idcliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(clie_ape_clie) || || nvl(trim(clie_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ''593'' as paisnacionalidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(prov_cod_regi) || trim(ft_llena_espacios(prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(calf_dias_venc) as diasmorosidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN CRED_COD_CCRE =1 and lcre_por_enca = 1 THEN ''CR''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN CRED_COD_CCRE =1 and lcre_por_enca = 2 THEN ''CM''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN CRED_COD_CCRE =1 and lcre_por_enca = 3 THEN ''CY''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE=2 then ''CO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE =3 then ''IN''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 9 then ''ED''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 4 and lcre_por_enca = 4 then ''MM''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 4 and lcre_por_enca = 5 then ''MS''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE = 4 and lcre_por_enca = 6 then ''MA''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''MM'' end as tipoCredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' eope_sib_eope as estadooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(calf_val_acti) as totalvalorvencer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(calf_val_deve) as totalvalorvencernointeres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(calf_Val_venc) as totalvencido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 0 as gastocarteravencida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(nvl((select sum(dcal_val_deve) from afcdcal where
dcal_num_cred = c.cred_num_Cred and dcal_fec_Calf =ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(nvl(calf_val_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(calf_val_dema) as demandajudicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(calf_val_cast) as carteracastigada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mone_simbolo as codmoneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into tipoidcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('totalvencido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ofic_cod_coop = coop_cod_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_lcre = lcre_cod_lcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and eope_cod_eope = cred_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mone_cod_mone = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_num_cred = cred_num_Cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_fec_Calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoidcliente ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('totalvencido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('with resume;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_listas_educacion_financiera(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaingreso date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define control integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)< ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)< ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier> ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_listas_representantes_asamblea(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaingreso date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define control integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)< ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cal_clie = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)< ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cal_clie = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier> ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_listas_votacion_representantes(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaingreso date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define control integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)< ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)< ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier> ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_listas_reunion_miembros_cad(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaingreso date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define control integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where empl_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_fec_sali is null')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_carg = carg_cod_carg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and carg_cod_tica = 7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_fec_ingr <=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where empl_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_carg = carg_cod_carg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and carg_cod_tica = 7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_fec_ingr <=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_fec_sali> ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_listas_reunion_miembros_cv(ada_fec_inic
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numcliente integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombres char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaingreso date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define control integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where empl_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_fec_sali is null')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_carg = carg_cod_carg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and carg_cod_tica = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_fec_ingr <=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where empl_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_carg = carg_cod_carg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and carg_cod_tica = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_fec_ingr <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_fec_sali> ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsbs01(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' returning char(10) as codigoIndicador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' char(30) as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define codigoIndicador char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define nombreIndicador char(200);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define cumplimiento char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valornumerador decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valordenominador decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valorTotal decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define ls_tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define ld_Saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete afcdbal where dbal_cod_dbal >0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_balancesocial_p1(ada_fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_balancesocial_p2(ada_fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_balancesocial_p3(ada_fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_balancesocial_p4(ada_fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_balancesocial_p6(ada_fec_inic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bals_ind_seps')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bals_nom_seps ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(dbal_cod_cump')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(dbal_val_nume')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(dbal_val_deno ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(dbal_val_resu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dbal_des_tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into codigoIndicador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dbal_cod_bals = bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dbal_fec_dbal = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return codigoIndicador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_bce01(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- Modificacdo 18 de septiembre del 2023 - Para septiembre 2023')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- Eliminaci�n de las variables C�digo Oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---Incorporaci�n de la variables Estado del Cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Modificacion de gnero para socios juridicos 31 enero 2024 Diego
Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(10) as fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as indentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechanacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as genero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(25) as numerocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as tipocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as clasecuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as estatuscuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaacierrecuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as tarjetadebito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as cuasaldecierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as canton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(6) as parroquia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(6) as bandamaduracion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as saldo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as estadocliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentificacion char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numeroidentificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechanacimiento char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define sexo char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerocuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipocuenta char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define clasecuenta char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estatuacuenta char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaapertura char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechacierre char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tarjetadedebito char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define causaldecierre char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define provincia char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define canton char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define parroquia char(6);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechatransaccion char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechavencimiento char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define bandamaduracion char(6);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define plazo integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numeroingresos integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numeroegresos integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define oficina char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define destinoproducto char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerotitular integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_Saldo integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estadocliente char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- ACTIVOS NUEVOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''S'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''P'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''M'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''F'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end as tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie as numeroidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''N''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clna_cod_sexo = ''X'' then ''N'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clna_cod_sexo end as sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--when dpvi_fec_ingr <= ada_fec_fina and dpvi_fec_ingr >= ada_fec_inic
then 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--else 5 end as estatuscuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('5 asestatuacuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when dpvi_fec_inic < clie_fec_nac then to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else to_char(dpvi_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- to_char(dpvi_Fec_cier')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as fechacierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''X'' as tarjetadedebito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as causaldecierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( ciud_sib_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( sect_sib_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_dpvi_maxfecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as bandamaduracion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_sib as oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ft_calculo_edad(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ft_calculo_edad(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''B'' end as destinoproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_num_firm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into fecha ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tfir = tfir_cod_tfir')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_ciud = sect_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd in ( 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv <> ft_cod_parametros(1301)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv in (select tcdv_cod_tcdv from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF tipoidentificacion=''R'' THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET sexo=''N'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldo>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_saldo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif saldo= 0then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_Saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_saldo = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoidentificacion =''S'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let tipoidentificacion =''R'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let numeroidentificacion =''2091756601001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let sexo=''N'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return fecha ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- ACTIVOS VIGENTES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''S'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''P'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''M'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''F'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end as tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie as numeroidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''N''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clna_cod_sexo = ''X'' then ''N'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clna_cod_sexo end as sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--when dpvi_fec_ingr <= ada_fec_fina and dpvi_fec_ingr >= ada_fec_inic
then 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--else 5 end as estatuscuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('5 asestatuacuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when dpvi_fec_inic < clie_fec_nac then to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else to_char(dpvi_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- to_char(dpvi_Fec_cier')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as fechacierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''X'' as tarjetadedebito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as causaldecierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( ciud_sib_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( sect_sib_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_dpvi_maxfecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as bandamaduracion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_sib as oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ft_calculo_edad(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ft_calculo_edad(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''B'' end as destinoproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_num_firm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into fecha ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tfir = tfir_cod_tfir')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_ciud = sect_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_fec_inic < ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd in ( 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv <> ft_cod_parametros(1301)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv in (select tcdv_cod_tcdv from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF tipoidentificacion=''R'' THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET sexo=''N'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldo>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_saldo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif saldo= 0then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_Saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_saldo = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoidentificacion =''S'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let tipoidentificacion =''R'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let numeroidentificacion =''2091756601001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let sexo=''N'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return fecha ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--CERRADOS luego DE PERIODO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''S'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''P'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''M'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''F'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end as tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie as numeroidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''N''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clna_cod_sexo = ''X'' then ''N'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clna_cod_sexo end as sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--when dpvi_fec_ingr <= ada_fec_fina and dpvi_fec_ingr >= ada_fec_inic
then 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--else 5 end as estatuscuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('5 as estatuacuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when dpvi_fec_inic < clie_fec_nac then to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else to_char(dpvi_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- to_char(dpvi_Fec_cier')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as fechacierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''X'' as tarjetadedebito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as causaldecierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( ciud_sib_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( sect_sib_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_dpvi_maxfecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as bandamaduracion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ft_calculo_edad(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ft_calculo_edad(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''B'' end as destinoproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_num_firm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tfir = tfir_cod_tfir and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_ciud = sect_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_fec_cier > ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_fec_inic < ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd in ( 4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv<> ft_cod_parametros(1301)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv in (select tcdv_cod_tcdv from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_fec_cier > ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF tipoidentificacion=''R'' THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET sexo=''N'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldo>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_saldo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif saldo= 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_Saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_saldo = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoidentificacion =''S'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let tipoidentificacion =''R'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let numeroidentificacion =''2091756601001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let sexo=''N'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return fecha ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('/*')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--CERRADOS EN PERIODO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''S'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''P'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''M'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''F'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end as tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie as numeroidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''N''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clna_cod_sexo = ''X'' then ''N'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clna_cod_sexo end as sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--when dpvi_fec_ingr <= ada_fec_fina and dpvi_fec_ingr >= ada_fec_inic
then 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--else 5 end as estatuscuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('5 as estatuacuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when dpvi_fec_inic < clie_fec_nac then to_char(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else to_char(dpvi_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- to_char(dpvi_Fec_cier')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as fechacierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''X'' as tarjetadedebito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as causaldecierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( ciud_sib_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( sect_sib_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_dpvi_maxfecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as bandamaduracion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ft_calculo_edad(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ft_calculo_edad(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''B'' end as destinoproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_num_firm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tfir = tfir_cod_tfir and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_ciud = sect_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_fec_cier between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd in ( 4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv<> ft_cod_parametros(1301)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv in (select tcdv_cod_tcdv from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_fec_cier > ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF tipoidentificacion=''R'' THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET sexo=''N'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldo>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_saldo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif saldo= 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_Saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_saldo = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoidentificacion =''S'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let tipoidentificacion =''R'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let numeroidentificacion =''2091756601001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let sexo=''N'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return fecha ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('*/')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- PLAZOS FIJOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select to_char(date(ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''S'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''P'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''M'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''F'' then ''E''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end as tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ide_clie as numeroidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(clie_Fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''N''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clna_cod_sexo = ''X'' then ''N'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else clna_cod_sexo end as sexo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--when dpvi_fec_ingr <= ada_fec_fina and dpvi_fec_ingr >= ada_fec_inic
then 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--else 5 end as estatuscuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('5 as estatuacuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(dpfi_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- to_char(dpfi_Fec_cier')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as fechacierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''X'' as tarjetadedebito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''0'' as causaldecierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( ciud_sib_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( sect_sib_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(dpfi_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(hdpf_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_prms_dinamico(hdpf_plz_hdpf) as bandamaduracion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_plz_hdpf as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_val_dpfi as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 numeroIngresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 numeroEgresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_sib as oficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''0'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ft_calculo_edad(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ft_calculo_edad(clie_fec_nac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''B'' end as destinoproducto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1 as numerotitular')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into fecha ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpfi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_ciud = sect_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and prov_cod_prov = ciud_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_dpfi = hdpf_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and date(hdpf_Fec_hdpf) = ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and hdpf_Fec_venc>=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF tipoidentificacion=''R'' THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET sexo=''N'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechaapertura')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_arreglo_saldo_dpvi(li_anio integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning integer as dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_dpvi_ante = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute PROCEDURE informix.sp_crea_saldos(li_anio ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpvi_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi in (ai_cod_dpvi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---nd clie_num_clie = 487')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_dpvi <> li_cod_dpvi_ante then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cont = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_sal_cont= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec=''01/01/1900'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_cont =0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(sald_fec_sald)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_cod_dpvi =li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and year(sald_fec_sald)<li_anio ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sald_conta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_sal_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_fec_sald = lda_fec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sald_cod_dpvi = li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(vpcn_valor * vpcn_num_vpcn)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where vpcn_cod_dpvi = li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' YEAR(mcdv_fec_mcdv)=li_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_egresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = li_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' YEAR(mcdv_fec_mcdv)=li_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dchv_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_cheques')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadchv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dchv_cod_mcdv = mcdv_cod_mcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_dpvi = li_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' YEAR(mcdv_fec_mcdv) =li_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_num_cheq <> 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dchv_cod_modu in (5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (dchv_est_actu is null or')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dchv_est_actu = 5);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_ingresos is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_ingresos = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_egresos is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_egresos = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_picn is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_picn = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_cheques is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cheques = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_sal_cont is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_sal_cont= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dpvi_sal_disp = ld_sal_cont + (ld_ingresos - (ld_egresos +
ld_val_picn + ld_cheques))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_sal_cont = ld_sal_cont + (ld_ingresos - ld_egresos)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi = li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_dpvi_ante= li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sricrs(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---CREADO POR: Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---FECHA: 10 de mato 2024')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---OBSERVACION: Cambio de reporte que genere todos y no se repitan ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(1) as tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(30) as primerapellido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentificacion char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define paisnaci char(3) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define primernombre ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define nombreapellido char(50) ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define primerapellido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define paisresi char(3) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define direccion char(50) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechanacimiento char(10) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ciudad char(30) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define paisresidencia char(3) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipo integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuenta char(15) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cliente char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define natjuri integer ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigo integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechainic date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---//Nuevos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_dir_domi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_pais = pais_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_tres = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_inic <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> ft_cod_parametros(1301)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_Eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let primernombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let primerapellido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let nombreapellido = trim(primerapellido) || ||trim(primernombre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- existentes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_dir_domi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_pais = pais_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_tres = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_inic <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier > ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> ft_cod_parametros(1301)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_Eacd in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie not in(10740')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let primernombre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let primerapellido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let nombreapellido = trim(primerapellido) || ||trim(primernombre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return tipoidentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sricrssaldos(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---CREADO POR: Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---FECHA: 10 de mato 2024')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---OBSERVACION: Cambio de reporte que genere saldo menos el valor de
interes y en caso de ATAHUALPA NO SE cambia el tipo como 13 porque asi lo sugiere
la cooperativa en correo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuenta char(15) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let cuenta = ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 1 as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_tcdv not in (1) and dpvi_cod_clie = cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(mcdv_val_mcdv) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into saldo1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran = 13 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie = cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = coddpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if saldo1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return saldo - saldo1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return saldo1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select hdpf_val_dpfi as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 1 as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_num_dpfi as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_clie = cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_dpfi = hdpf_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(hdpf_fec_hdpf) = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(pgpf_val_pgpf) as saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 13 as tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_num_clie || as cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_clie = cliente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpfi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_dpfi = pgpf_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_rubr = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_fec_inic >''06/30/2019''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_Edpf not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsc01(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---MODIFICADO POR: Diego Paredes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--FECHA: 14 marzo 2024')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---Cambio en el tipo de credito tomando en cuenta la linea de credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char (1) as tipoidentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(15) as identificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numerooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaconcesion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechavencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as periodicidadpago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as oficinaconcesion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as garanteCodeudorGarantia ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as tipocredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as estadooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(32) as numerooperacionanterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as origenoperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as tipooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as causalvinculacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(7) as actividadeconomicareceptoraOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as geograficoProvincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as geograficoCanton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as geograficoParroquia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as aplicaResolucion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as aplicaPeriodoGracia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numPeriodoGracia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoidentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaconcesion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacionsujeto char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define periodicidadpago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerooperacionanterior char(32);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define causalvinculacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numParticipantesCredito char(5);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define actividadeconomica char(7);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valoroperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tasainteresnominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define frecuenciarevision integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_ingresos decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ccre integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_inic date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define aplicaResolucion char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define aplicaPeriodoGracia char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numPeriodoGracia integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valCondonacionInteresNormal decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valCondonacionInteresMora decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valCondonacionGastoLegal decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valCondonacionDemandaJudicial decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_cod_tide as tipoIdentificacionSujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_ide_clie as identificacionSujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_paga as numeroOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cap_cred as valorOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_tas_cred as tasaInteresNominal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' to_char(cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN CRED_FEC_VENC<= ada_fec_fina THEN
to_char(DATE(ada_fec_fina) +1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE to_char(cred_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(intv_cod_siba')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_cod_sib as oficinaConcesion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_cod_tgar =2 or cred_cod_tgar =3 or cred_cod_tgar =7 or
cred_cod_tgar =11 or cred_cod_tgar = 9 then ''GR''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''GQ'' end as garante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN CRED_COD_CCRE =1 and lcre_por_enca = 3 THEN ''CY''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN CRED_COD_CCRE =1 and lcre_por_enca = 2 THEN ''CM''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN CRED_COD_CCRE =1 and lcre_por_enca = 1 THEN ''CR''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE =2 and cred_fec_inic<= ''04/30/2021'' then ''PN''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE =2 and cred_fec_inic> ''04/30/2021'' then ''CO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE =2 and clie_cod_tide = ''R'' then ''MA'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when CRED_COD_CCRE =3 then ''IN''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN CRED_COD_CCRE =4 and lcre_por_enca = 4 THEN ''MI''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN CRED_COD_CCRE =4 and lcre_por_enca = 5 THEN ''AS''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN CRED_COD_CCRE =4 and lcre_por_enca = 6 THEN ''AA''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''MM'' end as tipoCredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN (SELECT MAX(CRED_NUM_CRED) FROM BCACRED WHERE CRED_NUM_RELI =
Y.CRED_NUM_CRED and cred_fec_inic<ada_fec_inic ) >0 THEN eope_sib_eope ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE ''N'' END as estadoOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tope_sib_tope as tipoOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN (SELECT MAX(CRED_NUM_CRED) FROM BCACRED WHERE CRED_NUM_RELI =
Y.CRED_NUM_CRED and cred_fec_inic<ada_fec_inic ) >0 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (SELECT MAX(CRED_NUM_paga) FROM BCACRED WHERE CRED_NUM_RELI =
Y.CRED_NUM_CRED) || ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE ''NULO'' END as numerooperacionanterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' orig_sib_orig as origenoperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tvin_sib_tvin as causalVinculacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ocup as actividadEconomica')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(ciud_sib_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ft_llena_espacios(sect_sib_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(drie_val_drie) from afcdrie where drie_cod_ineg = 1 and
drie_cod_clie = x.clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN (SELECT MAX(CRED_NUM_CRED) FROM BCACRED WHERE CRED_NUM_RELI =
Y.CRED_NUM_CRED) >0 and cred_cod_ccre = 4 and cred_cod_eope>2 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case cred_ban_afin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 1 then ''S''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when 0 then ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''NULO'' end as aplicaResolucion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN (SELECT MAX(CRED_NUM_CRED) FROM BCACRED WHERE CRED_NUM_RELI =
Y.CRED_NUM_CRED) >0 and cred_cod_ccre = 4 and cred_cod_eope>2 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_ban_afin =1 and cred_nct_grac>0 then ''K''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_ban_afin =1 and cred_nct_grac=0 then ''N''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''NULO'' end')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''NULO'' end as aplicaPeriodoGracia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN (SELECT MAX(CRED_NUM_CRED) FROM BCACRED WHERE CRED_NUM_RELI =
Y.CRED_NUM_CRED) >0 and cred_cod_ccre = 4 and cred_cod_eope>2 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_ban_afin =1 then cred_nct_grac ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else -9999 end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else -9999 end as numPeriodoGracia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN (SELECT MAX(CRED_NUM_CRED) FROM BCACRED WHERE CRED_NUM_RELI =
Y.CRED_NUM_CRED) >0 and cred_cod_ccre = 4 and cred_cod_eope>2 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_ban_afin =1 then nvl((select sum(abdv_val_abdv) from
bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = cred_num_Cred and cred_num_reli =
y.cred_num_cred and abdv_cod_rubr in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv = y.cred_fec_inic and abdv_sal_abdv
= 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else -9999.99 end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else -9999.99 end as valCondonacionInteresNormal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN (SELECT MAX(CRED_NUM_CRED) FROM BCACRED WHERE CRED_NUM_RELI =
Y.CRED_NUM_CRED) >0 and cred_cod_ccre = 4 and cred_cod_eope>2 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_ban_afin =1 then nvl((select sum(abdv_val_abdv) from
bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = cred_num_Cred and cred_num_reli =
y.cred_num_cred and abdv_cod_rubr in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv = y.cred_fec_inic and abdv_sal_abdv
= 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else -9999.99 end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else -9999.99 end as valCondonacionInteresMora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN (SELECT MAX(CRED_NUM_CRED) FROM BCACRED WHERE CRED_NUM_RELI =
Y.CRED_NUM_CRED) >0 and cred_cod_ccre = 4 and cred_cod_eope>2 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_ban_afin =1 then nvl((select sum(abdv_val_abdv) from
bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = cred_num_Cred and cred_num_reli =
y.cred_num_cred and abdv_cod_rubr in (7)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv = y.cred_fec_inic and abdv_sal_abdv
= 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else -9999.99 end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else -9999.99 end as valCondonacionGastoLegal ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHEN (SELECT MAX(CRED_NUM_CRED) FROM BCACRED WHERE CRED_NUM_RELI =
Y.CRED_NUM_CRED) >0 and cred_cod_ccre = 4 and cred_cod_eope>2 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when cred_ban_afin =1 then nvl((select sum(abdv_val_abdv) from
bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_num_cred = cred_num_Cred and cred_num_reli =
y.cred_num_cred and abdv_cod_rubr not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and abdv_fec_abdv = y.cred_fec_inic and abdv_sal_abdv
= 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else -9999.99 end ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else -9999.99 end as valCondonacionDemandaJudicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into tipoidentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' origenoperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('aplicaResolucion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' valCondonacionGastoLegal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_tcre = tcre_cod_tcre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_tope = tope_cod_tope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_eope = eope_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ofic = ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ccre = ccre_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tvin_cod_tvin = cred_cod_tvin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ffin = ffin_cod_ffin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_dtcr = dtcr_cod_dtcr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_lcre = lcre_cod_lcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_orig = orig_cod_orig')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- and cred_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_fec_adqu between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_cred in (select calf_num_cred from bcacalf where
calf_fec_calf=ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if tasaInteresNominal = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tasaInteresNominal= 0.01;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tasaEfectivaAnual = 0.01;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if lda_fec_inic>''04/30/2021'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ccre = 4 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_ingresos = ld_ingresos *12;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return tipoidentificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' origenoperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' causalvinculacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('aplicaResolucion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' valCondonacionGastoLegal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsd01(ada_fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char (3) as tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(15) as identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(15) as codIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as paisNacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(1) as tipoCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(15) as numCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as canton')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(2) as parroquia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numeroIngresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as numeroEgresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaEmision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaVencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as codigoOficina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as tipoDeposito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as estadoCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaCierreCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as causalCierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as tarjetaDebito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoIdentificacion char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define paisnacimiento char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoCuenta char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define bandaMaduracion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estadoOperacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldoInicial ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numeroIngresos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_sal_ne decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoDeposito char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define estadoCuenta char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaCierreCuenta char(10) ;define causalCierre char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tarjetaDebito char(4) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define saldo_confirmar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo_nega decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_inic date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numconfirmar char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpfi integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fec_emis date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_otros_depositos = 4043.52-115.93-43.52 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_sal_ne = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo_nega = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_sal_ne = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----nuevos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_cod_tide as tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_cod_identificacion(clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else pais_nac_pais end as paisnacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(tcap_cod_siba) as tipoCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(dpvi_num_dpvi) as numCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( ciud_sib_ciud ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( sect_sib_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numvalor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numvalor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_dpvi_provision(dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN TCAP_COD_TCAP = 2 THEN NVL(DPVI_TAS_DPVI')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select max(tadv_tas_acti) from bcatadv where tadv_cod_tcdv =
x.dpvi_cod_tcdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_dpvi_maxfecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(dpvi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE TCAP_COD_TCAP ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 3 THEN NVL((SELECT to_char(MAX(CRED_FEC_VENC)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = X.DPVI_COD_CLIE AND CRED_COD_ECRE NOT IN (4))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' END as fechaVencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE TCAP_COD_TCAP ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 3 THEN NVL((SELECT MAX(CRED_FEC_VENC) - MAX(CRED_FEC_INIC) FROM
BCACRED')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE cred_num_cred= calf_num_cred and CRED_COD_CLIE = X.DPVI_COD_CLIE
AND CRED_COD_ECRE NOT IN (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and calf_fec_calf =ada_fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 END as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ofic_cod_sib as codigoOficina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE TCAP_COD_TCAP ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 3 then ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else tpdv_sib_tpdv end as tipodeposito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1 as estadocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as fechacierrecuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ttad_sib_ttad from afcdpta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_confirmar (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv= tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tcap = tcap_cod_tcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tpdv = tpdv_cod_tpdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_pais = pais_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd = eacd_cod_eacd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tcdv <> 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ofic_cod_ofic = dpvi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_fec_inic BETWEEN ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and (dpvi_fec_cier>ada_Fec_fina or dpvi_fec_cier is null)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoIdentificacion = ''S'' or tipoIdentificacion = ''M'' or
tipoIdentificacion = ''O'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipoIdentificacion = ''R'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select coop_ruc_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let paisNacimiento =''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoIdentificacion=''R'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let paisNacimiento =''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldo <0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_nega = abs(saldo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldo_nega >0 and saldo> ld_saldo_nega then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - ld_saldo_nega;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_nega = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''07/31/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''65751200444'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 844.21;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta=''1110879'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo_confirmar = saldo_confirmar - 6034.70 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldo_confirmar> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoCuenta =''V'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let numconfirmar = % || trim(replace(numcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dvco_num_dvco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into numconfirmar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdvco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dvco_ide_dvco = trim(identificacion)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dvco_num_dvco like numconfirmar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dvco_fec_emis<=ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numconfirmar is null or length(numconfirmar ) = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdvco values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---vigentes activos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_cod_tide as tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_cod_identificacion(clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case when clie_nat_juri = 1 then ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else pais_nac_pais end as paisnacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(tcap_cod_siba) as tipoCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(dpvi_num_dpvi) as numCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( ciud_sib_ciud ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( sect_sib_sect ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numvalor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numvalor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_dpvi_provision(dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN TCAP_COD_TCAP = 2 THEN NVL(DPVI_TAS_DPVI')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select max(tadv_tas_acti) from bcatadv where tadv_cod_tcdv =
x.dpvi_cod_tcdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_dpvi_maxfecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(dpvi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE TCAP_COD_TCAP ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 3 THEN NVL((SELECT to_char(MAX(CRED_FEC_VENC)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = X.DPVI_COD_CLIE AND CRED_COD_ECRE NOT IN (4))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' END as fechaVencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE TCAP_COD_TCAP ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 3 THEN NVL((SELECT MAX(CRED_FEC_VENC) - MAX(CRED_FEC_INIC) FROM
BCACRED')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = X.DPVI_COD_CLIE AND CRED_COD_ECRE NOT IN (4))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 END as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_sib as codigoOficina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE TCAP_COD_TCAP ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 3 then ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else tpdv_sib_tpdv end as tipodeposito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1 as estadocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as fechacierrecuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as causalCierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ttad_sib_ttad from afcdpta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_confirmar (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv= tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tcap = tcap_cod_tcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tpdv = tpdv_cod_tpdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_pais = pais_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd = eacd_cod_eacd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tcdv not in (1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ofic_cod_ofic = dpvi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_fec_inic< ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numCuenta=780 or numCuenta=1319 or numCuenta=110179 or
numCuenta=110627 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let interesesPorPagar=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldoInicial <0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldoInicial = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldo <0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_nega = abs(saldo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldo_nega >0 and saldo> ld_saldo_nega then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - ld_saldo_nega;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_nega = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoIdentificacion=''R'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let paisNacimiento =''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoIdentificacion = ''S'' or tipoIdentificacion = ''M'' or
tipoIdentificacion = ''O'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipoIdentificacion = ''R'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select coop_ruc_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let paisNacimiento = ''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''07/31/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''1373'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo -172.79;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''110940'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''09/30/2021'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 855.13;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''1723'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''03/31/2021'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 866.71;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''12/31/2019'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let interesesPorPagar = 801.18;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''03/31/2020'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let interesesPorPagar = 801.18;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''06/30/2020'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let interesesPorPagar = 801.18;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''09/30/2020'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let interesesPorPagar = 801.18;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''12/31/2020'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let interesesPorPagar = 801.44;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''12/31/2021'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numCuenta =''172317231723'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fechaEmision =''31/12/2021'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let estadoOperacion =''NV'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina >''12/31/2021'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let fechaEmision =''31/12/2021'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numCuenta =''172317231723'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''03/31/2021'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let interesesPorPagar = 801.86;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''06/30/2021'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo -814.27;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''09/30/2021'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 1715.26-2.5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''12/31/2021'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 822.64;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''01/31/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 822.65;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''02/28/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 822.66;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''03/31/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 822.66;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''04/30/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 981.54;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''05/31/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 981.54;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''06/30/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 181.45;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''08/31/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 883.34;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''09/30/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 187.09;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''10/31/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 231.27;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''11/30/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 159.45;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''12/31/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 159.45;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_otros_depositos>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldo > 1000 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_otros_depositos>=1000 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 1000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo_confirmar = 1000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_otros_depositos = ld_otros_depositos -1000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - ld_otros_depositos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo_confirmar = ld_otros_depositos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_otros_depositos = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''01/31/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 159.45;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''02/28/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 159.45;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''03/31/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 2760.76;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''03/31/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 2760.76;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''04/30/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 642.57;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''05/31/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 4800.55;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''06/30/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 788.63;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''07/31/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 3554.85;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''08/31/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 199.46;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''09/30/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 9.45;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''10/31/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''62600200466'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo +1237.28;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''11/30/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''1373'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 5199.45;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta = ''8887292111836'' or numcuenta =''8906232111836'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let tipoIdentificacion =''R'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let identificacion = ''1715403752001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let paisNacimiento =''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''12/31/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''1373'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 845.83;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''01/31/2024'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''1373'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 194.34;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''02/29/2024'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''1373'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 1208.81;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''03/31/2024'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''390'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo -198.52;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''1723'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ADA_FEC_FINA = ''09/30/2021'' THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NV''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasaInteres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''06/30/2021'' OR ada_Fec_fina =''09/30/2021'' OR
ada_Fec_fina =''12/31/2021'' OR ada_Fec_fina =''01/31/2022'' OR ada_Fec_fina
=''02/28/2022'' OR ada_Fec_fina =''03/31/2022'' OR ada_Fec_fina =''04/30/2022'' OR
ada_Fec_fina =''05/31/2022'' OR ada_Fec_fina =''06/30/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if interesesPorPagar > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let interesesPorPagar = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('estadoOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasaInteres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let numconfirmar = % || trim(replace(numcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dvco_num_dvco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into numconfirmar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdvco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dvco_ide_dvco = trim(identificacion)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dvco_num_dvco like numconfirmar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dvco_fec_emis<=ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''110940'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''03/31/2021'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo_confirmar = saldo_confirmar + 840.15;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''06/30/2021'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo_confirmar = saldo_confirmar + 840.15;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_Fec_fina =''02/28/2022'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo_confirmar = saldo_confirmar + 800.09;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldo_confirmar>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let fechaemision = to_char(lda_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let numcuenta = trim(replace(numcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if length(trim(numconfirmar)) = 0 or numconfirmar is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdvco values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if length(trim(numconfirmar)) = 0 or numconfirmar is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipoCuenta =''N'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numcuenta = trim(numconfirmar );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- let estadoOperacion =''VG'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoCuenta =''V'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--vigentes cerrados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_cod_tide as tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_cod_identificacion(clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else pais_nac_pais end as paisnacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(tcap_cod_siba) as tipoCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(dpvi_num_dpvi) as numCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( ciud_sib_ciud ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( sect_sib_sect ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numvalor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numvalor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_dpvi_provision(dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN TCAP_COD_TCAP = 2 THEN NVL(DPVI_TAS_DPVI')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select max(tadv_tas_acti) from bcatadv where tadv_cod_tcdv =
x.dpvi_cod_tcdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_dpvi_maxfecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(dpvi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE TCAP_COD_TCAP ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 3 THEN NVL((SELECT to_char(MAX(CRED_FEC_VENC)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = X.DPVI_COD_CLIE AND CRED_COD_ECRE NOT IN(4))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' END as fechaVencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE TCAP_COD_TCAP ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 3 THEN NVL((SELECT MAX(CRED_FEC_VENC) - MAX(CRED_FEC_INIC) FROM
BCACRED')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = X.DPVI_COD_CLIE AND CRED_COD_ECRE NOT IN (4))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 END as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_sib as codigoOficina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE TCAP_COD_TCAP ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 3 then ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else tpdv_sib_tpdv end as tipodeposito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1 as estadocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as fechacierrecuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as causalCierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ttad_sib_ttad from afcdpta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_confirmar (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv= tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and clie_cod_pais = pais_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tcap = tcap_cod_tcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tpdv = tpdv_cod_tpdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd = eacd_cod_eacd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tcdv not in (1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ofic_cod_ofic = dpvi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_fec_cier > ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_fec_inic< ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoIdentificacion = ''S'' or tipoIdentificacion = ''M'' or
tipoIdentificacion = ''O'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipoIdentificacion = ''R'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select coop_ruc_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let paisNacimiento = ''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoIdentificacion=''R'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let paisNacimiento =''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldoInicial <0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldoInicial = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldo <0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_nega = abs(saldo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_saldo_nega >0 and saldo> ld_saldo_nega then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - ld_saldo_nega;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_nega = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''09/30/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcuenta =''655923111501'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 9.45;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dvco_num_dvco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into numconfirmar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcdvco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dvco_ide_dvco = trim(identificacion)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dvco_num_dvco like numconfirmar;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldo_confirmar>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let fechaemision = to_char(lda_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let numcuenta = trim(replace(numcuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if length(trim(numconfirmar)) = 0 or numconfirmar is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdvco values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if length(trim(numconfirmar)) = 0 or numconfirmar is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipoCuenta =''N'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numcuenta = trim(numconfirmar );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- let estadoOperacion =''VG'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoCuenta =''V'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--cerrados en periodo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_cod_tide as tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_cod_identificacion(clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else pais_nac_pais end as paisnacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(tcap_cod_siba) as tipoCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trim(dpvi_num_dpvi) as numCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( ciud_sib_ciud ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( sect_sib_sect ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numvalor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numvalor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_dpvi_provision(dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN TCAP_COD_TCAP = 2 THEN NVL(DPVI_TAS_DPVI')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select max(tadv_tas_acti) from bcatadv where tadv_cod_tcdv =
x.dpvi_cod_tcdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_numregis_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sp_dpvi_maxfecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(dpvi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE TCAP_COD_TCAP ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 3 THEN NVL((SELECT to_char(MAX(CRED_FEC_VENC)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = X.DPVI_COD_CLIE AND CRED_COD_ECRE NOT IN (4))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' END as fechaVencimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE TCAP_COD_TCAP ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 3 THEN NVL((SELECT MAX(CRED_FEC_VENC) - MAX(CRED_FEC_INIC) FROM
BCACRED')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = X.DPVI_COD_CLIE AND CRED_COD_ECRE NOT IN (4))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 END as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_sib as codigoOficina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CASE TCAP_COD_TCAP ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHEN 3 then ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else tpdv_sib_tpdv end as tipodeposito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('3 as estadocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(dpvi_fec_cier')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccdv_sib_ccdv as causalCierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select ttad_sib_ttad from afcdpta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_tcdv= tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tcap = tcap_cod_tcap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tpdv = tpdv_cod_tpdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd = eacd_cod_eacd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_ccdv = ccdv_cod_ccdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_sect =sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tcdv_cod_tcdv not in (1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ofic_cod_ofic = dpvi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_cod_eacd in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpvi_fec_cier between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if saldoInicial <0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldoInicial = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoIdentificacion = ''S'' or tipoIdentificacion = ''M'' or
tipoIdentificacion = ''O'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipoIdentificacion = ''R'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select coop_ruc_coop')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into identificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let paisNacimiento = ''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipoIdentificacion=''R'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let paisNacimiento =''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----plazo fijo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_cod_tide as tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_cod_identificacion(clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else pais_nac_pais end as paisnacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''P'' as tipoCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when dpfi_fec_inic < ada_fec_inic then ''VG''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''NV'' end as estadoOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DPFI_COD_DPFI ||-||dpfi_num_dpfi as numCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( ciud_sib_ciud ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( sect_sib_sect ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when dpfi_fec_inic < ada_fec_inic then hdpf_val_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else 0 end as saldoInicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when dpfi_fec_inic < ada_fec_inic then 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else hdpf_val_dpfi end as valorIngresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorEgresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_val_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl(hdpf_val_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_tas_dpfi as tasaInteres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when dpfi_fec_inic < ada_fec_inic then 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else 1 end as numeroIngresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as numeroEgresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(dpfi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(dpfi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select to_char(pgpf_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_dpfi as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_sib as codigoOficina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as tipodeposito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1 as estadocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as fechacierrecuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as causalCierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''X'' as tarjetadebito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpfi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpfi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ofic_cod_ofic = dpfi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_edpf not in(6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_dpfi = hdpf_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and hdpf_fec_venc >=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and date(hdpf_fec_hdpf)= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''12/31/2019'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 194 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 357;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 201 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 20.79;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 38 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 8191.43;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 91 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 16071.69;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 143 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo -7502.47;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''03/31/2020'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 46 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 79.23;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 89 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 1308.81;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 853.73;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 160 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 177.29;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 60 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo +357.02;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''06/30/2020'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 70 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 52.48;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 610.92;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 158 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 706.21;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 60 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo -1719.63;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 94 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo +350.02;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''09/30/2020'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 158 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 96.14;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 175 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 770.81;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 214 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo -50.91;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 282 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo -1714.60;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 135 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo +898.56;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''12/31/2020'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 225 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 461.59;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 251 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 2313.30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 60 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo +430.02;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi =94 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo +307.27;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 143 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo +2037.6;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----plazo fijo cancelaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select clie_cod_tide as tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_cod_identificacion(clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else pais_nac_pais end as paisnacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''P'' astipoCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when dpfi_fec_inic < ada_Fec_inic then ''VG''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''NV'' end as estadoOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_num_dpfi as numCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( ciud_sib_ciud ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( sect_sib_sect ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_val_dpfi as saldoInicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorIngresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_val_dpfi as valorEgresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0as valdpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as interesesPorPagar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_tas_dpfi as tasaInteres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as numeroIngresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1 as numeroEgresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(depg_fec_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(dpfi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select to_char(pgpf_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_dpfi as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_sib as codigoOficina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as tipodeposito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('3 as estadocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1 as causalCierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''X'' as tarjetadebito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpfi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpfi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ofic_cod_ofic = dpfi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_edpf not in(6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_dpfi = pgpf_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and pgpf_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and pgpf_cod_pgpf = depg_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and depg_Fec_pago between ada_Fec_inic and ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_fec_inic<ada_Fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and depg_cod_tran in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_dpfi = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----plazo fijo cancelaciones en periodo de reporte')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct clie_cod_tide as tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_cod_identificacion(clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when clie_nat_juri = 1 then ''NULO''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else pais_nac_pais end as paisnacimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''P'' astipoCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when dpfi_fec_inic < ada_Fec_inic then ''VG''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ''NV'' end as estadoOperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_num_dpfi as numCuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( prov_sib_prov ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( ciud_sib_ciud ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ft_llena_espacios( sect_sib_sect ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as saldoInicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_val_dpfi as valorIngresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_val_dpfi as valorEgresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valdpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as interesesPorPagar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_tas_dpfi as tasaInteres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1 as numeroIngresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1 as numeroEgresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(depg_fec_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('to_char(dpfi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select to_char(pgpf_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_plz_dpfi as plazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_sib as codigoOficina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as tipodeposito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('3 as estadocuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('1 as causalCierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''X'' as tarjetadebito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('provincia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fechaTransaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpfi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpfi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sect_cod_ciud = ciud_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ciud_cod_prov = prov_cod_prov and pais_cod_pais = clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ofic_cod_ofic = dpfi_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_edpf not in(6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_dpfi = pgpf_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and pgpf_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and pgpf_cod_pgpf = depg_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and depg_Fec_pago between ada_Fec_inic and ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_fec_inic between ada_Fec_inic and ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and depg_Fec_pago>dpfi_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and depg_cod_tran in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dpfi_cod_dpfi = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ada_Fec_fina =''12/31/2019'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 194 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 357;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 201 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 20.80;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 38 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo - 8191.43;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 91 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo + 16071.69;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_dpfi = 143 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let saldo = saldo -7502.47;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sepsc02(ada_Fec_inic date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('returning char(1) as tipoIdentificacionsujeto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(13) as Identificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(15) as numerooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('integer as diasMorosidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(5) as calificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as formacancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(10) as fechaCastigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(3) as tipooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal (15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(5) as numerogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('char(4) as tipogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoIdentificacionsujeto char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define Identificacionsujeto char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerooperacion char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define diasMorosidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define calificacionHomologada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tasainteresEfectiva')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorNoDevInteres decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorVencido decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define SaldoTotal decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define gestionRecuperCarteraVencida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoOperacion char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cuotaCredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define fechaCastigo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipoAmortizacion char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define objetoFideicomiso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define numerogarantia char(5);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define tipogarantia char(4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define valorgarantia decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define gastoCobrarCartMoraVencida decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define gastoCartVencidaCastigada decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define CREDNUM integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_inic date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let tipogarantia = ''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let numerogarantia =''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valorgarantia = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct CLIE_COD_TIDE as tipoIdentificacionsujeto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CLIE_IDE_CLIE as Identificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_paga || as numerooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_dias_venc as diasMorosidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_est_calf as calificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CALF_VAL_ACTI as valorVencer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CALF_VAL_DEVE as valorNoDevInteres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CALF_VAL_VENC as valorVencido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_sal_cred as saldototal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as formacancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_val_dema as valorDemandaJudicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CALF_VAL_CAST as carteraCastigada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select max(to_char(crce_fec_crce')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and crce_fec_crce<=ada_fec_fina )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_pro_cons provisionconstituida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_sib_tope as tipooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0.00 as primaodescuento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select sum(dirb_val_dirb)+sum(dirb_val_paga) from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_cod_divc in (select max(divc_cod_divc) from bcadivc where
divc_num_cred = x.cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dirb_cod_rubc in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select max(gtcr_num_gtia) || from bcagtcr where gtcr_num_cred =
x.cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgar_sib_tgar as tipogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(gtcr_val_gtcr) from bcagtcr where gtcr_num_cred =
x.cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when CALF_VAL_CAST =0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(dirb_val_dirb) from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_cod_divc in (select max(divc_cod_divc) from bcadivc where
divc_num_cred = x.cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dirb_cod_rubc not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else 0 end as gastoCobrarCartMoraVencida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('case ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when CALF_VAL_CAST >0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(dirb_val_dirb) from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_cod_divc in (select max(divc_cod_divc) from bcadivc where
divc_num_cred = x.cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dirb_cod_rubc not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else 0 end as gastoCartVencidaCastigada ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tipoIdentificacionsujeto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('carteraCastigada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gastoCobrarCartMoraVencida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM BCACLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND calf_num_cred = cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tope_cod_tope = cred_cod_tope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND calf_fec_calf = ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND CRED_COD_TGAR = TGAR_COD_TGAR')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerooperacion=''3300'' and Identificacionsujeto=''1002253134'' then
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerooperacion=''23300'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''53'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''205001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''61'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''289001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''16'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''273001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''63'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''207401'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''46'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''198401'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''42'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''266601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''50'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''258301'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''56'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''281401'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''40'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''262601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''45'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''274501'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''36'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''281201'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''109'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''220501'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''55'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''240901'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''21'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''246901'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''38'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''262101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''15'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''217601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''54'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''216001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''30'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''247201'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''27'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''227101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''24'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''209501'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''48'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''254101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''35'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''356101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''25'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''214301'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''9'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''175301'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''13'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''191101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''34'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''254601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''31'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''248001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''47'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''202301'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''87'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''281501'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''20'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''264001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''28'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''271201'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''37'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''260601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''36'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''260301'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''59'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''285601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''121'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''284601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''23'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''218201'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''17'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''264101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''44'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''268901'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''16'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''273001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''123'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''284401'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''58'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''285401'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''51'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''261001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''52'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''261301'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''29'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''242901'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''33'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''254201'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''49'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''280201'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''57'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''224001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''41'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''263601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''13'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''191101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''32'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''253701'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''6'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''285001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''119'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''281701'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''24'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''209501'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerooperacion=''2467'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valorVencido=3115.03;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerooperacion=8 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let carteraCastigada=663.19;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerooperacion=3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let carteraCastigada=494.24;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerooperacion=27 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let carteraCastigada=500.93;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 400 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''294101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 40000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A12'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 644 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''294101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 40000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A12'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 428 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''46'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 273328.96;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A13'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 542 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''11'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 43143.45;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A22'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 520 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''20'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 44771.08;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A13'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 641 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''77'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 40000.00;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A22'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 13 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 17 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 646 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''34'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 74168;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A13'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 543 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''33'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 2500;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A22'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 501 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''36'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 200000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A13'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if cuotaCredito is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let cuotaCredito = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if cuotaCredito <0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let cuotaCredito = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipogarantia =''A12'' or tipogarantia =''A13'' or tipogarantia
=''A22'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = tipogarantia ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=numerogarantia;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia =''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if fechaCastigo is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---let fechaCastigo =''NULO''; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if carteraCastigada>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let calificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if diasmorosidad <126 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select date(ada_fec_fina) - max(crce_fec_crce) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into diasMorosidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afccrce where crce_num_cred = numerooperacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and crce_ecr_actu = 5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if diasmorosidad <126 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let diasmorosidad = 126;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ada_fec_fina =''07/31/2023'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let carteraCastigada = carteraCastigada +1500;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if crednum = 4 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let carteraCastigada = carteraCastigada +2341.28;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---let saldototal = saldototal + carteraCastigada;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if carteraCastigada >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET valorVencido = saldototal;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if valorDemandaJudicial >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET valorVencido = saldototal;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if tipooperacion in (''COV''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipooperacion =''CDC'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacionsujeto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('carteraCastigada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---cancelaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT distinct CLIE_COD_TIDE as tipoIdentificacionsujeto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CLIE_IDE_CLIE as Identificacionsujeto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_paga || as numerooperacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as diasMorosidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(''''' as calificacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorVencer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorNoDevInteres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorVencido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as saldototal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''N'' as formacancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as valorDemandaJudicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as carteraCastigada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''NULO'' as fechaCastigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 provisionconstituida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('''CDC''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('0 as cuotaCredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select max(gtcr_num_gtia) || from bcagtcr where gtcr_num_cred =
x.cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgar_sib_tgar as tipogarantia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(gtcr_val_gtcr) from bcagtcr where gtcr_num_cred =
x.cred_num_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tipoIdentificacionsujeto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('carteraCastigada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gastoCobrarCartMoraVencida')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM BCACLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE CRED_COD_CLIE = CLIE_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND cred_cod_intv = intv_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_tope =tope_cod_tope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND CRED_COD_TGAR = TGAR_COD_TGAR')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_ecre in (3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_fec_pago between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_fec_inic<ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_num_cred not in (270')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''53'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''205001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''61'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''289001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''16'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''273001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''63'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''207401'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''46'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''198401'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''42'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''266601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''50'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''258301'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''56'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''281401'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''40'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''262601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''45'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''274501'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''36'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''281201'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''109'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''220501'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''55'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''240901'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''21'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''246901'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''38'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''262101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''15'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''217601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''54'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''216001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''30'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''247201'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''27'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''227101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''24'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''209501'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''48'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''254101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''35'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''356101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''25'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''214301'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''9'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''175301'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''13'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''191101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''34'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''254601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''31'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''248001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''47'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''202301'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''87'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''281501'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''20'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''264001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''28'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''271201'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''37'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''260601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''36'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''260301'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''59'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''285601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''121'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''284601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''23'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''218201'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''17'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''264101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''44'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''268901'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''16'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''273001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''123'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''284401'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''58'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''285401'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''51'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''261001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''52'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''261301'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''29'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''242901'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''33'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''254201'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''49'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''280201'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''57'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''224001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''41'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''263601'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''13'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''191101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''32'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''253701'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''6'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''285001'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''119'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''281701'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numerogarantia=''24'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''209501'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 400 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''294101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 40000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A12'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 644 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''294101'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 40000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A12'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 428 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''46'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 273328.96;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A13'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 542 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''11'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 43143.45;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A22'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 520 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''20'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 44771.08;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A13'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 641 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''77'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 40000.00;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A22'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 13 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 17 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 646 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''34'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 74168;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A13'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 543 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''33'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 2500;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A22'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 501 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia=''36'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = 200000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''A13'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if crednum = 254 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipoIdentificacionsujeto =''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let Identificacionsujeto= ''1709357501'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia =''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let calificacion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipooperacion = ''REP'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --let diasMorosidad = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if tipogarantia =''A12'' or tipogarantia =''A13'' or tipogarantia
=''A22'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = tipogarantia ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia =numerogarantia;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipogarantia = ''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let numerogarantia =''NULO'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorgarantia = -9999.99;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if tipooperacion in (''COV''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let tipooperacion =''CDC'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return tipoIdentificacionsujeto ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('carteraCastigada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_update_bcacoop(codigo_sib INT)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE codigo_oficina INT;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH cursor_oficinas FOR')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT ofic_cod_ofic INTO codigo_oficina FROM bcaofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF codigo_oficina IS NOT NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' UPDATE bcaofic SET ofic_sib_ofic = codigo_sib')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE ofic_cod_ofic = codigo_oficina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_opcion_perfil(codigo_perfil CHAR(2))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE codigo_opcion INT;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH cursor_opciones FOR')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT opci_cod_opci INTO codigo_opcion FROM bcaopci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF codigo_opcion IS NOT NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INSERT INTO bcaaper VALUES(codigo_perfil')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_permiso_usuario(codigo_opcion INT)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE codigo_perfil CHAR(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE codigo_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH cursor_perfiles FOR')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT perf_cod_perf INTO codigo_perfil FROM bcaperf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF codigo_perfil IS NOT NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INSERT INTO bcaaper VALUES(codigo_perfil')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH cursor_usuarios FOR')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT usua_cod_usua INTO codigo_usuario FROM bcausua WHERE
usua_cod_perf = codigo_perfil')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF codigo_usuario IS NOT NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(ausu_cod_usua) into li_contador
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaausu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ausu_cod_usua = codigo_usuario and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ausu_cod_opci = codigo_opcion;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_contador = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INSERT INTO bcaausu VALUES(codigo_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_genera_tdoc(acod_tdoc Char(3))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Insert Into bcandoc select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ejer_cod_ejer = peri_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_mes_peri = 13 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_cie_peri = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_veri_digitos(acod_ncue integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_digi integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num_digi = (select Sum(ncue_num_digi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ncue_cod_ejer = acod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ncue_cod_ncue <> acod_ncue);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_num_digi is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_digi = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num_digi = li_num_digi + anum_digi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_num_digi >= 15 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_veri_digitos_u(acod_ncue integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_digi integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_num_digi = (SELECT Sum(ncue_num_digi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE ncue_cod_ejer = acod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND ncue_cod_ncue <> acod_ncue);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_num_digi is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_digi = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_num_digi = li_num_digi + anum_digi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_num_digi > 15 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_num_digi = (SELECT Sum(ncue_num_digi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE ncue_cod_ejer = acod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND ncue_cod_ncue < acod_ncue);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_num_digi is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_digi = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_digi = li_num_digi + anum_digi_a;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if exists (select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where length(ccon_cod_ccon) = li_num_digi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ejer = acod_ejer) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_update_perm_usu(codigo_perfil CHAR(2)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE codigo_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT usua_cod_usua INTO codigo_usuario FROM bcausua WHERE usua_cod_perf
= codigo_perfil ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF codigo_usuario IS NOT NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF control_opcion = 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' DELETE FROM bcaausu WHERE ausu_cod_usua = codigo_usuario AND
ausu_cod_opci = codigo_opcion;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete from bcaustr where ustr_cod_optr in (select optr_cod_optr from
bcaoptr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where optr_cod_opci = codigo_opcion) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ustr_cod_usua = codigo_usuario;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT count(ausu_cod_opci) INTO codigo_opcion_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaausu WHERE ausu_cod_usua = codigo_usuario AND ausu_cod_opci =
codigo_opcion;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF codigo_opcion_ctrl =0 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO bcaausu VALUES( codigo_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select optr_cod_optr into opcion from bcaoptr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if opcion is not null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(ustr_cod_optr) into codigo_opcion_ctrl from bcaustr where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ustr_cod_usua = codigo_usuario and ustr_cod_optr = opcion;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if codigo_opcion_ctrl =0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcaustr values(codigo_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_veri_niveles(acod_ncue integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_long integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_long = (select Sum(ncue_num_digi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ncue_cod_ejer = acod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ncue_cod_ncue <= acod_ncue);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_long is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_long = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_long = li_long + anum_digi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if exists (select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where length(ccon_cod_ccon) = li_long')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ejer = acod_ejer) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_genera_permiso(ai_cod_cont Integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ban = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select usua_cod_usua into li_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcausua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_cod_usua = li_cod_usua then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ban = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ban = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcacous values (li_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select paco_cod_paco into li_cod_paco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapaco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcacpar values (ai_cod_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_perfil_usuario(codigo_usuario INT')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigo_opcion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT aper_cod_opci INTO codigo_opcion FROM bcaaper WHERE aper_cod_perf
= codigo_perfil AND aper_ctr_opci = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF codigo_opcion IS NOT NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO bcaausu VALUES(codigo_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select optr_cod_optr into li_cod_cont from bcaoptr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into li_contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaustr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ustr_cod_optr = li_cod_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ustr_cod_usua =codigo_usuario;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_contador = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcaustr values (codigo_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cont_cod_cont into li_cod_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcacous values (codigo_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_veri_bcabene(ancod_clie int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Verifica el porcentaje del seguro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_porc decimal(6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Verifica codigos de clientes y beneficiarios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ancod_clie = ancod_cben then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Porcentaje')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if not (adval_porc between 1 and 100) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(bene_porcent) INTO ld_val_porc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcabene ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bene_cod_clie = ancod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bene_cod_tben = aicod_tben;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_val_porc is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_porc = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--let ld_val_porc = ld_val_porc + adval_porc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_val_porc = ld_val_porc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_val_porc > 100 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ins_pfijo(lp_codigo_moneda int)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_final')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_caracter CHAR(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_cadena CHAR(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_codigo_dinamico CHAR(8);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_codigo_tmp CHAR(5);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_nombre_tmp CHAR(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inicializa fin de lazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_final = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF lp_codigo_moneda < 10 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_final = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF lp_codigo_moneda < 100 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_final = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inicializa variables auxiliares para la formacion del codigo dinamico')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ls_caracter = ''0'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ls_cadena = '''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Forma codigo de moneda con formato ''###'')')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOR li_lazo = 1 TO li_final')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ls_cadena = ls_caracter || ls_cadena ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOR;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Encuentra codigo de parametro en base a los parametros dinamicos
definidos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--El rango de codigos de parametros dinamicos debe estar entre 2100 y
3000')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT MAX(prdi_cod_prms) INTO li_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaprdi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE prdi_cod_prms IN (SELECT prms_cod_prms FROM bcaprms WHERE
prms_cod_modu = 14);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF li_num_secu Is Null THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_num_secu= 2099;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT tmpf_cod_tmpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcatmpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = li_contador + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ls_codigo_dinamico = Trim(ls_codigo_tmp) || Trim(ls_cadena) ||
lp_codigo_moneda;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_num_secu= li_num_secu + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO bcaprms VALUES(li_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO bcavprm VALUES(li_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF li_contador = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO bcaprdi VALUES(li_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO bcaprdi VALUES(li_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inserta cuentas contables de parametros globales (OJOJOJOJOJOJOJO puede
talvez que falte incluir otros parametros)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcactap values(6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcactap values(7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcactap values(11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcactap values(13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcactap values(14')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcactap values(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_update_perf_usu(codigo_usuario INT')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE codigo_opcion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF codigo_perfil <> perfil_anterior THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete FROM bcaausu WHERE ausu_cod_usua = codigo_usuario;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete from bcaustr where ustr_cod_usua = codigo_usuario;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT aper_cod_opci INTO codigo_opcion FROM bcaaper WHERE aper_cod_perf
= codigo_perfil AND aper_ctr_opci = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF codigo_opcion IS NOT NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT count(ausu_cod_opci) INTO opcion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaausu WHERE ausu_cod_usua = codigo_usuario AND ausu_cod_opci =
codigo_opcion;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF opcion =0 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO bcaausu VALUES( codigo_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FOREACH ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT optr_cod_optr INTO opcion1 FROM bcaoptr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into li_contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaustr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ustr_cod_optr = opcion1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ustr_cod_usua =codigo_usuario;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_contador = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaustr values(codigo_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_del_pfijo(lp_codigo_moneda int)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_final')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_caracter CHAR(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_cadena CHAR(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inicializa fin de lazo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_final = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF lp_codigo_moneda < 10 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_final = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF lp_codigo_moneda < 100 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_final = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inicializa variables auxiliares para la formacion del codigo dinamico')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ls_caracter = ''0'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ls_cadena = '''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Forma codigo de moneda con formato ''###'')')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOR li_lazo = 1 TO li_final')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ls_cadena = ls_caracter || ls_cadena ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOR;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ls_cadena = Trim(ls_cadena) || lp_codigo_moneda;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT prdi_cod_prms into li_codigo_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaprdi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE Substr(prdi_cod_prdi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DELETE FROM bcavprm WHERE vprm_cod_prms = li_codigo_prms;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DELETE FROM bcaprdi WHERE prdi_cod_prms = li_codigo_prms;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DELETE FROM bcaprms WHERE prms_cod_prms = li_codigo_prms;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_usua_passwd(cod_usua INT)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcausua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SET usua_fec_uac = TODAY')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE usua_cod_usua = cod_usua;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_borra_bcaopen(as_ventana CHAR(30))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DELETE FROM bcaopen')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE open_des_open = as_ventana')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' AND open_ses_id NOT IN (SELECT sid FROM
sysmaster:syssessions);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_aux_dcom(ai_cod_comp int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_comp date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select peri_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_peri = peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_cod_comp = ai_cod_comp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fec_comp = (select comp_fec_comp from bcacomp where comp_cod_comp
= ai_cod_comp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_suma = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create temp table nivel (nivel integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ncue_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_suma = li_suma + li_longit;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into nivel values (li_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl = li_ctrl + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_cuenta = (select ccon_cod_ccon from bcaccon where ccon_cod_ctas =
ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_longit = length(lc_cuenta);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select digitos into li_suma')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where digitos < li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_cuenta = substr(lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ai_cod_ctas = (select ccon_cod_ctas from bcaccon where
ccon_cod_ccon = lc_cuenta and ccon_cod_ejer = li_cod_ejer);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' If ai_cod_ctas > 0 or ai_cod_ctas is not null Then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not exists (select dcom_fec_dcom from tmpdcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dcom_fec_dcom = lda_fec_comp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas = ai_cod_ctas) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into tmpdcom values (lda_fec_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ac_cod_tasi = ''D'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update tmpdcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dcom_sal_debi = dcom_sal_debi + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dcom_fec_dcom = lda_fec_comp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas = ai_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ac_cod_tasi = ''C'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update tmpdcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dcom_sal_cred = dcom_sal_cred + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dcom_fec_dcom = lda_fec_comp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dcom_cod_ctas = ai_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('End If')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table nivel;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_p_cierre_ejer(ai_eje_ante int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_registros integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Nuevo ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_anio = (select ejer_ani_ejer + 1 from bcaejer where ejer_cod_ejer
= ai_eje_ante);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select ejer_cod_ejer from bcaejer where ejer_ani_ejer
= li_anio);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Verifica si el nuevo ejercicio no exite')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ejer is null or li_cod_ejer = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaejer values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ejer = (select ejer_cod_ejer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaejer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ejer_cod_cont = ai_cod_cont ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ejer_ani_ejer = li_anio);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- inserta los nuevos niveles')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select * ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ncue_cod_ejer = ai_eje_ante ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 into temp t_ncue;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from t_ncue;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' drop table t_ncue;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select *')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ejer = ai_eje_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp t_cta_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_registros =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into ll_registros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ejer = li_cod_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_registros > 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select *')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into temp t_cta_post;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from t_cta_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon not in (select ccon_cod_ccon from t_cta_post);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table t_cta_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table t_cta_post;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from t_cta_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table t_cta_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ins_mcdv(lp_codigo int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_secuencial Int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Obtiene la fecha del servidor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT tran_ban_tran INTO li_secuencial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE tran_cod_tran = lp_transaccion;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF li_secuencial = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcamcdv SET mcdv_num_mcdv = lp_codigo WHERE mcdv_cod_mcdv =
lp_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_subida_ctas()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Variables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_anio int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_mes_cerr int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_mone int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_dir char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Parametros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- temprms--> mes hasta el cual esta cerrado (prms_mes_cerr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- --> ejercicio del cual se va a subir (prms_ani_prms)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- --> Desde donde se migro los datos (sistem o coope) para
identificar la moneda (prms_dir_prms)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_dir = (select prms_dir_prms from temprms);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_mes_cerr = (select prms_mes_cerr from temprms);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_anio = (select prms_ani_prms from temprms);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if lc_dir = ''sistm'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_mone = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif lc_dir = ''coope'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_mone = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- verificar moneda falta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Procedimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 1.- Crear el ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if not exists(select ejer_cod_ejer from bcaejer where ejer_ani_ejer =
li_anio) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaejer values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select ejer_cod_ejer from bcaejer where ejer_ani_ejer
= li_anio);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 2.- Crear los niveles (asume 5 niveles del sia)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcancue values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcancue values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcancue values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcancue values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcancue values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 3.- Sube las ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select 0 codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_tip_cuen')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (case substr(ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''1'' then ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''2'' then ''A''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''3'' then ''A''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''4'' then ''A''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''5'' then ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''6'' then ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' when ''7'' then ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end) naturaleza')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from temccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set ccon_cod_natu = null')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon in (''6''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set ccon_cod_natu = ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon matches ''61*'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set ccon_cod_natu = ''A''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon matches ''62*'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set ccon_cod_natu = ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon matches ''63*'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set ccon_cod_natu = ''A''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon matches ''64*'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set ccon_cod_natu = ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon matches ''71*'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set ccon_cod_natu = ''A''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon matches ''72*'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set ccon_cod_natu = ''A''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon matches ''74*'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set ccon_cod_natu = ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ccon matches ''75*'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- 4.- Actualiza los meses cerrados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set peri_cie_peri = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri between 1 and li_mes_cerr;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_comp_c()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_anio int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Parametros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_anio = (select prms_ani_prms from temprms);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select ejer_cod_ejer from bcaejer where ejer_ani_ejer
= li_anio);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Procedimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Cabecera de los comprobantes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_che_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from temcomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where month(comp_fec_comp) = peri_mes_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_cod_ejer = li_cod_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_comp_d()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_anio int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Parametros')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_anio = (select prms_ani_prms from temprms);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select ejer_cod_ejer from bcaejer where ejer_ani_ejer
= li_anio);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Procedimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('----------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Detalle le los comprobantes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcadcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(case dcom_ope_dcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''1'' then ''D''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when ''2'' then ''C'' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end) tasi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcom_val_dcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from temdcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where comp_cod_tdoc = dcom_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and comp_num_comp = dcom_num_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_cod_ccon = ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ccon_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcom_val_dcom > 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_upd_tcdv(li_codigo int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_cuenta int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor_restante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inicializa variables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_contable = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_ahorro_anterior <> ld_ahorro_nuevo THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Selecciona todos lal cuentas a las que esta afectando picnorado de
ahorro minimo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH c_picnorado FOR')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT vpcn_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF li_cuenta IS NOT NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Obtiene saldo disponible de la cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT dpvi_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE dpvi_cod_dpvi = li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_disponible IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_contable IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_contable = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_ahorro_nuevo > ld_ahorro_anterior THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = ld_valor_restante + (ld_ahorro_nuevo -
ld_ahorro_anterior);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualizo saldos de cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_disponible > ld_valor_restante THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_disponible = ld_disponible - ld_valor_restante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' UPDATE bcadpvi SET dpvi_sal_disp = ld_disponible WHERE dpvi_cod_dpvi =
li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor_restante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_contable > 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = (ld_ahorro_anterior - ld_valor_restante) -
ld_ahorro_nuevo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualizo saldos de cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = ld_disponible + ld_valor_restante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcadpvi SET dpvi_sal_disp = ld_disponible WHERE dpvi_cod_dpvi =
li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = ld_ahorro_nuevo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualiza valor de picnorado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcavpcn SET (vpcn_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_genera_prmcont(ai_cod_paco Integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_cont Integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cont_cod_cont into li_cod_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcacpar values (li_cod_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_crea_sini(ai_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_peri integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_cod_peri = (select peri_cod_peri from bcaperi where peri_cod_ejer
= ai_cod_ejer and peri_mes_peri = 0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcasact values (ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_upd_picn(li_codigo int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ld_valor_nuevo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor_restante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF li_tipo = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inicializa variables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_retornar = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_contable = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_grabar = ld_valor_nuevo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_valor_anterior <> ld_valor_nuevo THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Selecciona todos lal cuentas a las que esta asignado picnorado
actrualizado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH c_picnorado FOR')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT vpcn_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF li_cuenta IS NOT NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Obtiene saldo disponible de la cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT dpvi_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE dpvi_cod_dpvi = li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_disponible IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_contable IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_contable = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualizo valores para calculos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_nuevo = ld_valor_nuevo * li_numero;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_anterior = ld_valor_anterior * li_numero;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_valor_nuevo > ld_valor_anterior THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = ld_valor_restante + (ld_valor_nuevo -
ld_valor_anterior);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualizo saldos de cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_disponible > ld_valor_restante THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = ld_disponible - ld_valor_restante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcadpvi SET dpvi_sal_disp = ld_disponible WHERE dpvi_cod_dpvi =
li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_contable > 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_valor_restante > 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = ABS((ld_valor_anterior - ld_valor_restante) -
ld_valor_nuevo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_retornar = ld_valor_anterior - ld_valor_nuevo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualizo saldos de cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = ld_disponible + ld_valor_retornar;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_disponible > ld_valor_restante THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = ld_disponible - ld_valor_restante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcadpvi SET dpvi_sal_disp = ld_disponible WHERE dpvi_cod_dpvi =
li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = ld_valor_nuevo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualiza valor de picnorado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcavpcn SET (vpcn_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_del_vpcn(li_cuenta int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ld_valor_restante decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_disponible')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inicializa variables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_contable = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Obtiene saldo disponible de una cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT dpvi_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE dpvi_cod_dpvi = li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_disponible IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_contable IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_contable = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor = ld_valor * li_numero;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_contable > 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_valor_restante IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_valor_restante > 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor = ld_valor - ld_valor_restante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Acumula saldo disponible')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = ld_disponible + ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualizo saldos de cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcadpvi SET dpvi_sal_disp = ld_disponible WHERE dpvi_cod_dpvi =
li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_upd_dpvi(lp_cod_cuenta int)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor_restante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inicializa variables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_contable = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Obtiene saldo disponible de una cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT dpvi_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE dpvi_cod_dpvi = lp_cod_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_disponible IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_contable IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_contable = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Verifica si existe suficiente disponible para actualizar saldos
restantes de picnorados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Selecciono todos los picnorados que afectan a la cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH c_picnorado FOR')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT vpcn_cod_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_valor_restante IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF li_codigo IS NOT NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_valor_restante > 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualizo saldos de cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_disponible >= ld_valor_restante THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = ld_disponible - ld_valor_restante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualiza valor de picnorado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcavpcn SET vpcn_valoraux = ld_valor_restante WHERE vpcn_cod_picn
= li_codigo AND vpcn_cod_dpvi = lp_cod_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualiza saldo disponible de cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcadpvi SET dpvi_sal_disp = ld_disponible WHERE dpvi_cod_dpvi =
lp_cod_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_transac_usuario(codigo_ctrl int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE codigo_usuario INT;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ausu_cod_usua into codigo_usuario ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaausu where ausu_cod_opci = codigo_opcion and ausu_ctr_opci = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcaustr values(codigo_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_actualiza_prm(parametro integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if parametro = 1 or parametro = 2 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if parametro = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let parametro = 4;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let parametro = 5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcavprm set vprm_val_vprm = valor where vprm_cod_prms =
parametro;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_actualiza_tdoc(as_codigo char(3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_peri <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Select distinct peri_cod_ejer into li_cod_ejer from bcaperi where
peri_cod_peri = ai_cod_peri;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select vprm_val_vprm into li_cod_ejer from bcavprm where vprm_cod_prms =
101;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcandoc set ndoc_num_tdoc = ai_numero where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ndoc_cod_tdoc = as_codigo and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ndoc_cod_ejer = li_cod_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ins_tinv(lp_tipo char(3))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_banco INT;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH cur_bancos FOR')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT banc_cod_banc INTO li_banco FROM bcabanc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO bcainxb(inxb_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.temporal()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define cod_dpvi integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpvi_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpvi_cod_dpvi = vpcn_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadpvi set dpvi_sal_disp = sal_disp+valor_tem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpvi_cod_dpvi = cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_tmpcsac_2(ac_cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nombre char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_coti_original')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Mayorizaci�n de cuentas en otra moneda para B. Comprobaci�n
consolidado')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_suma = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create temp table c_nivel (nivel integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue where ncue_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_suma = li_suma + li_longit;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into c_nivel values (li_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl = li_ctrl + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obtiene saldos anteriores')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum( csac_sal_debi - csac_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where csac_cod_ctas = ccco_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csac_cod_mese < ai_mes and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_ccon = ac_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Cotizaci�n moneda vigente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_coti_original = sp_cotiza_inte(ai_moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Cotizaci�n moneda expresada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_coti_expresada = sp_cotiza_inte(ai_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Realiza el cambio de valor a la moneda actual')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_debito = ( ad_debito * ld_coti_expresada) / ld_coti_original;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_credito = ( ad_credito * ld_coti_expresada) / ld_coti_original;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = ( ld_saldo * ld_coti_expresada) / ld_coti_original;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- longitud de nivel de cuentas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_longit = length(ac_cod_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select digitos into li_suma')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from c_nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where digitos <= li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ac_cod_ccon = substr(ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ac_cod_ccon is not null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not exists(select codigo from b_compro where codigo = ac_cod_ccon)
then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccco_nom_ccon into lc_nombre from bcaccco where ccco_cod_ccon =
ac_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_aux_ccon = ( select ccco_nom_ccon from bcaccco where
length( ccco_cod_ccon ) = 1 and ccco_cod_ccon = substr( ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into b_compro values(ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update b_compro set debito = debito + ad_debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('credito = credito + ad_credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('saldo = saldo + ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccco_cod_ccon = ac_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table nivel_c;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_tmpcsac_1(ac_cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_aux_ccon char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nombre char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_coti_original')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-----------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Mayorizaci�n para otra moneda de B. de P�rdidas y ganancias
Consolidado')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-----------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_suma = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create temp table c_nivel (nivel integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue where ncue_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_suma = li_suma + li_longit;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into c_nivel values (li_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl = li_ctrl + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Cotizaci�n moneda vigente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_coti_original = sp_cotiza_inte(ai_moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Cotizaci�n moneda expresada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_coti_expresada = sp_cotiza_inte(ai_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Realiza el cambio de valor a la moneda actual')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_valor = ( ad_valor * ld_coti_expresada) / ld_coti_original;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_longit = length(ac_cod_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select digitos into li_suma')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from c_nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where digitos <= li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ac_cod_ccon = substr(ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ac_cod_ccon is not null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not exists(select codigo from b_pergan where codigo = ac_cod_ccon)
then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccco_nom_ccon into lc_nombre from bcaccco where ccco_cod_ccon =
ac_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_aux_ccon = substr( ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into b_pergan values(ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update b_pergan set saldo = saldo + ad_valor where codigo=
ac_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table nivel_c;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_tmpcsac(ac_cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_aux_ccon char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nombre char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_coti_original')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-----------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Mayorizaci�n en otra moneda para E. Situaci�n General')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-----------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_suma = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create temp table c_nivel (nivel integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue where ncue_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_suma = li_suma + li_longit;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into c_nivel values (li_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl = li_ctrl + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Cotizaci�n moneda vigente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_coti_original = sp_cotiza_inte(ai_moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Cotizaci�n moneda expresada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_coti_expresada = sp_cotiza_inte(ai_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Realiza el cambio de valor a la moneda actual')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_valor = ( ad_valor * ld_coti_expresada) / ld_coti_original;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_longit = length(ac_cod_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select digitos into li_suma')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from c_nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where digitos <= li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ac_cod_ccon = substr(ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ac_cod_ccon is not null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not exists(select codigo from s_gene where codigo = ac_cod_ccon)
then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ccco_nom_ccon into lc_nombre from bcaccco where ccco_cod_ccon =
ac_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_aux_ccon = Substr ( ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into s_gene values(ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update s_gene set saldo = saldo + ad_valor where codigo=
ac_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table nivel_c;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_tmpsacp_2(ac_cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ai_tipo integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nombre char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_coti_original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tcue char(1);')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-----------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Mayorizaci�n en otra moneda para B.Comprobaci�n Consolidado por
agencias')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-----------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_suma = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create temp table c_nivel (nivel integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue where ncue_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_suma = li_suma + li_longit;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into c_nivel values (li_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl = li_ctrl + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obtiene saldos anteriores')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum( sacp_sal_debi - sacp_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasacp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sacp_cod_ctas = ccco_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacp_cod_mese < ai_mes and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_ccon = ac_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Cotizaci�n moneda vigente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_coti_original = sp_cotiza_inte(ai_moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Cotizaci�n moneda expresada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_coti_expresada = sp_cotiza_inte(ai_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Realiza el cambio de valor a la moneda actual')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_debito = ( ad_debito * ld_coti_expresada) / ld_coti_original;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_credito = ( ad_credito * ld_coti_expresada) / ld_coti_original;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = ( ld_saldo * ld_coti_expresada) / ld_coti_original;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- longitud de nivel de cuentas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_longit = length(ac_cod_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select digitos into li_suma')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from c_nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where digitos <= li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ac_cod_ccon = substr(ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ac_cod_ccon is not null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_cod_tcue = ( select ccco_cod_tcue from bcaccco where ccco_cod_ccon
= ac_cod_ccon ) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('If ls_cod_tcue = ''M'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not exists(select codigo from b_compro_cage where codigo =
ac_cod_ccon and tipo = ai_tipo ) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_nombre = ( select ccco_nom_ccon from bcaccco where ccco_cod_ccon =
ac_cod_ccon );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_aux_ccon = ( select ccco_nom_ccon from bcaccco where
length( ccco_cod_ccon ) = 1 and ccco_cod_ccon = substr( ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into b_compro_cage values(ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update b_compro_cage set debito = debito + ad_debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('credito = credito + ad_credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('saldo = saldo + ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccco_cod_ccon = ac_cod_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tipo = ai_tipo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update b_compro_cage set debito = debito + ad_debito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('credito = credito + ad_credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('saldo = saldo + ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccco_cod_ccon = ac_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table nivel_c;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_tmpsacp_1(ac_cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_aux_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nombre char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_coti_original')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
---------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Mayorizaci�n en otra moneda para Bal. Perdidas y ganancias por
agencias')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
---------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_suma = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create temp table c_nivel (nivel integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue where ncue_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_suma = li_suma + li_longit;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into c_nivel values (li_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl = li_ctrl + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Cotizaci�n moneda vigente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_coti_original = sp_cotiza_inte(ai_moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Cotizaci�n moneda expresada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_coti_expresada = sp_cotiza_inte(ai_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Realiza el cambio de valor a la moneda actual')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_valor = ( ad_valor * ld_coti_expresada) / ld_coti_original;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_longit = length(ac_cod_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select digitos into li_suma')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from c_nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where digitos <= li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ac_cod_ccon = substr(ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ac_cod_ccon is not null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_cod_tcue = (select ccco_cod_tcue from bcaccco where ccco_cod_ccon
= ac_cod_ccon );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ls_cod_tcue = ''M'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not exists(select codigo from b_pergan_cage where codigo =
ac_cod_ccon and tipo = ai_tipo) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_nombre = ( select ccco_nom_ccon from bcaccco where ccco_cod_ccon =
ac_cod_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_aux_ccon = substr( ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into b_pergan_cage values(ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update b_pergan_cage set saldo = saldo + ad_valor where
codigo= ac_cod_ccon and tipo = ai_tipo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update b_pergan_cage set saldo = saldo + ad_valor where codigo=
ac_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table nivel_c;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_tmpsacp(ac_cod_ccon char(15)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_aux_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_nombre char(40);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_coti_original')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
--------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Mayorizaci�n en otra moneda para E.Situaci�n general consolidado por
agencias')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
--------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_suma = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create temp table c_nivel (nivel integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue where ncue_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_suma = li_suma + li_longit;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into c_nivel values (li_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl = li_ctrl + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Cotizaci�n moneda vigente')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_coti_original = sp_cotiza_inte(ai_moneda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Cotizaci�n moneda expresada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_coti_expresada = sp_cotiza_inte(ai_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Realiza el cambio de valor a la moneda actual')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_valor = ( ad_valor * ld_coti_expresada) / ld_coti_original;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_longit = length(ac_cod_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select digitos into li_suma')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from c_nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where digitos <= li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ac_cod_ccon = substr(ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ac_cod_ccon is not null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_cod_tcue = (select ccco_cod_tcue from bcaccco where ccco_cod_ccon
= ac_cod_ccon );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('If ls_cod_tcue = ''M'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not exists(select codigo from s_gene_cage where codigo =
ac_cod_ccon and tipo = ai_tipo ) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_nombre = (select ccco_nom_ccon from bcaccco where ccco_cod_ccon =
ac_cod_ccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_aux_ccon = Substr ( ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into s_gene_cage values(ac_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update s_gene_cage set saldo = saldo + ad_valor where codigo=
ac_cod_ccon and tipo = ai_tipo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update s_gene_cage set saldo = saldo + ad_valor where codigo =
ac_cod_ccon;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table nivel_c;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_calcula_saldos_dpvi(ada_fecha Date )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpvi integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_aux integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Este procedimiento se ejecuta al final del d�a')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct x.dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(vpcn_valor * vpcn_num_vpcn)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where vpcn_cod_dpvi = x.dpvi_cod_dpvi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' year(mcdv_fec_mcdv) = year(ada_fecha))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' year(mcdv_fec_mcdv) = year(ada_fecha))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(dchv_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadchv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dchv_cod_mcdv = mcdv_cod_mcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_dpvi = x.dpvi_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' year(mcdv_fec_mcdv) = 2005 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_num_cheq <> 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dchv_cod_modu in (5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (dchv_est_actu is null or')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dchv_est_actu = 5))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) = ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_ingresos is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_ingresos = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_egresos is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_egresos = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_picn is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_picn = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_cheques is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cheques = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --calcula el saldo disponible y el saldo contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dispo = ld_ingresos - (ld_egresos + ld_val_picn + ld_cheques);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_conta = ld_ingresos - ld_egresos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dpvi_sal_disp = ld_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_sal_conta = ld_conta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi = li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --verifica si existe registro en la bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_aux')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(sald_fec_sald) = ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_cod_dpvi = li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if isnull(li_aux) or li_aux = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' values(ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sald_dispo = ld_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_conta = ld_conta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_cod_dpvi = li_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(sald_fec_sald) = ada_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ins_vpcn(li_codigo integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_disponible decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inicializa variables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcaavpic values (ii_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Obtiene saldo disponible de la cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT dpvi_sal_disp INTO ld_disponible')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE dpvi_cod_dpvi = li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_disponible IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Obtengo valor total a picnorarse')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor = ld_valor * li_numero;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualizo saldos de cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_disponible >= ld_valor THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = ld_disponible - ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcadpvi SET dpvi_sal_disp = ld_disponible WHERE dpvi_cod_dpvi =
li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualiza valor de picnorado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcavpcn SET vpcn_valoraux = ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE vpcn_cod_picn = li_codigo AND vpcn_cod_dpvi = li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_upd_vpcn(li_codigo int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ld_valor_restante decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_disponible')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inicializa variables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_anterior = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_retornar = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_nuevo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_contable = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcaavpic values (ii_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT dpvi_sal_disp INTO ld_disponible')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE dpvi_cod_dpvi = li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_disponible < ld_valor THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_valor_restante IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF li_numero <> li_numero_anterior OR ld_valor <> ld_valor_a THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Obtiene saldo disponible de la cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT dpvi_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE dpvi_cod_dpvi = li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_disponible IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_contable IS NULL THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_contable = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualizo valores para calculos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_nuevo = ld_valor * li_numero;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_anterior = ld_valor_a * li_numero_anterior;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_valor_nuevo > ld_valor_anterior THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = ld_valor_restante + (ld_valor_nuevo -
ld_valor_anterior);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualizo saldos de cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_disponible >= ld_valor_restante THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = ld_disponible - ld_valor_restante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcadpvi SET dpvi_sal_disp = ld_disponible WHERE dpvi_cod_dpvi =
li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_contable > 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_valor_restante > 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = ABS((ld_valor_anterior- ld_valor_restante) -
ld_valor_nuevo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_retornar = ld_valor_anterior - ld_valor_nuevo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualizo saldos de cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = ld_disponible + ld_valor_retornar;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_disponible > ld_valor_restante THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_disponible = ld_disponible - ld_valor_restante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcadpvi SET dpvi_sal_disp = ld_disponible WHERE dpvi_cod_dpvi =
li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_restante = ld_valor_nuevo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Actualiza valor de picnorado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcavpcn SET vpcn_valoraux = ld_valor_restante WHERE vpcn_cod_picn
= li_codigo AND vpcn_cod_dpvi = li_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_genera_sal_cons(ai_mes INT')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--returning integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_sal_debi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--***********************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Genera saldos consolidados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--***********************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Begin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Select distinct ccco_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sacp_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(sacp_sal_debi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(sacp_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sacp_cod_ctas = ccco_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sacp_cod_cons in (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cons_cod_cons')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacons')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cons_cod_ejer = ai_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by ccco_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by sacp_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' If li_cod_ctas > 0 or li_cod_ctas IS NOT NULL and li_cod_mese >=
0 or li_cod_mese IS NOT NULL Then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Inserta en la tabla de saldos consolidados ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcacsac values(li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' End If')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' End Foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('End ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_mayorizar_c(ai_cod_comp int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cie_peri char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon varchar(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_comp date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--************************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Mayorizaci�n de cuentas consolidadas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--************************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Consolidaci�n')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ac_may = ''0'' and ac_sw in (''I''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Ejercicio actual')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select vprm_val_vprm from bcavprm where vprm_cod_prms
= 2301);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ejer is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_mone = (select vprm_val_vprm from bcavprm where vprm_cod_prms
= 2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_mone is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_mon_cta = (select ccco_cod_mone from bcaccco where ccco_cod_ctas =
ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_mon_cta is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--*******************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- LOS ASIENTOS DE CONSOLIDACION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- SOLO DEBEN AFECTAR AL SALDO FINAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- PORQUE A DICIEMBRE SE REFLEJA EL ESTADO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- DE LAS AGENCIAS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--*******************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--let li_cod_peri = (select ccom_cod_mese from bcaccom where
ccom_cod_ccom = ai_cod_comp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_peri = 13;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_peri is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_comp = (select ccom_num_ccom from bcaccom where
ccom_cod_ccom = ai_cod_comp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (ac_may = ''0'' and ac_sw = ''U'') or (ac_may = ''1'' and ac_sw =
''D'') then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_valor = ad_valor * li_signo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--actualiza el saldo consolidado de la cuenta contable')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if not exists(select csac_cod_ctas from bcacsac where csac_cod_mese =
li_cod_peri and csac_cod_ctas = ai_cod_ctas and csac_cod_ejer = li_cod_ejer) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcacsac values (ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ac_cod_tasi = ''D'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set csac_sal_debi = csac_sal_debi + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where csac_cod_mese >= li_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ctas = ai_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = li_cod_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif ac_cod_tasi = ''C'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set csac_sal_cred = csac_sal_cred + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where csac_cod_mese >= li_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ctas = ai_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = li_cod_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--if li_cod_mone = li_mon_cta then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_tmpsact_c(ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_tmpsact_c(ai_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--************************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Mayorizaci�n de cuentas consolidadas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--************************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_suma = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create temp table nivel_c (nivel integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ncue_num_digi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ncue_cod_ejer = ai_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_suma = li_suma + li_longit;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into nivel_c values (li_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl = li_ctrl + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_cuenta = (select ccco_cod_ccon from bcaccco where ccco_cod_ctas =
ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_longit = length(lc_cuenta);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select digitos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_suma')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from nivel_c')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where digitos < li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_cuenta = substr(lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ai_cod_ctas = (select ccco_cod_ctas from bcaccco where
ccco_cod_ccon = lc_cuenta);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ctas is not null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not exists(select csac_cod_ctas from bcacsac where
csac_cod_ctas = ai_cod_ctas and csac_cod_mese = 13 and csac_cod_ejer = ai_ejer)
then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcacsac values(ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ac_tasi = ''D'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set csac_sal_debi = csac_sal_debi + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where csac_cod_mese = ai_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ctas = ai_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = ai_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ac_tasi = ''C'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set csac_sal_cred = csac_sal_cred + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where csac_cod_mese = ai_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ctas = ai_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = ai_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table nivel_c;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sal_cta_mes_c(ai_cod_ctas Integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_mon_naci int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cod_tcue char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_coti_naci decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--
*****************************************************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Procedure para saldo mensual para cuentas CONSOLIDACION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--
*****************************************************************************')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_sal_debi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_sal_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where csac_cod_mese = mese_cod_mese and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese < 13 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ctas = ai_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ''SALDO FINAL''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(csac_sal_debi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(csac_sal_debi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacsac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where csac_cod_mese = mese_cod_mese and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese <= 13 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ctas = ai_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' csac_cod_ejer = ai_ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp t_saldo_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_recalculo_sald_dpvi(li_cod_dpvi_aux
integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpvi integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(vpcn_valor * vpcn_num_vpcn)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where vpcn_cod_dpvi = x.dpvi_cod_dpvi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' year(mcdv_fec_mcdv) = year(today))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' year(mcdv_fec_mcdv) = year(today))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select sum(dchv_valor)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadchv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dchv_cod_mcdv = mcdv_cod_mcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_dpvi = x.dpvi_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' year(mcdv_fec_mcdv) = year(today) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_num_cheq <> 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dchv_cod_modu in (5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (dchv_est_actu is null or')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dchv_est_actu = 5))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_dpvi=li_cod_dpvi_aux')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_ingresos is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_ingresos = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_egresos is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_egresos = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_picn is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_picn = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_cheques is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cheques = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dpvi_sal_disp = ld_ingresos - (ld_egresos + ld_val_picn +
ld_cheques)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_sal_cont = ld_ingresos - ld_egresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi = li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_upd_sdct(ll_cod_dmba int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lp_cod_cuenta int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_sal_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_inicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_mban date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_cod_tasi char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Selecciona el codigo del banco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT mban_cod_cban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO lp_cod_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcamban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE mban_cod_mban = ll_cod_mban;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Selecciona el tipo de transaccion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT pape_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO li_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE pape_cod_pape = li_cod_pape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF li_cod_tran is null THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_cod_tran = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inicializa variables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_sal_disp = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_sal_cont = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ll_cod_mban = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT sdct_fec_sdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO lda_inicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE sdct_cod_cban = lp_cod_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND sdct_fec_sdct = lda_fec_mban;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--si no existe saldo para la fecha del movimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF lda_inicial is null THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT MAX(sdct_fec_sdct)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO lda_inicial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE sdct_cod_cban = lp_cod_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND sdct_fec_sdct < lda_fec_mban;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT sdct_dis_sdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO ld_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE sdct_cod_cban = lp_cod_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND sdct_fec_sdct = lda_inicial;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_sal_disp is null THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_sal_disp = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_sal_cont is null THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_sal_cont = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT sdct_dis_sdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO ld_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE sdct_cod_cban = lp_cod_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND sdct_fec_sdct = lda_inicial;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_sal_disp is null THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_sal_disp = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ld_sal_cont is null THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_sal_cont = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Selecciona movimientos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ll_cod_tfpg = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ls_cod_tasi = C THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_sal_disp = ld_sal_disp + lde_val_dmba;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_sal_cont = ld_sal_cont + lde_val_dmba;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_sal_disp = ld_sal_disp - lde_val_dmba;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_sal_cont = ld_sal_cont - lde_val_dmba;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ls_cod_tasi = C THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_sal_cont =ld_sal_cont + lde_val_dmba;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_cod_tran = 44 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_sal_disp = ld_sal_disp + lde_val_dmba;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF li_cod_tran = 43 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_sal_cont = ld_sal_cont - lde_val_dmba;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_sal_cont = ld_sal_cont - lde_val_dmba;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_sal_disp = ld_sal_disp - lde_val_dmba;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT COUNT(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO li_contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE sdct_cod_cban = lp_cod_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('AND sdct_fec_sdct = lda_fec_mban;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF li_contador = 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('VALUES (lda_fec_mban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('UPDATE bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SET (sdct_dis_sdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE sdct_cod_cban = lp_cod_cuenta AND ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sdct_fec_sdct = lda_fec_mban;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(sdct_fec_sdct)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where date(sdct_fec_sdct) > lda_fec_mban and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sdct_cod_cban = lp_cod_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_contador > 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RECALCULO DE SALDOS BANCARIOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- BUSCO SALDOS BANCARIOS PORTERIORES A LA FECHA DE TRANSACCION
ACTUAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- CALCULO DEL SALDOS ACTUAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sdct_fec_sdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sdct_cod_cban = lp_cod_cuenta and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sdct_fec_sdct > lda_fec_mban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- RETIROS BANCARIOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (li_cod_tran = 39) or (li_cod_tran = 41) or (li_cod_tran = 43) or
(li_cod_tran = 53) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sdct_con_sdct = ld_conta - lde_val_dmba')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(sdct_fec_sdct) = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (li_cod_tran = 39) or (li_cod_tran = 41) or (li_cod_tran = 53)
then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sdct_dis_sdct = ld_dispo - lde_val_dmba')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(sdct_fec_sdct) = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- DEPOSITOS BANCARIOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (li_cod_tran = 38 and ll_cod_tfpg = 1) or (li_cod_tran = 44) or
(li_cod_tran = 54) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sdct_dis_sdct = ld_dispo + lde_val_dmba')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sdct_con_sdct = sdct_con_sdct + lde_val_dmba
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(sdct_fec_sdct) = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tran = 38 and ll_cod_tfpg <> 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcasdct')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sdct_con_sdct = ld_conta + lde_val_dmba')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(sdct_fec_sdct) = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_update_tr_usu(codigo_usuario int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define codigo_opcion_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if control_opcion = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete from bcaustr where ustr_cod_optr in (select optr_cod_optr from
bcaoptr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where optr_cod_opci = codigo_opcion)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ustr_cod_usua = codigo_usuario;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select optr_cod_optr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into codigo_opcion_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaoptr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where optr_cod_opci =codigo_opcion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_contador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaustr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ustr_cod_usua =codigo_usuario and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ustr_cod_optr =codigo_opcion_ctrl;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_contador = 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaustr values(codigo_usuario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_nclientes_2( ai_anio INTEGER )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT max(clie_fec_ingr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO lda_fec_ing')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaclie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes = Month(lda_fec_ing);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHILE i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF i = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 2 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF mod(ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 29;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 28;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 3 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 4 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 5 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 6 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 7 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 8 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 9 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 10 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 11 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 12 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 31; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ls_fecha = i||/||li_dia||/||ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET lda_fecha = DATE(ls_fecha);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into li_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_ingr <= lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie <> 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ncs_rurales_3( ai_anio INTEGER )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_fec_ing date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_valor integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_valor1 integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_dia integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(clie_fec_ingr) into ld_fec_ing')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(ld_fec_ing);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF i = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 2 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF mod(ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 29;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 28;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 3 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 4 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 5 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 6 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 7 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 8 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 9 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 10 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 11 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 12 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 31; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ls_fecha = i||/||li_dia||/||ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_fecha = DATE(ls_fecha);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- No. total de socios y clientes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into li_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli in(''0''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_ingr <= ld_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_est_clie <> 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_valor=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- No. de clientes y socios rurales')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT count(clie_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO li_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_sect = sect_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tsec_cod_tsec = sect_cod_tsec and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tsec_cod_tsec = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie <> 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_valor1=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Porcentaje de clientes y socios rurales')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_total=(li_valor1*100)/li_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_total = ld_total / 100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ins_acem(li_cod_acti integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_cod_acem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- BUSCO NUMERO SECUENCIAL DE LA TABLA BCAACEM')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(acem_cod_acem)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_acem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaacem;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_acem is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_cod_acem = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_cod_acem = li_cod_acem + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaacem values (li_cod_acem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- BUSCO NUMERO SECUENCIAL DE LA TABLA BCAAEAC')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(aeac_cod_aeac)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_aeac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaaeac;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_aeac is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_cod_aeac = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_cod_aeac = li_cod_aeac + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaaeac values (li_cod_aeac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_upd_acem(li_cod_acti integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_cod_acem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- BUSCO NUMERO SECUENCIAL DE LA TABLA BCAACEM')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(acem_cod_acem)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_acem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaacem;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_acem is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_cod_acem = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_cod_acem = li_cod_acem + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaacem values (li_cod_acem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_upd_aeac(li_cod_acti integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_cod_aeac INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- BUSCO NUMERO SECUENCIAL DE LA TABLA BCAACEM')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(aeac_cod_aeac)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_aeac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaaeac;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_aeac is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_cod_aeac = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_cod_aeac = li_cod_aeac + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcaaeac values (li_cod_aeac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ins_defec(lp_banco INT)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_codigo INT;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_codigo CHAR(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FOREACH cursor_tipos FOR')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT tfpg_cod_tfpg INTO li_codigo FROM bcatfpg WHERE tfpg_cod_tfpg
NOT IN (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INSERT INTO bcaefba (efba_cod_tfpg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END FOREACH;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_devengado(ada_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---returning integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lb_vencido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define error_info char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lbo_papeleta integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ON EXCEPTION SET err_num ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- CALL Error_Routine( 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' RAISE EXCEPTION err_num')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- LET lresp = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ROLLBACK WORK;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RETURN lresp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END EXCEPTION ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lbo_papeleta = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_cod_ctas =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_cod_pape = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_vencido = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_cuen_venc = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_riesgo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lb_riesgo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lbo_bandera=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lb_vencido = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_num_divi=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_int_eant ='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_int_xven='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_int_cobr='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_int_gana='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_int_vend='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_int_vena='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_intv_dias =0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tran_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran = 20;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_num_secu = ll_num_secu +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 101;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--// Intereses acumulados por cobrar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_int_cobr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 1726;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--// Inter�s ganados en cr�dito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_int_gana')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 1720;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (SELECT date(trim(vprm_val_vprm)) FROM bcavprm WHERE vprm_cod_prms
=1771) < ada_fec_actu then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' BEGIN WORK;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT DISTINCT bcacred.cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacred.cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaintv.intv_num_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadivc.divc_int_deve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadivc.divc_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadivc.divc_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadivc.divc_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadivc.divc_cod_ediv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ll_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadivc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE ( bcacred.cred_num_cred = bcadivc.divc_num_cred ) and
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcacred.cred_cod_ecre not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcacred.cred_cod_intv = bcaintv.intv_cod_intv ) and
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcadivc.divc_fec_venc > (SELECT
date(trim(vprm_val_vprm)) FROM bcavprm WHERE vprm_cod_prms =1771)) AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( divc_cod_ediv = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ORDER BY 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_divc_deve is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_divc_deve = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_int_plaz is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_plaz = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_divc_paga is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_divc_paga = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_intv_dias >= ll_num_dias and ll_num_dias > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_num_divc> 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(divc_fec_venc)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_num_divc < ll_num_divc and
divc_num_cred = ll_num_cred; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_dias_deve = ada_fec_actu - lda_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dev_calc = round((((ld_int_plaz +
ld_divc_deve+ld_divc_paga) * ll_dias_deve )/ ll_intv_dias)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc set divc_int_deve = (ld_dev_calc -
ld_divc_paga) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc = ll_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapape values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(pape_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = trim(ls_int_cobr) ||
substr(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = trim(ls_int_gana) ||
substr(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcatran set tran_num_secu=ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran=16;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcavprm set vprm_val_vprm= ada_fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 1771;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('COMMIT WORK;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_reclasificacion(ada_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--returning integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lb_vencido')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define error_info char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lbo_papeleta integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--ON EXCEPTION SET err_num ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- CALL Error_Routine( 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RAISE EXCEPTION err_num')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- LET lresp = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- ROLLBACK WORK;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- RETURN lresp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--END EXCEPTION ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lbo_papeleta = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_cod_ctas =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_i = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_cod_pape = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_vencido = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_cuen_venc = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_riesgo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lb_riesgo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lbo_bandera=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lb_vencido = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_num_divi=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_int_eant ='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_int_xven='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_int_cobr='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_int_gana='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_int_vend='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ls_int_vena='''';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tran_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran = 50;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_num_secu = ll_num_secu +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 101;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_num_divi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 1761;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--// Inter�s ejercicio anterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_int_eant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 1725;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--// Inter�s por vencer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_int_xven')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 1727;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--// Intereses acumulados por cobrar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_int_cobr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 1726;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--// Inter�s ganados en cr�dito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_int_gana')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 1720;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--// Inter�s vencido en suspenso (deudora)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_int_vend')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 1722;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--// Inter�s en suspenso (acreedora)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_int_vena')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 1723;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('BEGIN WORK;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_tas_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_int_deve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(paca_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ll_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE ( bcacred.cred_num_cred = bcadivc.divc_num_cred ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcacred.cred_cod_ecre not in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcadivc.divc_cod_ediv < 4) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( bcacred.cred_cod_ccre = paca_cod_ccre) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( paca_ran_inic <= abs(divc_fec_venc - ada_fec_actu)) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ( paca_ran_fina>= abs(divc_fec_venc - ada_fec_actu) or
paca_ran_fina is null)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --( paca_ran_inic <= abs(divc_fec_venc - today )) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --( paca_ran_fina>= abs(divc_fec_venc - today ) or paca_ran_fina
is null)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ORDER BY divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ll_i = 1 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cred_ante = ll_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = substr(ls_ant_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ll_num_cred = ll_cred_ante THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF trim(ls_cod_ccon) <> trim(ls_ant_ccon) THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF lbo_papeleta = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapape values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(pape_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lbo_papeleta = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc set divc_cod_ccon = trim(ls_cod_ccon )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc= ll_cod_divc; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --return ll_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lbo_papeleta = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cred_ante = ll_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF trim(ls_cod_ccon) <> trim(ls_ant_ccon) THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF lbo_papeleta = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapape values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(pape_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lbo_papeleta = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc set divc_cod_ccon =trim( ls_cod_ccon )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc= ll_cod_divc; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --return ll_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_i =ll_i + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcatran set tran_num_secu=ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran=50;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('COMMIT WORK;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- //************ PROCESO DE RECLASIFICACION DE CARTERA VENCIDA A
CARTERA ACTIVA **********//')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Select tran_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('From bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Where tran_cod_tran = 16;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_num_secu = ll_num_secu +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('BEGIN WORK;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT distinct cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_tgar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_reli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' rcla_dias_rcla ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ll_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE cred_cod_ofic = 1 and--al_cod_ofic and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = divc_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre not in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre = rcla_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(ccre_nor_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccre_rie_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_activa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccre_cod_ccre =ll_cod_ccre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_num_reli =1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_activa= ls_plan_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_riesgo = ls_vencida;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_int_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (today - (divc_fec_venc + ll_num_dias )) as dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE divc_num_cred =ll_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv <4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp dividendosvencidos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---INICIALIZACION DE VARIABLES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_encontrado = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_vencido =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_riesgo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lbo_papeleta = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_tot_plaz =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_tot_deve = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_int_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ll_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM dividendosvencidos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ll_encontrado = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ll_cod_ediv = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_vencido = ll_vencido +1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_num_dias <0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_encontrado = ll_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_riesgo = ll_riesgo +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_vencido > 0 and ll_riesgo >0 and ll_encontrado <= 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- no puedo activar nada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ll_vencido >0 and ll_encontrado>0 and ll_vencido< ll_num_divi then
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --- activar credito y cambiar estados de dividendos a riesgo y
cuentas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcacred set cred_cod_ecre =0 where cred_num_cred =
ll_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' UPDATE bcadivc SET divc_cod_ediv = 3 WHERE divc_cod_divc
>=ll_encontrado and divc_num_cred =ll_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_int_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ll_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM dividendosvencidos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc>=ll_encontrado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lbo_papeleta = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapape values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(pape_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lbo_papeleta = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = trim(ls_riesgo) || substr(ls_ant_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_divc_deve >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_int_vend) ||
substr(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_int_vena) ||
substr(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_int_cobr) ||
substr(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_int_gana) ||
substr(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc set divc_cod_ccon = trim(ls_cod_ccon ) where
divc_cod_divc= ll_cod_divc; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --return ll_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ll_riesgo >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- activar cuotas y cambiar cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' UPDATE bcadivc SET divc_cod_ediv = 1 WHERE divc_cod_ediv=3 and
divc_num_cred =ll_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_int_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ll_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM dividendosvencidos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_ediv=3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lbo_papeleta = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapape values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(pape_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --return ll_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lbo_papeleta = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = trim(ls_activa) ||
substr(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc set divc_cod_ccon = trim(ls_cod_ccon ) where
divc_cod_divc= ll_cod_divc; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --return ll_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' drop table dividendosvencidos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcatran set tran_num_secu=ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran=16;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('COMMIT WORK;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--/////////////////////////////////////////////////////////////////////////
/////////////////')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--//************ PROCESO DE RECLASIFICACION DE CARTERA ACTIVA A CARTERA
VENCIDA **********//')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('--/////////////////////////////////////////////////////////////////////////
/////////////////')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Select tran_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('From bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Where tran_cod_tran = 18;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_num_secu = ll_num_secu +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('BEGIN WORK;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT distinct cred_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_tgar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_reli')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' rcla_dias_rcla ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ll_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE cred_num_cred = divc_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre not in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ccre = rcla_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(ccre_nor_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccre_rie_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_activa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccre_cod_ccre =ll_cod_ccre;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_num_reli =1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_activa= ls_plan_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_riesgo = ls_vencida;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_int_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (today - (divc_fec_venc + ll_num_dias )) as dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE divc_num_cred =ll_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv <4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp dividendosvencidos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---INICIALIZACION DE VARIABLES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_encontrado = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_vencido =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_riesgo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lbo_papeleta = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_tot_plaz =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_tot_deve = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_int_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(divc_cod_ccon) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ll_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM dividendosvencidos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ll_cod_ediv = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_vencido = ll_vencido +1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_num_dias > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- cambiar estado ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lbo_papeleta = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapape values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(pape_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --return ll_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lbo_papeleta = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = trim(ls_vencida) ||
substr(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc set divc_cod_ediv = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_divc_deve >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_int_vend) ||
substr(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_int_vena) ||
substr(ls_ant_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_int_cobr) ||
substr(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_int_gana) ||
substr(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --return ll_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_riesgo = ll_riesgo +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_vencido = ll_vencido + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_riesgo > 0 and ll_vencido >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lbo_papeleta = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapape values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(pape_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lbo_papeleta = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_cod_ccon = trim(ls_riesgo) ||
substr(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc set divc_cod_ediv = 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_ctas = ft_cod_ctas(trim(ls_ant_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --return ll_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' drop table dividendosvencidos;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcatran set tran_num_secu=ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran=18;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcavprm set vprm_val_vprm= ada_fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 1772;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('COMMIT WORK;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_actu_ingr_conf(ad_val_conf decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_num_reg integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_num_reg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcading')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ding_cod_clie = al_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ding_cod_ineg = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_num_reg is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_reg =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_num_reg > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcading set ding_val_deta = ad_val_conf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ding_cod_clie = al_cod_clie and ding_cod_ineg = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcading values(1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_calc_num_cost(ll_cod_inve integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cod_tinv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_estado = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Codigo de Tipo de Inversion ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select inve_cod_tinv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_tinv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcinve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_cod_inve = ll_cod_inve;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_num_actu is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_num_actu=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- CASO DE ACCIONES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_cod_tinv= 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_cod_tran = 65 then -- COMPRA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ll_cod_tran = 66 then -- venta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_num_actu <= ld_num_minv then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_estado= 3 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ll_cod_tran = 67 then --ajuste')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_num_minv = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_num_actu = ld_num_actu +(ld_num_minv * li_signo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcminv set minv_cos_ante = ld_val_actu where
minv_cod_minv=ll_cod_minv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcinve set inve_num_inve = ld_num_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_cod_inve = ll_cod_inve;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF; -- FIN de TIpo DE INversion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- CASO DE BONOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF ll_cod_tinv= 2 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_cod_tran = 65 then -- COMPRA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ll_cod_tran = 66 then -- venta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_estado= 3 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ll_cod_tran = 67 then --ajuste')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_num_minv = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --let ld_num_actu = ld_num_actu +(ld_num_minv * li_signo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT MAX(MINV_COD_MINV)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ll_minv_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcminv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where minv_cod_inve = ll_cod_inve and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' minv_cod_minv < ll_cod_minv ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select minv_cos_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' INTO ld_cos_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcminv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where minv_cod_minv=ll_minv_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not ll_minv_ante is null and ll_minv_ante >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcinve set inve_val_inve = ld_cos_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_cod_inve = ll_cod_inve;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcminv set minv_cos_ante = ld_cos_ante ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where minv_cod_minv= ll_cod_minv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_plazofijo_automaticos(ada_fecha date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_tas_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_fina date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--cuentas contables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cta_gast')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_caja char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_detalle char(60);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_tide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_num_loca')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tran integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_tran = 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_exec=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_pape = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--cuenta gasto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_cta_gast')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 2114;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--cuenta provision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_cta_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 2115;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- valor rendimiento financiero')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_por_rend')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms = 1404;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- cuneta contable rendimientos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ctap_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_cta_rend')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcactap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ctap_cod_prms = 1404;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- transaccion de pago de intereses plazo fijo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tran_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran = li_cod_tran ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_num_secu = ll_num_secu +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --intereses')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_dpfi = crau_cod_dpfi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pgpf_cod_dpfi = dpfi_cod_dpfi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pgpf_cod_rubr= 2 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' crau_cod_rubr = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pgpf_fec_fina<=ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pgpf_cod_edpf not in(3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_rete = round((ld_val_pgpf * ld_por_rend/100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_val_pgpf - ld_val_rete ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(prpf_val_prpf)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_prov')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaprpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prpf_cod_pgpf = li_cod_pgpf and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prpf_cod_tasi =''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_prov is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_prov=0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapape values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- let ll_cod_count = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(pape_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_pape ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(caja_cod_caja)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where caja_cod_usua = al_cod_usua;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(mcdv_cod_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_mcdv = ll_cod_mcdv +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_cco_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cta_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_tcdv = tcdv_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_dpvi = li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_esta = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cta_dpvi = ll_ina_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_detalle = ACREDITACION INTERESES PLAZO FIJO N� || li_num_dpfi
|| PAGO N�: || li_num_pgpf ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamcdv values(ll_cod_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaddte values(ll_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_rete > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadeip values(li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_exec=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_prov> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_gast = ld_val_pgpf - ld_val_prov;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_gast > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_gast < 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaprpf values(li_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadepg values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcapgpf set pgpf_cod_edpf = 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where pgpf_cod_pgpf = li_cod_pgpf; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(clie_ide_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_clie = clie_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_cod_dpfi = li_cod_dpfi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ls_tide_clie<>''R'' and ls_tide_clie<>''C'' and ls_ide_clie<>''P''
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_tide_clie = ls_tide_repr;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_ide_clie = ls_ide_repr;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select setr_cod_setr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_setr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasetr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tptr_cod_tptr=6 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tpid_cod_iden=ls_tide_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select idif_num_loca')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_num_loca')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaidif;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if length(ls_num_loca) > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcarefi values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ls_num_esta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadrtr values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' (select crfi_cod_secu from bcacrfi where
crfi_cod_crfi=''323E'')')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcaidif set idif_num_secu = ll_secu +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_secu = ll_num_secu +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_pape> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatran set tran_num_secu = ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tran_cod_tran = li_cod_tran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_pape = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_tran = 5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- transaccion de cancelacion plazo fijo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tran_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran = li_cod_tran ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_num_secu = ll_num_secu +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --cancelacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_dpfi = crau_cod_dpfi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pgpf_cod_dpfi = dpfi_cod_dpfi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pgpf_cod_rubr= 1 and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' crau_cod_rubr = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pgpf_fec_fina<=ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pgpf_cod_edpf not in(3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_edpf > 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --cuenta de plazo menor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cta_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavprm ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where vprm_cod_prms = 2116;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cta_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prdi_cod_prms = vprm_cod_prms and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prms_cod_prms = vprm_cod_prms and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prdi_cod_prms = prms_cod_prms and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' prms_cod_modu = 14 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ld_plz_recl between prdi_plz_prdi and prdi_plz_prdi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_val_pgpf;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapape values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- let ll_cod_count = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(pape_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_pape ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(caja_cod_caja)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where caja_cod_usua = al_cod_usua;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(mcdv_cod_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_mcdv = ll_cod_mcdv +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_cco_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cta_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_tcdv = tcdv_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_dpvi = li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_esta = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cta_dpvi = ll_ina_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_detalle = ACREDITACION DEPOSITO PLAZO FIJO N� || li_num_dpfi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamcdv values(ll_cod_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaddte values(ll_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadepg values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcapgpf set pgpf_cod_edpf = 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where pgpf_cod_pgpf = li_cod_pgpf; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadpfi set dpfi_cod_edpf = 3 where dpfi_cod_dpfi =
li_cod_dpfi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_secu = ll_num_secu +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_pape> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatran set tran_num_secu = ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tran_cod_tran = li_cod_tran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_upd_tadv(lp_codigo_tasa int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ldat_fecha DATETIME YEAR TO SECOND;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Obtiene la fecha del servidor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT UNIQUE(current) INTO ldat_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if lp_tasa_fin is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lp_tasa_fin = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if lp_tasa_ini is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lp_tasa_ini = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inserta en tabla de historicos la tasa modificada')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO bcathdv VALUES(lp_codigo_tasa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sal_cta_mes(ai_cod_ctas Integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_coti_naci decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select ccon_cod_ejer from bcaccon where ccon_cod_ctas
= ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_ofic <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_sal_debi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_sal_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' OUTER bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri = mese_cod_mese and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese < 13 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ai_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ofic= ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ''SALDO FINAL''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(sact_sal_debi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri = mese_cod_mese and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese <= 13 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ai_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ofic= ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp t_saldos_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_des_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(sact_sal_debi) as sact_sal_debi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(sact_sal_cred) as sact_sal_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' OUTER bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri = mese_cod_mese and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese < 13 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ai_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' union')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ''SALDO FINAL''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(sact_sal_debi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sum(sact_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' 13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri = mese_cod_mese and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mese_cod_mese <= 13 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas = ai_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ofic= ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into temp t_saldos_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_calc_sald_dpvi(ada_fecha Date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_aux integer;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
---------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- el valor picnorado es necesario insertarlo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- en la bcasald para los dos casos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- cuando solo se actualice los saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- o cuando se recalcule los saldos')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
---------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--picnorados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(vpcn_valor * vpcn_num_vpcn)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_val_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vpcn_cod_dpvi = ai_cod_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_val_picn is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_picn = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
--------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Obtiene el saldo disponible y contable de la cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- ')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
--------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpvi_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpvi_cod_dpvi = ai_cod_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_dispo>ld_conta then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_dispo is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dispo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_conta is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_conta = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (ai_cod_tran = 8 or ai_cod_tran = 11 or ai_cod_tran = 12 or
ai_cod_tran = 13) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_conta = ld_conta + ad_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('
-----------------------------------------------------------------------------
-')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- SI ES ACREDITACION DE INTERESES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- NO SE INSERTA REGISTRO EN LA BCADDTE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- POR LO QUE ES NECESARIO ACTUALIZAR EL SALDO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- DISPONIBLE TAMBIEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('
-----------------------------------------------------------------------------
-')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_cod_tran = 13 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dispo = ld_dispo + ad_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif (ai_cod_tran <> 35) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('
------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --verifica que tenga saldo disponible para realizar la transacci�n')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('
------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select pape_cod_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where pape_cod_pape =mcdv_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_mcdv = ai_cod_mcdv ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_cod_tran <> 43 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_dispo >= ad_valor then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_conta = ld_conta - ad_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_conta = ld_conta - ad_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- ACTUALIZA EL SALDO CONTABLE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- DE LA CUENTA DEL SOCIO')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set dpvi_sal_cont = ld_conta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpvi_cod_dpvi = ai_cod_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sald_fec_sald = ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_cod_dpvi = ai_cod_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_conteo is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_conteo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_conteo = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' values (ada_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sald_dispo = ld_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_fec_sald = ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_cod_dpvi = ai_cod_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- ACTUALIZA LA FECHA DEL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- ULTIMO MOVIMIENTO')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (ai_cod_tran <> 35 and ai_cod_tran <> 13) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dpvi_fec_umcd = today')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi = ai_cod_cuenta;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_historial_posteo(al_cod_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afchpol values(al_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_act_sal_libr(ai_cod_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_bandera integer;')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- SI EL MOVIMIENTO YA ESTABA IMPRESO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- O SI EL MOVIMIENTO FUE GUARDADO COMO NO IMPRESO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- EL VALOR DEL MOVIMIENTO DEBE SER TOMADO CON SIGNO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- INVERSO PARA QUE EL SALDO DE LA CUENTA SE INCREMENTE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- SI FUE UN EGRESO O DECREMENTE SI FUE UN INGRESO')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('---------------------------------------------------------------------------
-------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_bandera = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_anterior = 0 and ai_actual = 1 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ad_valor = ad_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_bandera = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif ai_anterior = 1 and ai_actual = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ad_valor = -ad_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_bandera = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ad_valor = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_bandera =1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --ESTE PROCEDIMIENTO ACTUALIZA EL ULTIMO SALDO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --IMPRESO EN LA LIBRETA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- OBTIENE ULTIMO SALDO IMPRESO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select libr_sal_libr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcalibr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where libr_cod_dpvi = ai_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_saldo is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('
------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- ACTUALIZA EL SALDO DEPENDIENDO DEL TIPO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- DE TRANSACCION')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('
------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (ai_cod_tran = 8 or ai_cod_tran = 11 or ai_cod_tran=12 or
ai_cod_tran=13) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = ld_saldo + ad_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (ai_cod_tran <> 35) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = ld_saldo - ad_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('
-----------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- ACTUALIZA EL NUEVO SALDO IMPRESO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('
------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (ai_cod_tran <> 35) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcalibr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set libr_sal_libr = ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where libr_cod_dpvi = ai_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ins_gara(li_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_cod_agar INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- BUSCO NUMERO SECUENCIAL DE LA TABLA BCAAGAR')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(agar_cod_agar)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_agar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaagar;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_agar is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_cod_agar = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_cod_agar = li_cod_agar + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcaagar values (li_cod_agar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_del_gara(li_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_cod_agar INTEGER;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- BUSCO NUMERO SECUENCIAL DE LA TABLA BCAAGAR')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(agar_cod_agar)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_agar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaagar;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_agar is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_cod_agar = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_cod_agar = li_cod_agar + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcaagar values (li_cod_agar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_actualiza_logestado(al_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_lces integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_cod_lces >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afclces set lces_est_adic = 0 where lces_cod_lces < al_cod_lces
and lces_cod_clie = al_cod_clie and (lces_est_adic = 1 or lces_est_adic is null);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afclces set lces_est_adic = 1 where lces_cod_lces =
al_cod_lces;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_historial_inactivacion(al_dpvi integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afchidv values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_tmpsact_comp_sal(ai_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_suma = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create temp table nivel (nivel integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ncue_cod_ejer = ai_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_suma = li_suma + li_longit;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into nivel values (li_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl = li_ctrl + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_cuenta = (select ccon_cod_ccon from bcaccon where ccon_cod_ctas =
ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_longit = length(lc_cuenta);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select digitos into li_suma')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where digitos < li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_cuenta = substr(lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ai_cod_ctas = (select ccon_cod_ctas from bcaccon where
ccon_cod_ccon = lc_cuenta and ccon_cod_ejer = ai_ejer);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('If ai_cod_ctas > 0 or ai_cod_ctas is not null Then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ac_tasi = ''D'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update comp_sal_cta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sal_mes_debe = sal_mes_debe+ ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cod_ctas = ai_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ac_tasi = ''C'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update comp_sal_cta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sal_mes_cred = sal_mes_cred+ ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cod_ctas = ai_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('End if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table nivel;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_actualiza_anexo(ai_cod_anrl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_envi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select anrl_vta_envi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_val_envi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaanrl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where anrl_cod_anrl = ai_cod_anrl;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_val_envi >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaanrl set anrl_vta_envi = ld_val_envi + ad_val')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where anrl_cod_anrl = ai_cod_anrl;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_detalle_beneficio_social(al_cod_clie
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_trcj ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trcj_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_val_trcj')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatrcj')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where trcj_cod_trcj = al_cod_trcj;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_ban = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(dbso_cod_dbso)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dbso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcdbso where dbso_cod_clie = al_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dbso_cod_trcj = al_cod_trcj;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dbso_mes_dbso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcdbso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dbso_cod_dbso = li_cod_dbso;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not li_mes is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(dbso_val_dbso)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcdbso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dbso_mes_dbso = li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dbso_ani_dbso = li_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dbso_cod_clie = al_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select pape_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where pape_cod_pape = al_cod_pape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_mes is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select month(clie_fec_ingr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie where clie_cod_clie = al_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_anio is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select year(clie_fec_ingr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie where clie_cod_clie = al_cod_clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val< ld_val_trcj and ld_val>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (ld_val_trcj - ld_val)>= ad_val_tran then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val = ad_val_tran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val = ld_val_trcj - ld_val ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbso values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ad_val_tran = ad_val_tran - ld_val;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = li_mes +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' while ad_val_tran > 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_mes> 12 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_anio = li_anio +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ad_val_tran < ld_val_trcj then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_trcj = ad_val_tran;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbso values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ad_val_tran = ad_val_tran - ld_val_trcj;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_mes = li_mes +1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_act_sal_disp(ada_fecha Date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_dispo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpvi integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tran integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--ESTE PROCEDIMIENTO ACTUALIZA EL SALDO DISPONIBLE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--DE LA CUENTA CUANDO SE HA REALIZADO UN DEPOSITO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--PARTE EN EFECTIVO Y PARTE EN CHEQUES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- OBTIENE SALDO DISPONIBLE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_mcdv = ai_cod_mcdv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_dispo is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dispo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- ACTUALIZA EL SALDO DEPENDIENDO DEL TIPO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- DE TRANSACCION')
GO
INSERT INTO informix.sysaggregates(name)

VALUES('------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (li_cod_tran = 8 and ai_cod_tfpg = 1) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dispo = ld_dispo + ad_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif (li_cod_tran = 11 or li_cod_tran=12 or li_cod_tran=13) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dispo = ld_dispo + ad_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif (li_cod_tran = 6 or li_cod_tran = 9 or li_cod_tran = 10 or
li_cod_tran = 37) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dispo = ld_dispo - ad_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif li_cod_tran = 25 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --SI ES CIERRE DE CUENTA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dispo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--SI LA TRANSACCION ES PAGO DE INTERES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--ANTES DEL CIERRE DE CUENTA NO SE DEBE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--AFECTAR EL SALDO DISPONIBLE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--AFECTA CUANDO SE REGISTRA EL MOVIMIENTO BCAMCDV')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_tran <> 13 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('
-----------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- ACTUALIZA EL SALDO DISPONIBLE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('
------------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dpvi_sal_disp = ld_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi = li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('
-----------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- ACTUALIZA LA TABLA DE SALDOS DIARIOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('
-----------------------------------------------------------------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sald_dispo = ld_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(sald_fec_sald) = ada_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_cod_dpvi = li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_historico_bcadirb(al_cod_divc integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_cod_rubr not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afchdir values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_corrige_modificacion(numcred integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_seguro decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--obtiene fecha inicial del cr�dito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lda_fecha_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_num_cred = numcred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cred_por_segd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_seguro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_num_cred=numcred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = numcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Selecciona el valor del interes devengado del dividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_int_deve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_int_deve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc=li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --verifica si el dividendo est� en estado activo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ediv = 1 or li_ediv = 2 or li_ediv = 3 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --establece el transcurso de d�as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_intervalo = lda_fecha - lda_fecha_ant;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --calcula el valor del interes del dividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_plaz = ld_saldo * ld_interes * li_intervalo / 36000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --calcula el valor del mantenimiento')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let
ld_valor_seguro=(ld_saldo*ld_seguro*li_intervalo)/li_intervalo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Si Dividendo no tiene valor devengado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' If (ld_int_deve) = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor del inter�s en la bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set divc_int_plaz = ld_int_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = numcred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_count')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb where dirb_cod_divc=li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_count>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor en la trabla bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dirb_val_dirb = ld_int_plaz')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dirb_val_dirb = ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dirb_val_dirb = ld_valor_seguro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc = 8; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor del mantenimeinto en la dirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor del inter�s en la bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set divc_int_plaz = (ld_int_plaz-divc_int_deve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = numcred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_count')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb where dirb_cod_divc=li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_count>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor en la trabla bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dirb_val_dirb = ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor del mantenimeinto en la dirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dirb_val_dirb = ld_valor_seguro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc = 8; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if --estado del dividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor de las variables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = ld_saldo - ld_cap_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha_ant = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure
informix.sp_procedure_actualiza_telefono_principal(ai_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_tele integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tele_cod_tele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_tele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatele')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tele_cod_clie = ai_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_tele <> ai_cod_tele then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatele set tele_ban_prin = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tele_cod_tele = li_cod_tele;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_actualiza_ingresos_egresos(ada_fec_actu
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcading')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ding_cod_clie = al_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ding_cod_ineg = al_cod_ineg;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ineg_sig_ineg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_signo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaineg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ineg_cod_ineg = al_cod_ineg;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcading set ding_val_deta = ding_val_deta + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ding_cod_clie = al_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ding_cod_ineg = al_cod_ineg; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcading values(al_cod_ineg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_cod_ineg> 3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcading')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ding_cod_clie = al_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ding_cod_ineg = 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcading set ding_val_deta = ding_val_deta+ ( ad_valor *
li_signo)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ding_cod_clie = al_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ding_cod_ineg = 3; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcading values(3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_saldo_cta_cobrar(ad_val_tran decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_signo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_est_eacd= 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_cod_tran = 73 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_signo = -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_cod_tran = 74 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select mcco_val_mcco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcmcco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcco_cod_mcco = al_cod_mcco;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_sal_disp = ld_sal_disp +( ad_val_tran * ll_signo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---let ld_sal_cont = ld_sal_cont +( ad_val_tran * ll_signo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_sal_disp = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_est_eacd= 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_cod_tran = 73 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcmcco set mcco_val_mcco = ld_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcco_cod_eacd = li_est_eacd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcco_cod_mcco = al_cod_mcco;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--if al_cod_tran = 74 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- update afcmcco set mcco_cod_pape = al_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- where mcco_cod_mcco = al_cod_mcco;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_upd_tasa(ai_codigo_tasa int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ldat_fecha DATETIME YEAR TO SECOND; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Obtiene la fecha del servidor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT UNIQUE(current) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO ldat_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaofic; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ad_fin_tasa is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ad_fin_tasa = 0 ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ad_ini_tasa is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_ini_tasa = 0 ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Inserta en tabla de historicos la tasa modificada ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO afcthtas VALUES(ai_codigo_tasa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_reparametrizar( ai_anio integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_anio_aux')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ccon varchar(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ooem varchar(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Establece el a�o para el ejercicio anterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_anio_aux = ai_anio - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--establece en 0 el retorno')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_retorno = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Obtiene el c�digo del ejercicio actual y del ejercio anterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ejer_ani_ejer = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ejer_ani_ejer = li_anio_aux;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Reparametriza rubros de cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select rubr_cod_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcarubr x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where rubr_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas is not null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcarubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set rubr_cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where rubr_cod_rubr = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select rubr_cod_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcarubr x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where rubr_cta_paga = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas is not null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcarubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set rubr_cta_paga = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where rubr_cod_rubr = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Reparametriza comisiones de cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select comi_cod_comi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacomi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comi_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcacomi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set comi_cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comi_cod_comi = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Reparametriza cuentas bancarias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cban_cod_cban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cban_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcacban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set cban_cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cban_cod_cban = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Reparametriza detalles or�genes �rdenes emisi�n')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select doem_cod_ooem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' doem_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_ooem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadoem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where doem_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadoem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set doem_cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where doem_cod_ooem = ls_ooem and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' doem_cod_ctas = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Reparametriza transacciones cajas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trcj_cod_trcj')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatrcj')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where trcj_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatrcj')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set trcj_cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where trcj_cod_trcj = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Reparametriza transacciones NDD/NDC')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tndd_cod_tndd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatndd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tndd_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatndd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set tndd_cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tndd_cod_tndd = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--reparametriza la tabla bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--cuentas activas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cco_acti = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set tcdv_cco_acti = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cod_tcdv = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--cuentas inactiva')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cco_inac = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set tcdv_cco_inac = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cod_tcdv = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--cuenta de gasto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cco_gast = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set tcdv_cco_gast = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cod_tcdv = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--cuenta de provision')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cco_prov = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set tcdv_cco_prov = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cod_tcdv = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--dep�sitos por confirmar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cco_dxcf = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set tcdv_cco_dxcf = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cod_tcdv = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--reparametriza par�metros globales')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select vprm_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where vprm_val_vprm = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' vprm_cod_prms in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('611')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set vprm_val_vprm = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where vprm_cod_prms = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--reparametriza la tabla ctap que est� relacionada con los par�metros
globales')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ctap_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcactap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ctap_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ctap_cod_prms in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcactap')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set ctap_cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ctap_cod_prms = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- Cambio a cuentas cobrar oficnas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if exists (select tabname from systables where tabname like ''afccpof'')
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(ccon_cod_ccon) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afccpof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = cpof_cta_cobr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer =li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afccpof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set cpof_cta_cobr = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cpof_ofi_dest = li_codigo1 and cpof_ofi_orig= li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- Cambio a cuentas pagar oficnas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if exists (select tabname from systables where tabname like ''afccpof'')
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(ccon_cod_ccon) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afccpof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = cpof_cta_pagr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer =li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afccpof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set cpof_cta_pagr = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cpof_ofi_dest = li_codigo1 and cpof_ofi_orig= li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('------ proveedor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(ccon_cod_ccon) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaprdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = prdr_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer =li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcaprdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set prdr_cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where prdr_cod_prdr = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---**********************************ACTIVOS
FIJOS******************************************************---')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--activos fijos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF EXISTS (select tabname from systables where tabname like ''bcatafi'')
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tafi_cod_tafi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatafi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tafi_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatafi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set tafi_cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tafi_cod_tafi = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--gasto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF EXISTS (select tabname from systables where tabname like ''bcatafi'')
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tafi_cta_gast')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatafi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tafi_cta_gast = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatafi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set tafi_cta_gast = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tafi_cta_gast = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--depresiacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF EXISTS (select tabname from systables where tabname like ''bcatafi'')
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tafi_cta_depr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatafi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tafi_cta_depr = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatafi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set tafi_cta_depr = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tafi_cta_depr = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--revalorizacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF EXISTS (select tabname from systables where tabname like ''bcatafi'')
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select tafi_cta_reva')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatafi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tafi_cta_reva = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatafi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set tafi_cta_reva = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tafi_cta_reva = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---**********************************FIN ACTIVOS
FIJOS******************************************************---')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---------************************CUENTAS POR COBRAR Y
PAGAR**********************************-----------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---servicios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if exists (select tabname from systables where tabname like ''afcserv'')
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select serv_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcserv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where serv_cod_ctas= ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcserv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set serv_cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where serv_cod_serv = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---gasto')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if exists (select tabname from systables where tabname like ''afcserv'')
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select serv_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcserv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where serv_cco_gast= ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcserv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set serv_cco_gast = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where serv_cod_serv = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---provison')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if exists (select tabname from systables where tabname like ''afcserv'')
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select serv_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcserv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where serv_cco_prov= ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcserv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set serv_cco_prov = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where serv_cod_serv = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--ingreso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if exists (select tabname from systables where tabname like ''afcserv'')
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select serv_cod_serv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcserv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where serv_cco_ingr= ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcserv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set serv_cco_ingr = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where serv_cod_serv = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--tipos debitos creditos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if exists (select tabname from systables where tabname like ''afcttpr'')
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ttpr_cod_ttpr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcttpr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ttpr_cod_ctas = ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcttpr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set ttpr_cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ttpr_cod_ttpr = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---------************************FIN CUENTAS POR COBRAR Y
PAGAR**********************************-----------------')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- ***DEPENDENCIA Y ROLES----')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if exists (select tabname from systables where tabname like ''bcadect'')
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dect_cod_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' trim(ccon_cod_ccon)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dect_cod_ctas= ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dect_cod_ctas = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dect_cod_depe = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---** FIN DEPENDENCIA Y ROLES ***--')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---- cajero automatico')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF EXISTS (select tabname from systables where tabname like ''afccror'')
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cror_cod_cror')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_codigo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afccror')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cror_cta_cror= ccon_cod_ctas and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon like ls_ccon and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ejer = li_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ctas is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_ctas = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_ctas>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afccror')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set cror_cta_cror = li_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cror_cod_cror = li_codigo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cambio_tvinc(al_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcctvc values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_actualiza_ingresos_egresos_act(ada_fec_actu
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---returning char(100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_signo=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_signo1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(ding_val_deta)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_val_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcading')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ding_cod_clie = al_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ding_cod_ineg = al_cod_ineg;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_val_ante is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_ante= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ad_valor is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ad_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_ban = 1 then ---borrado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo1 = li_signo1 *-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo1 = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = li_signo *-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_Val_ante + ( ad_Valor_ante * li_signo) + (ad_valor *
li_signo1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcading set ding_val_deta = ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ding_cod_clie = al_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ding_cod_ineg = al_cod_ineg; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- return al_cod_clie || al_cod_ineg || ad_valor ||
ad_valor_ante;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --- raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_cod_ineg> 3 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcading')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ding_cod_clie = al_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ding_cod_ineg = 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(ding_val_deta)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcading')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ding_cod_clie = al_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ding_cod_ineg = 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ineg_sig_ineg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_signo1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaineg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ineg_cod_ineg = al_cod_ineg;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_signo1 <0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod>0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcading set ding_val_deta = ding_val_deta+ ( ad_valor *
li_signo1) + (ad_valor_ante * li_signo)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ding_cod_clie = al_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ding_cod_ineg = 3; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --- raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcading values(3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- return al_cod_clie ||,|| al_cod_ineg ||,|| ad_valor ||,||
ad_valor_ante ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_actualiza_mora(ada_fec_actu date )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lf_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--parametro de interes mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_par_mora = ft_cod_parametros(1768);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia_base = ft_cod_parametros(9);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_orgura =ft_cod_parametros(1728);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia_base = li_dia_base * 100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select CLIE_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into LI_COD_CLIE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie=cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred in (select divc_num_cred from bcadivc where
divc_fec_venc<ada_fec_actu and divc_cod_ediv not in (5))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by clie_num_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora_total=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_cap_sald = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_mora_paga= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lf_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred=li_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_venc<ada_fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(abdv_fec_abdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lf_fecha_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where abdv_cod_divc = li_cod_divc and abdv_cod_rubr = 4 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_pago in (select pago_cod_pago from bcapago where
pago_ctr_pago = 1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lf_fecha_mora is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lf_fecha_mora =lf_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dias_mora = ada_fec_actu - lf_fecha_mora;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- INTERES MORA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (li_dias_mora > li_orgura) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_int_mora< 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_mora = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and dirb_cod_rubc = 4; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_num_divc = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb set dirb_val_dirb = ld_int_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_genera_periodos(acod_ejer Integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_ctr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_ctr = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while li_ctr <= 13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaperi values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_ctr = li_ctr + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Insert Into bcandoc select acod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ejer_ani_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ejer_cod_ejer = acod_ejer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_ejer_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ejer_ani_ejer = li_anio -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('IF LI_EJER_ANTE IS NULL THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET LI_EJER_ANTE = ACOD_EJER -1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Insert Into bcandoc select acod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Insert Into bcandoc select acod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Insert Into bcandoc select acod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_tabla_pagos_deposito_vista(ai_cod_dpvi
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_pago ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_Fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_inte ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ada_fec_ppag = ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (select count(*) from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select intv_num_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaintv where intv_cod_intv =as_cod_intv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ai_plz >= li_num_dias then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_pago = ai_plz / li_num_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_pago = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_dias= ai_plz;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_Fec_venc = ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_ante = ada_fec_inic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' for ll_i = 1 to li_num_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_num_dias>= 30 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_Fec_venc = ft_calculo_fecha(lda_fec_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_Fec_venc = lda_Fec_venc + li_num_dias;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdidv values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias_mes = lda_Fec_venc - lda_fec_ante ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = ld_saldo +ad_val_ahor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---return ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_inte = Round(ai_tas_dpvi * ld_saldo *
li_dias_mes/(360*100)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdidv values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = ld_saldo + ld_val_inte ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_ante = lda_fec_venc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end for;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_recalculointerescredito(numcred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_seguro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tcse char (3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--actualiza la fecha de vencimiento original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set divc_fec_venc = divc_fec_auxi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_num_cred = numcred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' not (divc_fec_auxi is null) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv <> 5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--obtiene fecha inicial del cr�dito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lda_fecha_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_num_cred = numcred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_dia_tamo is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dia_tamo = 360;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_cap_ori = ld_saldo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_num_cred = numcred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_sedg =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let LD_INT_PAGA = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = numcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by divc_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --verifica si el dividendo est� en estado activo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ediv = 1 or li_ediv = 2 or li_ediv = 3 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --establece el transcurso de d�as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- let li_intervalo =30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_intervalo = lda_fecha - lda_fecha_ant;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_intervalo=0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_plaz=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_seguro=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_plaz = ld_saldo * ld_interes * li_intervalo /
(li_dia_tamo * 100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --seguto prorrateado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ls_cod_tcse =''FP'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_seguro = round((ld_cap_ori *
ld_seguro)/ll_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ls_cod_tcse =''PA'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_seguro = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let
ld_valor_seguro=(ld_saldo*ld_seguro*li_intervalo)/30; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_sedg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb where dirb_cod_rubc=8 and
dirb_cod_divc=li_cod_divc ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_sedg = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --update bcadirb set dirb_val_dirb = ld_valor_seguro -
dirb_val_paga where dirb_cod_divc= li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --and dirb_cod_rubc= 8;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_int_deve is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_deve = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_int_paga is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_paga= 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_sedg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb where dirb_cod_rubc=2 and
dirb_cod_divc=li_cod_divc ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_sedg = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (ld_int_plaz - LD_INT_PAGA)>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --update bcadirb set dirb_val_dirb = ld_int_plaz -
LD_INT_PAGA ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---where dirb_cod_divc = li_cod_divc and
dirb_cod_rubc= 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---update bcadirb set dirb_val_dirb = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---where dirb_cod_divc = li_cod_divc and
dirb_cod_rubc= 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (ld_int_plaz - LD_INT_PAGA)>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---update bcadivc set divc_int_plaz = ld_int_plaz -
ld_int_paga - ld_int_deve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ----where divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ----update bcadivc set divc_int_plaz = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ----where divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if --estado del dividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor de las variables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = ld_saldo - ld_cap_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha_ant = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_recalculointeres(al_num_pago integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_seguro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tcse char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_ctr_pago <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into numcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_divc in(select abdv_cod_divc from bcaabdv where
abdv_cod_pago = al_num_pago);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if numcred is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--actualiza la fecha de vencimiento original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set divc_fec_venc = divc_fec_auxi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_num_cred = numcred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' not (divc_fec_auxi is null) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv <> 5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--obtiene fecha inicial del cr�dito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lda_fecha_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_num_cred = numcred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cred_por_segd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_seguro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_num_cred=numcred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_sedg =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_num_cred = numcred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_cap_ori= ld_saldo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = numcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Selecciona el valor del interes devengado del dividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_int_deve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_int_deve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc=li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --verifica si el dividendo est� en estado activo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ediv = 1 or li_ediv = 2 or li_ediv = 3 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --establece el transcurso de d�as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_intervalo = lda_fecha - lda_fecha_ant;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_intervalo=0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_plaz=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_seguro=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_plaz = ld_saldo * ld_interes * li_intervalo /
36000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --seguto prorrateado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ls_cod_tcse =''FP'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_seguro = round((ld_cap_ori *
ld_seguro)/ll_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ls_cod_tcse =''SD'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_seguro = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ls_cod_tcse =''FD'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let
ld_valor_seguro=(ld_saldo*ld_seguro*li_intervalo)/30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_seguro = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_sedg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb where dirb_cod_rubc=8 and
dirb_cod_divc=li_cod_divc ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Si Dividendo no tiene valor devengado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' If (ld_int_deve) = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor del inter�s en la bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set divc_int_plaz = ld_int_plaz - LD_INT_PAGA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = numcred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor en la trabla bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dirb_val_dirb = ld_int_plaz - LD_INT_PAGA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor del mantenimeinto en la dirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_sedg >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dirb_val_dirb = ld_valor_seguro - DIRB_VAL_PAGA
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc = 8; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor del inter�s en la bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set divc_int_plaz = (ld_int_plaz-divc_int_deve) -
LD_INT_PAGA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = numcred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor en la trabla bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dirb_val_dirb = ld_int_plaz - LD_INT_PAGA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor del mantenimeinto en la dirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_sedg >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set dirb_val_dirb = ld_valor_seguro - DIRB_VAL_PAGA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_rubc = 8; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if --estado del dividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valor de las variables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = ld_saldo - ld_cap_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha_ant = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_saldo_cta_pagar(ad_val_tran decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_signo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_est_eacd= 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_cod_tran = 75 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_signo = -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_cod_tran = 76 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select mcpa_val_mcpa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcmcpa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where mcpa_cod_mcpa = al_cod_mcpa;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_val_paga is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_val_paga = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_sal_disp = ld_sal_disp +( ad_val_tran * ll_signo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_val_paga = ld_val_paga - ( ad_val_tran * ll_signo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---let ld_sal_cont = ld_sal_cont +( ad_val_tran * ll_signo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_sal_disp = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_est_eacd= 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_cod_tran = 75 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcmcpa set mcpa_val_mcpa = ld_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcpa_cod_esta = li_est_eacd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcpa_cod_mcpa = al_cod_mcpa;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_cod_tran = 76 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcmcpa set mcpa_cod_pape = al_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcpa_cod_mcpa = al_cod_mcpa;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_verificacion_afcgrup(ai_cod_tgru integer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_clie integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tide char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_ide_clie char(13);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_clie char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_tgru = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_Cod_clie = grup_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and grup_cod_grup = ai_cod_grup;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select clie_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_ide_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = ai_cod_clie ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcaclie set clie_rep_lega = trim(ls_nom_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = li_cod_Clie;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_nomina_empleadooficina(ai_cod_empl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_emof integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if as_ban_tran =''I'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcemof values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (select count(*) from afcemof where emof_cod_empl = ai_cod_empl)= 0
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcemof values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select emof_cod_emof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_emof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcemof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where emof_cod_empl = ai_cod_empl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and emof_ban_prin = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcemof set emof_cod_ofic = ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where emof_cod_empl = ai_cod_empl and emof_cod_emof = li_cod_emof
;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_nomina_eliminaempleadooficina(ai_cod_empl
integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_emof ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (select count(*) from afcemof where emof_cod_empl = ai_cod_empl and
emof_ban_prin = 1)= 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select min(emof_cod_emof)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_emof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcemof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where emof_cod_empl = ai_cod_empl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and emof_ban_prin = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcemof set emof_ban_prin = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where emof_cod_empl = ai_cod_empl and emof_cod_emof = li_cod_emof
;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcaempl set empl_cod_ofic = li_cod_ofic where
empl_cod_empl = ai_cod_empl;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(emof_por_comp)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcemof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where emof_cod_empl = ai_cod_empl;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select min(emof_cod_emof)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_emof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcemof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where emof_cod_empl = ai_cod_empl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and emof_ban_prin = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcemof set emof_ban_prin = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where emof_cod_empl = ai_cod_empl and emof_cod_emof = li_cod_emof
;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ic_mercado( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete bcamoni where moni_cod_dmon in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('call sp_nsocios_1(ai_anio ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('call sp_nclientes_2(ai_anio ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('call sp_ncs_rurales_3(ai_anio ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('call sp_ncs_mujeres_4(ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ncs_mujeres_4( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_fec_ing date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_valor integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_valor1 integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_dia integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(clie_fec_ingr) into ld_fec_ing')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where year(clie_Fec_ingr)= ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(ld_fec_ing);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_fecha = ft_fin_fecha_mes(i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- No. de total clientes y socios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into li_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli not in(2) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_ingr <= ld_fecha ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into li_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli not in(2) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_ingr <= ld_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_ofic = ai_oficina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_valor=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- No. de clientes y socios mujeres ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into li_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = clna_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sexo_cod_sexo = clna_cod_sexo and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli not in(2) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_ingr <= ld_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_sexo = ''F'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into li_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = clna_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sexo_cod_sexo = clna_cod_sexo and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli not in(2) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_fec_ingr <= ld_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_sexo = ''F'' and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_ofic = ai_oficina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_valor1=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Porcentaje de socios y clientes mujeres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_total=(li_valor1*100)/li_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_total = ld_total / 100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_total > 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_vo_pasivas( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete bcamoni where moni_cod_dmon in (5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_tactivos_5 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_tcaptacion_6 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_tcapt_rural_7 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_tcapt_mujer_8 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_tactivos_5( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_inicio char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fin char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE f_inicio date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE f_fin date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= 12')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''1'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''1''and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor > 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_tcaptacion_6( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_aux = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= 12 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon in (''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon in (''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor > 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor_aux = abs(ld_valor);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_tcapt_rural_7( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_capt date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(dpvi_fec_umcd) into lda_fec_capt')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes = Month(lda_fec_capt);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET lda_fecha = ft_fin_fecha(i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- TOTAL DPVI DEPOSITOS A LA VISTA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ft_inicio_movcapta() and
lda_fecha )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ft_inicio_movcapta() and
lda_fecha) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ft_inicio_movcapta() and
lda_fecha)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(mcdv_val_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where x.dpvi_cod_dpvi = mcdv_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv) between ft_inicio_movcapta() and
lda_fecha) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_ofic = ai_oficina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- TOTAL DEPOSITOS A PLAZO FIJO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dpfi_val_dpfi) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = dpfi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hdpf_cod_dpfi = dpfi_cod_dpfi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(hdpf_fec_hdpf) = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dpfi_val_dpfi) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = dpfi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' hdpf_cod_dpfi = dpfi_cod_dpfi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(hdpf_fec_hdpf) = lda_fecha and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_cod_ofic = ai_oficina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor = ld_valor + ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor > 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor_aux = abs(ld_valor);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_tcapt_mujer_8( ai_anio INTEGER )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_capt date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(dpvi_fec_umcd) into lda_fec_capt')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes = Month(lda_fec_capt);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF i = 1 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 2 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF mod(ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 29;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 28;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 3 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 4 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 5 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 6 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 7 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 8 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 9 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 10 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=31;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 11 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia=30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELIF i = 12 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET li_dia = 31; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ls_fecha = i||/||li_dia||/||ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET lda_fecha = DATE(ls_fecha);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VOLUMEN TOTAL DE CAPTACIONES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon in (''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VOLUMEN DE CAPTACIONES ZONA RURAL MUJERES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- TOTAL DPVI DEPOSITOS A LA VISTA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dpvi_sal_cont) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where clie_cod_clie = dpvi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = clna_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_sexo = ''F'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(dpvi_fec_umcd) <= lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- TOTAL DEPOSITOS A PLAZO FIJO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(dpfi_val_dpfi) into ld_valor2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = dpfi_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = clna_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_sexo = ''F'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpfi_fec_inic <= lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor1 = ld_valor1 + ld_valor2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- PORSENTAJE DE CAPTACIONES DE MUJERES POR ZONA RURAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_total = (ld_valor1 * 100)/ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor_aux = abs(ld_total);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_vo_activas( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete bcamoni where moni_cod_dmon in (9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_tcartera_9 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_tcar_rural_10 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_tcart_rur_mu_11(ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_pcart_rural_14 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_tcartera_9( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= 12 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_tcar_rural_10( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_cred date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT MAX(cred_fec_inic) INTO lda_fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(lda_fec_cred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(cred_cap_cred) INTO ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Year(cred_fec_inic) = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre < 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(cred_cap_cred) INTO ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Year(cred_fec_inic) = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre < 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_tcart_rur_mu_11( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_cred date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(cred_fec_inic) into lda_fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(lda_fec_cred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha = ft_fin_fecha_mes(i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Volumen de cr?to total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina= 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Volumen de cr?to zona rural mujeres ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(cred_cap_cred) INTO ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_sexo = ''F'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_inic <= lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre < 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(cred_cap_cred) INTO ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_clie = clie_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clna_cod_sexo = ''F'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_inic <= lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre < 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor1=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Porcentaje de cartera por zona rural mujeres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_total=(ld_valor1*100)/ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_pcart_rural_14( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fecha date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_cred date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(cred_fec_inic) into lda_fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(lda_fec_cred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha = ft_fin_fecha_mes(i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Volumen de cr?to total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Volumen de cr?to zona rural ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(cred_cap_cred) INTO ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_inic <= lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre < 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(cred_cap_cred) INTO ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcasect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_fec_inic <= lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre < 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor1=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Porcentaje de cartera por zona rural ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_total=(ld_valor1*100)/ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_vo_activas1( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete bcamoni where moni_cod_dmon in (12')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_vcreditos_12 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_ncreditos_13 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_ncred_rural_15(ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_nsc_creditos_16 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_vcreditos_12( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_cred date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT MAX(cred_fec_inic) INTO lda_fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(lda_fec_cred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(cred_cap_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(cred_fec_inic) = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre < 3 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(cred_cap_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(cred_fec_inic) = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre < 3 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--if ld_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ncreditos_13( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_cred date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT MAX(cred_fec_inic) INTO lda_fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(lda_fec_cred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(cred_num_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(cred_fec_inic) = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre < 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(cred_num_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(cred_fec_inic) = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ecre < 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ncred_rural_15( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_cred date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT MAX(cred_fec_inic) into lda_fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(lda_fec_cred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT count(cred_num_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(cred_fec_inic) = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sect_cod_tsec = 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT count(cred_num_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(cred_fec_inic) = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sect_cod_tsec = 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_nsc_creditos_16( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_cred date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT max(cred_fec_inic) into lda_fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(lda_fec_cred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT count(cred_cod_clie) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Year(cred_fec_inic) = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli in(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT count(cred_cod_clie) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHERE clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Year(cred_fec_inic) = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre = 0 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tcli in(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INSERT INTO bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ct_instituc( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete bcamoni where moni_cod_dmon in (17')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_nempleados_17 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_nemple_cred_18 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_nempl_area_19(ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_nempl_mujer_20 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_nempleados_17( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_valor integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_ing date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(empl_fec_ingr) into lda_fec_ing')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaempl;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(lda_fec_ing);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into li_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaempl where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Month(empl_fec_ingr) <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(empl_fec_ingr) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_nemple_cred_18( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_valor integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_fec_cred date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(cred_fec_inic) into ld_fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(ld_fec_cred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(distinct cred_cod_clie) into li_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaempl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = empl_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(distinct cred_cod_clie) into li_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaempl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = empl_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_nempl_area_19( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_ing date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_valor integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(empl_fec_ingr) into lda_fec_ing')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaempl;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(lda_fec_ing);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(distinct emdp_cod_empl) into li_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaemdp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where depa_cod_depa = emdp_cod_depa and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' empl_cod_empl = emdp_cod_empl and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Month(empl_fec_ingr) = i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Year(empl_fec_ingr) = ai_anio; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_nempl_mujer_20( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE li_valor integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_ing date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(empl_fec_ingr) into lda_fec_ing')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaempl;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(lda_fec_ing);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into li_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaempl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = clna_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_clie = empl_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_sexo = ''F'' and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Month(empl_fec_ingr) between i and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(empl_fec_ingr) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_productividad( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete bcamoni where moni_cod_dmon in (21')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_prom_cred_21 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_prom_cred_ru_22 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_tactiv_nempl_23 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_tcart_nempl_24 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_tcapt_nempl_25 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_tactf_nempl_26 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_cart_oficial_27 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_prom_cred_21( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_cred date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(cred_fec_inic) into lda_fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where year(cred_fec_inic)= ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(lda_fec_cred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select avg(cred_cap_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select avg(cred_cap_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_prom_cred_ru_22( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_cred date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(cred_fec_inic) into lda_fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where year(cred_fec_inic)= ai_anio ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(lda_fec_cred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select avg(cred_cap_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Month(cred_fec_inic) between i and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select avg(cred_cap_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Month(cred_fec_inic) between i and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_tactiv_nempl_23( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= 12 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Total activos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''1'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''1'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- No. de empleados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(empl_cod_empl) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaempl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = empl_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tide = ''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total=ld_valor/ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_tcart_nempl_24( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= 12 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Total cartera')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- No. de empleados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(empl_cod_empl) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaempl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = empl_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tide = ''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total=ld_valor/ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_tcapt_nempl_25( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= 12 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Total captaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon in (''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon in (''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- No. de empleados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(empl_cod_empl) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaempl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = empl_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tide = ''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total=ld_valor/ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total = abs(ld_total);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_tactf_nempl_26( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= 12 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Total Activos fijos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''18'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''18'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- No. de empleados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(empl_cod_empl) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaempl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = empl_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_tide = ''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total=ld_valor/ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total = abs(ld_total);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_cart_oficial_27( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_cred date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT MAX(cred_fec_inic) INTO lda_fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes=Month(lda_fec_cred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(cred_cap_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where usua_cod_usua = cred_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' empl_cod_empl = usua_cod_empl and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = empl_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre < 3 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(cred_cap_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where usua_cod_usua = cred_cod_usua and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' empl_cod_empl = usua_cod_empl and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = empl_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ecre < 3 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Month(cred_fec_inic) between 1 and i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' Year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_i_financieros( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete bcamoni where moni_cod_dmon in (28')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_cartm_tcart_28 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_tcartm_ru_29 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_cart_ri_ru_31(ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_i_financieros1( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete bcamoni where moni_cod_dmon in (30')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_cart_rie_30 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_cart_1dia_32 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_cart_30dia_33(ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_cart_90dia_34 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_s_liquidez( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete bcamoni where moni_cod_dmon in (35')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_patri_activ_35 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_capt_cred_36 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_disp_capt_37(ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_disp_inv_cap_38 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ef_adminis( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete bcamoni where moni_cod_dmon in (39')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_tasa_activa_39 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_tasa_pasiva_40 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --call sp_marg_finan_41(ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_gastos_activ_42 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' call sp_gastos_capt_43 (ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_tasa_activa_39( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= 12 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select avg(cred_tas_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Month(cred_fec_inic) = i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select avg(cred_tas_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Month(cred_fec_inic) = i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('Year(cred_fec_inic) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_valor <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor=ld_valor/100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_tasa_pasiva_40( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE mes integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_fec_capt date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor = 0; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= 12 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- TASA MEDIA DEPOSITOS A LA VISTA')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT AVG(TADV_TAS_ACTI) INTO ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM BCATCDV')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE TCDV_COD_TCDV = TADV_COD_TCDV AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' TCDV_COD_TCDV = DPVI_COD_TCDV AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' MONTH(DPVI_FEC_UMCD) = i AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' YEAR(DPVI_FEC_UMCD) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT AVG(TADV_TAS_ACTI) INTO ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM BCATCDV')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE TCDV_COD_TCDV = TADV_COD_TCDV AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' TCDV_COD_TCDV = DPVI_COD_TCDV AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' MONTH(DPVI_FEC_UMCD) = i AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' YEAR(DPVI_FEC_UMCD) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ld_valor = 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- TASA MEDIA DEPOSITOS A PLAZO FIJO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT AVG(DPFI_TAS_DPFI) INTO ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM BCADPFI')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE MONTH(DPFI_FEC_INIC) = i AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' YEAR(DPFI_FEC_INIC) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT AVG(DPFI_TAS_DPFI) INTO ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM BCADPFI')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE MONTH(DPFI_FEC_INIC) = i AND')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' YEAR(DPFI_FEC_INIC) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ld_valor1 = 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total = (ld_valor + ld_valor1) / 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total = ld_total / 100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_marg_finan_41( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor2 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_periodo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- PERIODO ANTERIOR DICIEMBRE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio - 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri = 12 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon in (''51''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio - 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri = peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri = 12 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon in (''51''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- COSTOS FINANCIEROS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio - 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri = peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri = 12 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon in (''41''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio - 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri = peri_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri = 12 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon in (''41''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total = abs(ld_valor) - ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= 12 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- INGRESOS FINANCIEROS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sact_sal_debi into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon in (''51''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sact_sal_debi into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon in (''51''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- COSTOS FINANCIEROS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina =0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sact_sal_debi into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon in (''41''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sact_sal_debi into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri = peri_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon in (''41''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total = ld_valor - ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_gastos_activ_42( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor2 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= 12 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Total gastos operacionales')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''45'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''45'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Total Activos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''1'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''1'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total = ld_valor / ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_gastos_capt_43( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor2 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= 12 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Total gastos operacionales')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''45'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''45'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Total Captaciones ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon in (''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon in (''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total = ld_valor / ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total = abs(ld_total);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_act_saldos(li_cod_mcdv integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_sald date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_est_actu = 6 and (li_est_ante is null or li_est_ante=5) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mcdv_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dchv_cod_mcdv = mcdv_cod_mcdv and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dchv_cod_modu in (5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_mcdv =li_cod_mcdv and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dchv_cod_dchv = ai_cod_dchv and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_num_cheq>0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not ll_cod_dpvi is null or ll_cod_dpvi>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(sald_fec_sald)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_sald ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_cod_dpvi =ll_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sald_fec_sald <= lda_fec_esac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by sald_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sald_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_sal_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_cod_dpvi =ll_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sald_fec_sald = lda_fec_sald ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sald_fec_sald ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_sald ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_cod_dpvi =ll_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sald_fec_sald = lda_fec_esac;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_sald is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcasald values(lda_fec_esac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;update bcasald set sald_dispo=ld_sal_ante +
ld_val_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_fec_sald=lda_fec_esac and sald_cod_dpvi
=ll_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadpvi set dpvi_sal_disp=dpvi_sal_disp +
ld_val_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi =ll_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_corrige_bcadivc(numcred integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_seguro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tcse char (3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--actualiza la fecha de vencimiento original')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set divc_fec_venc = divc_fec_auxi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_num_cred = numcred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' not (divc_fec_auxi is null) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv <> 5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--obtiene fecha inicial del cr�dito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cred_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into lda_fecha_ant')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_num_cred = numcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and tamo_cod_tamo = cred_cod_tamo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_cap_ori = ld_saldo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cred_por_segd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_seguro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_num_cred= numcred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_num_cuot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_num_cred = numcred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_Fecha_inic = lda_fecha_ant;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_sedg =0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let LD_INT_PAGA = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = numcred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by divc_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Selecciona el valor del interes devengado del dividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_int_deve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_int_deve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc=li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --verifica si el dividendo est� en estado activo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ediv = 1 or li_ediv = 2 or li_ediv = 3 or li_ediv = 6 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --establece el transcurso de d�as')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = ld_saldo - ld_cap_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_Fecha_inic<=''08/28/2018'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --if lda_Fecha_inic<=''12/31/2016'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- let li_intervalo = lda_fecha - lda_fecha_ant;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_intervalo =30;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_intervalo = lda_fecha - lda_fecha_ant;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_intervalo=0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_plaz=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_seguro=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_plaz = ld_saldo * ld_interes * li_intervalo
/(li_dia_tamo * 100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --seguto prorrateado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ls_cod_tcse =''FP'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_seguro = round((ld_cap_ori *
ld_seguro)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ls_cod_tcse =''FD'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let
ld_valor_seguro=(ld_saldo*ld_seguro*li_intervalo)/30; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_seguro=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_sedg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb where dirb_cod_rubc=8 and
dirb_cod_divc=li_cod_divc ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_sedg = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb set dirb_val_dirb = ld_valor_seguro -
dirb_val_paga where dirb_cod_divc= li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dirb_cod_rubc= 8;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_int_deve ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_int_deve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc where divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_int_deve is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_int_deve = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_sedg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb where dirb_cod_rubc=2 and
dirb_cod_divc=li_cod_divc ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_sedg= 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_int_paga > ld_int_plaz then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb set dirb_val_dirb = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and dirb_cod_rubc= 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb set dirb_val_dirb = ld_int_plaz -
ld_int_paga')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_cod_divc = li_cod_divc and dirb_cod_rubc= 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_int_paga > ld_int_plaz then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc set divc_int_plaz = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_cod_divc = li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadivc set divc_int_plaz = (ld_int_plaz -ld_int_paga) -
ld_int_Deve')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_divc= li_cod_divc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_saldo = ld_saldo - ld_cap_divc; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha_ant = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = ld_saldo - ld_cap_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha_ant = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if --estado del dividendo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --actualiza el valorde las variables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_abrir_ejercicio(ai_anio integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--ejercicio a abrir')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ejer_ani_ejer = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- ejercicio actual')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_ejer_act')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ejer_ani_ejer = ai_anio+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--periodo final del ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri = 13;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--periodo inicial ejercicio actual ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_peri_act')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where peri_cod_ejer = li_ejer_act')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--abro periodos del ejercicio a abrir')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set peri_cie_peri = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri not in (0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- abro periodo de saldos iniciales')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('set peri_cie_peri = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where peri_cod_ejer = li_ejer_act')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and peri_mes_peri in (0);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--borro comporbantes de asientos de cierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcadcom set dcom_may_dcom=0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where dcom_cod_comp in (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select comp_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_peri in (li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--borro comporbantes de asientos de cierre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcacomp set comp_anulado = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where comp_cod_peri in (li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---borro saldos de asiento de cierre y saldos iniciales')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sact_cod_peri in (li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sact_cod_peri >li_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas in (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ejer = li_cod_ejer);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sact_cod_peri <li_peri_act and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ctas in (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ejer = li_ejer_act);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_anulacreditos(li_num_cred integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cod_pape integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tasi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_cod_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_fecha date ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tran_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_num_tran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran = 48;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_cod_anu = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_num_tran = ll_num_tran +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select cred_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_cod_ecre not in (4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_cred = cred_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_ediv in (1) and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_divc not in (select abdv_cod_divc from bcaabdv ) and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred = li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_num_tran = ll_num_tran +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapape values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpap_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpap ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpap_cod_pape = ll_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ls_cod_tasi =C then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_nue_tasi = D;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_nue_tasi = C;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_anu = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_cod_cred >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape = ll_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_cod_dpvi is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_dpvi = 0 ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_cod_dpvi >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamcdv values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaddte values((select max(mcdv_cod_mcdv)
from bcamcdv )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_cod_orec is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_orec = 0 ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_cod_orec > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (select count(*) from bcaorec where orec_cod_orec =
ll_cod_orec and orec_ctr_emis = 0 ) > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcaorec set orec_ctr_emis = 2 where
orec_cod_orec = ll_cod_orec; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcacred set cred_cod_ecre = 4 where cred_num_cred=
ll_cod_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadivc set divc_cod_ediv = 4 where divc_num_cred=
ll_cod_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcatran set tran_num_secu = ll_num_tran where tran_cod_tran =
48;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_carga_rubros_ctascobrar(ai_cod_divc
integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_count')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_Fec_dirb date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_count = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_count')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadirb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dirb_cod_divc = ai_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dirb_cod_rubc = ai_cod_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select max(track_01_cod)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_track01')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from track_01')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where track_01_userid = ai_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and track_01_module in (17')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and date(track_01_datei) = today;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_count is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_count = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_count= 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb values(ai_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- insert into track_02 values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(track_02_cod)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_track02')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from track_02')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where track_02_table =''bcadirb''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and track_02_statment =''Insert''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and track_02_cod_01 = li_cod_track01;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- insert into track_03 values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- insert into track_03 values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- insert into track_03 values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- insert into track_03 values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcadirb set dirb_val_dirb = ad_valor+ ld_valor - ad_valor_ante')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dirb_cod_divc = ai_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dirb_cod_rubc = ai_cod_rubr;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- insert into track_02 values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(track_02_cod)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_track02')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from track_02')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where track_02_table =''bcadirb''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and track_02_statment =''Update''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and track_02_cod_01 = li_cod_track01;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --insert into track_03 values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --insert into track_03 values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- insert into track_03 values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- insert into track_03 values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_detalle_calificacion(al_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_ban = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcdcal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select distinct divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc where divc_cod_ediv not in (4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred = al_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcddic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select divc_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select dirb_val_dirb from bcadirb where dirb_cod_divc = x.divc_cod_divc
and dirb_cod_rubc = 4 ) as mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select dirb_val_dirb from bcadirb where dirb_cod_divc = x.divc_cod_divc
and dirb_cod_rubc = 8 ) as seguro')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(select sum(dirb_val_dirb) from bcadirb where dirb_cod_divc =
x.divc_cod_divc and dirb_cod_rubc not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_cod_ediv in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and divc_num_cred= al_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if al_ban = 2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcdcal where dcal_num_cred = al_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and dcal_fec_calf= ada_fec_proc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcddic where ddic_num_cred = al_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and ddic_fec_calf= ada_fec_proc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_cart_1dia_32( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fecha DATE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha CHAR(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mese_cod_mese ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' not in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha = ft_fin_fecha_mes(i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- TOTAL CARTERA VENCIDA MAYOR A UN D?')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_num_cred = cred_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_fec_calf = lda_fecha and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_dias_venc<31 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_num_cred = cred_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_fec_calf = lda_fecha and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_dias_venc<31 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 or ld_valor is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- CARTERA TOTAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total=ld_valor/ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_cart_30dia_33( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fecha DATE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha CHAR(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mese_cod_mese not in(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha = ft_fin_fecha_mes(i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- TOTAL CARTERA VENCIDA MAYOR A UN D?')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_num_cred = cred_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_fec_calf = lda_fecha and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_dias_venc<90 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_dias_venc>30 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_num_cred = cred_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_fec_calf = lda_fecha and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_dias_venc<90 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_dias_venc>30 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 or ld_valor is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- CARTERA TOTAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total=ld_valor/ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_cart_90dia_34( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fecha DATE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha CHAR(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mese_cod_mese not in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha = ft_fin_fecha_mes(i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- TOTAL CARTERA VENCIDA MAYOR A UN D?')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(dcal_val_dcal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_num_cred = cred_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_fec_calf = lda_fecha and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_dias_venc>90 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(dcal_val_dcal)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_num_cred = cred_num_cred and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_fec_calf = lda_fecha and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' calf_dias_venc>90 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' substr(dcal_divc_ccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 or ld_valor is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- CARTERA TOTAL')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total=ld_valor/ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_cartm_tcart_28( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('while i <= 12 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Cartera morosa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon in (select trim(dccr_ctas_deud) from afcdccr where
dccr_num_para in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon in (select trim(dccr_ctas_deud) from afcdccr where
dccr_num_para in (2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Cartera Total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total=ld_valor/ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_nclientes_2( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT max(clie_fec_ingr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('INTO lda_fec_ing')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where year(clie_fec_ingr) = ai_anio;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET mes = Month(lda_fec_ing);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('WHILE i <= mes ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha = ft_fin_fecha_mes(i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into li_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr ) <= lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into li_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr ) <= lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_ofic = ai_oficina ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_valor > 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=i+1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end while;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_nsocios_1( ai_anio INTEGER ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- VARIABLES DE ALMACENAMIENTO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mese_cod_mese not in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha = ft_fin_fecha_mes(i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into li_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr ) <= lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) into li_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaclie where')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tcli = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('date(clie_fec_ingr ) <= lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_est_clie in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_ofic = ai_oficina ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_valor > 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_capt_cred_36( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mese_cod_mese not in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- TOTAL CAPTACIONES')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''21'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''21'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor = abs(ld_valor);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- TOTAL CR?ITOS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- VALIDACI? PARA DIVISI? POR CERO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total=(ld_valor/ld_valor1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_cart_ri_ru_31( ai_anio INTEGEr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha CHAR(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_dia = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mese_cod_mese not in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha = ft_fin_fecha_mes(i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Cartera en riesgo sector rural')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(dcal_val_dcal) INTO ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv = 3 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(dcal_val_dcal) INTO ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv = 3 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Cartera Total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total=ld_valor/ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_cart_rie_30( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha CHAR(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_dia = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('SELECT mese_cod_mse')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mese_cod_mese not in(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha = ft_fin_fecha_mes(i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- TOTAL CARTERA EN RIESGO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(dcal_val_dcal) INTO ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv = 3 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(dcal_val_dcal) INTO ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv = 3 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Cartera Total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total=ld_valor/ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_disp_capt_37( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mese_cod_mese in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Total fondos disponibles')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sact_sal_debi into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri = i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon = ''11'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sact_sal_debi into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri = i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon = ''11'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Total captacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sact_sal_debi into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri = i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon in (''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sact_sal_debi into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_peri = i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ccon_cod_ccon in (''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total=ld_valor/ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_disp_inv_cap_38( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor2 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET ld_valor2 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mese_cod_mese not in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Fondos disponibles')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''11'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''11'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Inversiones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''13'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''13'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Total captacion')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon in (''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon in (''21''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor2 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor2=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total = (ld_valor + ld_valor1)/ld_valor2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total = abs(ld_total);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_patri_activ_35( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mese_cod_mese not in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Total patrimonio tecnico')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''3'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''3'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Total activos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''1'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''1'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total=ld_valor/ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total = abs(ld_total);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_tcartm_ru_29( ai_anio INTEGER')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE i ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_valor1 decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ld_total decimal(20')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE lda_fec_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DEFINE ls_fecha CHAR(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET i=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('LET li_dia = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mese_cod_mese not in(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha = ft_fin_fecha_mes(i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Cartera morosa rural')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(dcal_val_dcal) INTO ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT sum(dcal_val_dcal) INTO ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE sect_cod_sect = clie_cod_sect and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = cred_cod_clie and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_num_cred = dcal_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_mone = 1 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_cod_ediv = 2 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dcal_fec_calf = lda_fecha and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' cred_cod_ofic = ai_oficina and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sect_cod_tsec = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Cartera Total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_oficina = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select sum(sact_sal_debi) - sum(sact_sal_cred) into ld_valor1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ctas = sact_cod_ctas and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_cod_ejer = ccon_cod_ejer and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_cod_peri = sact_cod_peri and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ejer_ani_ejer = ai_anio and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' peri_mes_peri <= i and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sact_cod_ofic = ai_oficina and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon = ''14'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Validaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor1 = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_valor1=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' LET ld_total=ld_valor/ld_valor1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_total <> 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamoni(moni_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('END PROCEDURE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_brechas_escenario(ada_Fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_banda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_escenario char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_escenario = C;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete afcbrco where brco_esc_brco =ls_escenario and brco_fec_inic =
ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure informix.sp_sig_brechas_liquidez(ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select brec_val_brec ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where brec_fec_inic = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and brec_esc_brec = ls_escenario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_temp = trim(ls_desc) || %;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbrco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where brco_des_brco like ls_temp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and brco_fec_inic = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and brco_esc_brco = ls_escenario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and brco_cod_ineg = li_tipo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_conteo = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrco values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_conteo =1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_conteo >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select brco_cod_brco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbrco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where brco_des_brco like ls_temp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and brco_fec_inic = ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and brco_esc_brco =ls_escenario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and brco_cod_ineg = li_tipo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_banda = 7 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_7 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_banda = 15 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_15 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_banda = 30 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_30 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_banda = 60 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_60 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_banda = 90 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_90 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_banda = 180 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_180 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_banda = 360 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_360 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_banda = 99999 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_99999 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_escenario = E;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete afcbrco where brco_esc_brco =ls_escenario and brco_fec_inic =
ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
informix.sp_sig_brechas_liquidez_esperado(ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select brec_val_brec ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where brec_fec_inic = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and brec_esc_brec = ls_escenario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbrco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where brco_des_brco like trim(ls_desc)|| %')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and brco_fec_inic = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and brco_esc_brco = ls_escenario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and brco_cod_ineg = li_tipo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_conteo = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrco values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_conteo =1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_conteo >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select brco_cod_brco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbrco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where brco_des_brco like trim(ls_desc)|| %')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and brco_fec_inic = ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and brco_esc_brco = ls_escenario')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and brco_cod_ineg = li_tipo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_banda = 7 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_7 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_banda = 15 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_15 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_banda = 30 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_30 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_banda = 60 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_60 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_banda = 90 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_90 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_banda = 180 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_180 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_banda = 360 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_360 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif li_banda = 99999 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbrco set brco_val_99999 = ld_Valor where
brco_cod_brco = li_conteo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_calculo_promedio_mora_cartera(ai_anio
integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_mora ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_i integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_total_mora = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_i = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mese_cod_mese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamese')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mese_cod_mese not in (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dia = day(ft_fin_fecha_mes(li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bprm_ani_bprm = ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bprm_mes_bprm = li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bprm_dia_bprm = li_dia;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_conteo = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bprm_ani_bprm = ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bprm_mes_bprm = li_mes;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select round(((sum(calf_val_venc)+
sum(calf_val_deve))/sum(calf_sal_cred))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where year(calf_fec_calf) = ai_anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and month(calf_fec_calf) = li_mes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_total_mora = ld_total_mora + ld_mora;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_i = li_i +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_i> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_conteo = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbprm values(ld_total_mora /
li_i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcbprm set bprm_Val_mora =
ld_total_mora / li_i')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bprm_ani_bprm = ai_anio and bprm_mes_bprm
= li_mes;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_captaciones_pignorados(ad_val_mini
decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_dpvi = vpcn_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and vpcn_cod_picn = ai_cod_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = ai_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' having sum(vpcn_valor) < ad_val_mini')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor_vpcn = ad_val_mini - ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_sal_disp is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_sal_disp = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_sal_disp>= ld_valor_vpcn then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where vpcn_cod_dpvi = li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and vpcn_cod_picn = ai_cod_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and vpcn_fec_inic = today;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_conteo> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcavpcn set vpcn_valor = vpcn_valor +
ld_valor_vpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where vpcn_cod_dpvi = li_cod_dpvi and vpcn_cod_picn =
ai_cod_picn and vpcn_fec_inic = today;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcavpcn (vpcn_cod_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_brechas_liquidez(ada_Fec_fina date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_Desc char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_cta char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_expre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_inic date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DELETE AFCBREC where brec_fec_inic = ada_fec_fina and brec_esc_brec
=''C'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select band_cod_band')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_band')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcband')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where band_ban_band = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcddic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ddic_fec_calf = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_fec_divc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_cod_ediv = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcddic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ddic_fec_calf = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_fec_divc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_cod_ediv = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_fina between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(minv_val_comp) from afcminv where minv_cod_rubr =
2 and minv_cod_inve = x.inve_cod_inve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_fina between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_fec_crea < ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_edpf in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_fina between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_inve in (select minv_cod_inve from afcminv where
minv_fec_paga >=ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(minv_val_comp) from afcminv where minv_cod_rubr =
2 and minv_cod_inve = x.inve_cod_inve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_crea < ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_edpf in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_fina between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(sum(hdpf_val_dpfi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afchdpf x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf) = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and hdpf_fec_venc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(sum(hdpf_val_inte)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afchdpf x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf) = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and hdpf_fec_venc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_fina = 7 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let as_var_ccon = ''45'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if substr(as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaejer where ejer_ani_ejer = year(ada_Fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = month(ada_fec_fina) - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = month(ada_fec_fina) || ''/01/'' ||
year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas( li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctas = ld_saldo_ctas * li_signo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor= ld_saldo_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_por_gast is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_por_gast = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_Valor * li_por_gast /100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctas= ld_saldo_ctas - ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec VALUES (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_fina = 7 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let as_var_ccon = ''54'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if substr(as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaejer where ejer_ani_ejer = year(ada_Fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = month(ada_fec_fina) - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = month(ada_fec_fina) || ''/01/'' ||
year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas( li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctasi = ld_saldo_ctasi * li_signo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor= ld_saldo_ctasi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_por_ingr is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_por_ingr = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_Valor * li_por_ingr /100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctasi= ld_saldo_ctasi - ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec VALUES (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcdrcp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where drcp_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and drcp_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and drcp_fec_venc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcdrcp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where drcp_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and drcp_cod_rubr = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and drcp_fec_venc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_fina = 7 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let as_var_ccon = ''11'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if substr(as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaejer where ejer_ani_ejer = year(ada_Fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = month(ada_fec_fina) - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = month(ada_fec_fina) || ''/01/'' ||
year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas( li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctasa = ld_saldo_ctasa * li_signo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec VALUES (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_sig_porcion_volatilidad(ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec VALUES (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_brechas_liquidez_esperado(ada_Fec_fina
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_Desc char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_cta char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_expre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_inic date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_concedidos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_por_preca')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DELETE AFCBREC where brec_fec_inic = ada_fec_fina and brec_esc_brec
=''E'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure
sp_sig_calculo_promedio_mora_Cartera(year(ada_fec_fina));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select avg(bprm_val_mora)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_por_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcbprm;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_precancelaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_fec_venc > cred_Fec_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(cred_Fec_pago) = year(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_num_reli = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(cred_fec_inic ) = year(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_Ecre not in (4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_concedidos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_cod_eope = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(cred_fec_inic ) = year(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_Ecre not in (4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_precancelaciones = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_precancelaciones = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_por_preca = li_concedidos / li_precancelaciones;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_creados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where year(dpfi_fec_inic ) = year(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_renovados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where year(dpfi_fec_inic ) = year(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_dpfi in (select rvpf_cod_dpfi from bcarvpf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_renovaciones = li_renovados / li_creados;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select band_cod_band')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_band')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcband')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where band_ban_band = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(ddic_cap_divc) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcddic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ddic_fec_calf = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_fec_divc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_cod_ediv = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_valor - (ld_valor * ld_por_mora) + (ld_valor *
ld_por_preca );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(ddic_int_plaz)+ sum(ddic_int_deve) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcddic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ddic_fec_calf = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_fec_divc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_cod_ediv = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_valor - (ld_valor * ld_por_mora) + (ld_valor *
ld_por_preca );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_fina between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(minv_val_comp) from afcminv where minv_cod_rubr =
2 and minv_cod_inve = x.inve_cod_inve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_fina between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_fec_crea < ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_edpf in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_fina between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_inve in (select minv_cod_inve from afcminv where
minv_fec_paga >=ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(minv_val_comp) from afcminv where minv_cod_rubr =
2 and minv_cod_inve = x.inve_cod_inve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_crea < ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_edpf in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_fina between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(sum(hdpf_val_dpfi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afchdpf x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf) = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and hdpf_fec_venc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor = ld_valor - (ld_renovaciones * ld_valor) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(sum(hdpf_val_inte)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afchdpf x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf) = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and hdpf_fec_venc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor = ld_valor - (ld_renovaciones * ld_valor) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_fina = 7 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let as_var_ccon = ''45'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if substr(as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaejer where ejer_ani_ejer = year(ada_Fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = month(ada_fec_fina) - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = month(ada_fec_fina) || ''/01/'' ||
year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas( li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctas = ld_saldo_ctas * li_signo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor= ld_saldo_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_por_gast is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_por_gast = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_Valor * li_por_gast /100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctas= ld_saldo_ctas - ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec VALUES (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_fina = 7 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let as_var_ccon = ''54'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if substr(as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaejer where ejer_ani_ejer = year(ada_Fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = month(ada_fec_fina) - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = month(ada_fec_fina) || ''/01/'' ||
year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas( li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctasi = ld_saldo_ctasi * li_signo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor= ld_saldo_ctasi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_por_ingr is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_por_ingr = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_Valor * li_por_ingr /100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctasi= ld_saldo_ctasi - ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec VALUES (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcdrcp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where drcp_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and drcp_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and drcp_fec_venc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcdrcp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where drcp_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and drcp_cod_rubr = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and drcp_fec_venc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_fina = 7 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let as_var_ccon = ''11'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if substr(as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaejer where ejer_ani_ejer = year(ada_Fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = month(ada_fec_fina) - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = month(ada_fec_fina) || ''/01/'' ||
year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas( li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctasa = ld_saldo_ctasa * li_signo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec VALUES (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_sig_porcion_volatilidad(ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec VALUES (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_sig_brechas_liquidez_dinamico(ada_Fec_fina
date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_Desc char(50);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_tipo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_cta char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_expre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_inic date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_concedidos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_por_preca')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('DELETE AFCBREC where brec_fec_inic = ada_fec_fina and brec_esc_brec
=''D'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure
sp_sig_calculo_promedio_mora_Cartera(year(ada_fec_fina));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select avg(bprm_val_mora)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_por_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from afcbprm;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_precancelaciones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_fec_venc > cred_Fec_pago')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(cred_Fec_pago) = year(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_num_reli = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(cred_fec_inic ) = year(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_Ecre not in (4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_concedidos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_cod_eope = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and year(cred_fec_inic ) = year(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and cred_cod_Ecre not in (4);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_precancelaciones = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_precancelaciones = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_por_preca = li_concedidos / li_precancelaciones;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_creados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where year(dpfi_fec_inic ) = year(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_renovados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where year(dpfi_fec_inic ) = year(ada_Fec_fina)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_dpfi in (select rvpf_cod_dpfi from bcarvpf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_renovaciones = li_renovados / li_creados;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select band_cod_band')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_band')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcband')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where band_ban_band = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(ddic_cap_divc) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcddic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ddic_fec_calf = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_fec_divc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_cod_ediv = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_valor - (ld_valor * ld_por_mora) + (ld_valor *
ld_por_preca );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum(ddic_int_plaz)+ sum(ddic_int_deve) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcddic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ddic_fec_calf = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_fec_divc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ddic_cod_ediv = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_valor - (ld_valor * ld_por_mora) + (ld_valor *
ld_por_preca );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_fina between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(minv_val_comp) from afcminv where minv_cod_rubr =
2 and minv_cod_inve = x.inve_cod_inve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_edpf in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_fina between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_fec_crea < ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_edpf in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_fina between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_inve in (select minv_cod_inve from afcminv where
minv_fec_paga >=ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl((select sum(minv_val_comp) from afcminv where minv_cod_rubr =
2 and minv_cod_inve = x.inve_cod_inve)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcinve x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_cod_tinv =''3''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_crea < ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_edpf in (3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_fec_fina between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(sum(hdpf_val_dpfi)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afchdpf x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf) = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and hdpf_fec_venc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor = ld_valor - (ld_renovaciones * ld_valor) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(sum(hdpf_val_inte)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afchdpf x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(hdpf_fec_hdpf) = ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and hdpf_fec_venc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor = ld_valor - (ld_renovaciones * ld_valor) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_fina = 7 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let as_var_ccon = ''45'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if substr(as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaejer where ejer_ani_ejer = year(ada_Fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = month(ada_fec_fina) - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = month(ada_fec_fina) || ''/01/'' ||
year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas( li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctas = ld_saldo_ctas * li_signo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor= ld_saldo_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_por_gast is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_por_gast = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_Valor * li_por_gast /100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctas= ld_saldo_ctas - ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec VALUES (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_fina = 7 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let as_var_ccon = ''54'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if substr(as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaejer where ejer_ani_ejer = year(ada_Fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = month(ada_fec_fina) - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = month(ada_fec_fina) || ''/01/'' ||
year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas( li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctasi = ld_saldo_ctasi * li_signo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor= ld_saldo_ctasi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_por_ingr is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_por_ingr = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_Valor * li_por_ingr /100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctasi= ld_saldo_ctasi - ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec VALUES (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcdrcp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where drcp_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and drcp_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and drcp_fec_venc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcdrcp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where drcp_cod_ediv not in (5)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and drcp_cod_rubr = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and drcp_fec_venc between date(ada_fec_fina) + li_ban_inic and
date(ada_fec_fina) + li_ban_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_ban_fina = 7 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let as_var_ccon = ''11'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if substr(as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaejer where ejer_ani_ejer = year(ada_Fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select peri_cod_peri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi where peri_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = month(ada_fec_fina) - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = month(ada_fec_fina) || ''/01/'' ||
year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_comp_sal_ctas( li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into as_var_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo_ctasa = ld_saldo_ctasa * li_signo ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' exit foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec VALUES (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_sig_porcion_volatilidad(ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcbrec VALUES (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.ft_saldo_credito_fecha(ai_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--returning decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_saldo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_descrip')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_dias_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_saldos_creditos(ai_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_saldo = ld_saldo+ ld_interes + ld_mora + ld_otros
+ld_segurod;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' delete afcsacr where sacr_num_cred = li_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsacr values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ahorro_programadocredito(lda_fecha date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_caja char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_vpcn integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--limpia la tabla de anexo de captaciones no cancelados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('---delete from bcaandv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_tcdv = 8;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tran_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcatran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran = 11;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_num_secu = ll_num_secu +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_cod_count = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_pape = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_val_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select rubr_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ll_cta_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcarubr where rubr_cod_rubr =ll_cod_rubr;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_cod_ofic = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_ofi_ante = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_pap_ante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_pape = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(caja_cod_caja)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where caja_cod_usua= li_cod_usua;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select abdv_val_abdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tcdv_cco_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcaabdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_num_cred = divc_num_cred and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_clie = cred_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' divc_cod_divc = abdv_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' tcdv_cod_tcdv = dpvi_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_pape = pape_cod_pape and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_divc = divc_cod_divc and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_tcdv = li_cod_tcdv and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(abdv_fec_abdv) = lda_fecha and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' abdv_cod_rubr = 25 and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' pape_cod_auxi is null')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(mcdv_cod_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_mcdv = ll_cod_mcdv +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor > 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapape values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_count = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_pap_ante = ll_pape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(pape_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_pap_ante ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_Valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = round(ld_Valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_pap_ante > 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_ofi_ante = ll_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcapape set pape_cod_auxi = ll_pap_ante where
pape_cod_pape = li_cod_pape;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamcdv values(ll_cod_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaddte values(ll_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_total = ld_val_total + ld_valor ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_picn = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select vpcn_valor ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_val_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcavpcn where vpcn_cod_dpvi = li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and vpcn_cod_picn = li_cod_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and vpcn_fec_inic = today;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_picn> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_picn = ld_val_picn + ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- update bcavpcn set vpcn_valor = ld_val_picn where
vpcn_cod_dpvi = li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- and vpcn_cod_picn = li_cod_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- and vpcn_fec_inic = today;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- INSERT INTO BCAVPCN (VPCN_COD_PICN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- Values(li_cod_picn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_pap_ante >0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcatran set tran_num_secu= ll_num_secu + 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tran_cod_tran =11;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_insertarubros(li_num_cred integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_cuota')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_rub1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_inic date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_usua integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_rub1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms =1790;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ls_rub1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_rub1=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_rub1 = ls_rub1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_cod_rub1=0then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ll_cod_rub1 > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select rubr_cod_rubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_rub1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcarubr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where rubr_cod_rubr=ll_cod_rub1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_cod_rub1=0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(vprm_val_vprm)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_val1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcavprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where vprm_cod_prms =1791;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ls_val1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val1=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val1=ls_val1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ls_val2 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val2=0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val2=ls_val2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_val1=0 and ld_val2 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--Obtiene el codigo cliente del credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ld_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where cred_num_cred=li_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--obtiene numero de cuotas del credito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select count(divc_cod_divc) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_num_cuota')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcadivc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where divc_num_cred=li_num_cred;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ld_val1>0 and ll_cod_rub1> 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach-- DIVIDENDOS ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_cred = li_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by divc_num_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_cod_tprm =1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_rubr = ld_val1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_rubr = 5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_val_rubr > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- INSERTAR NUEVO RUBRO')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadirb(dirb_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_tmpsact_comp_salb13(ai_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_suma = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create temp table nivel (nivel integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ncue_cod_ejer = ai_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_suma = li_suma + li_longit;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into nivel values (li_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl = li_ctrl + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_cuenta = (select ccon_cod_ccon from bcaccon where ccon_cod_ctas =
ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_longit = length(lc_cuenta);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select digitos into li_suma')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where digitos < li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_cuenta = substr(lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ai_cod_ctas = (select ccon_cod_ctas from bcaccon where
ccon_cod_ccon = lc_cuenta and ccon_cod_ejer = ai_ejer);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('If ai_cod_ctas > 0 or ai_cod_ctas is not null Then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ac_tasi = ''D'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update comp_sal_ctab13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sal_mes_debe = sal_mes_debe+ ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cod_ctas = ai_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ac_tasi = ''C'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update comp_sal_ctab13')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sal_mes_cred = sal_mes_cred+ ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cod_ctas = ai_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('End if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table nivel;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ahorro_cert(lda_fecha date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if lda_fecha <= today then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute PROCEDURE informix.sp_ahorro_programadocredito(lda_fecha ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if lda_fecha = today then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute PROCEDURE informix.sp_ahorro_acumulativo(lda_fecha ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_actualiza_logs_afchomo(ada_fec_actu date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afclhom values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_crea_saldos(li_anio integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_valor = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_dispo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_dpvi_aux = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fecha_aux = ''01/01/1890'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where year (sald_fec_sald) = li_anio ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('and sald_cod_dpvi = ai_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cont= 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' date(mcdv_fec_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_val_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = dpvi_cod_dpvi and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_dpvi = ai_cod_dpvi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' clie_cod_clie = dpvi_cod_clie and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' year(mcdv_fec_mcdv) = li_anio ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_valor is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_dpvi_aux <> li_cod_dpvi then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha_aux = ''01/01/1890'';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dispo = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cont = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fecha <> lda_fecha_aux then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fecha_aux = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_dpvi_aux = li_cod_dpvi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_contador = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_contador = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (li_cod_tran = 8) or (li_cod_tran = 11 ) or (li_cod_tran = 12) or
(li_cod_tran = 13) or (li_cod_tran = 35) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dispo = ld_dispo + ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (li_cod_tran = 6) or (li_cod_tran = 9 ) or (li_cod_tran = 10)
or (li_cod_tran = 25) or (li_cod_tran = 37) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dispo = ld_dispo - ld_valor;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_sal_cont = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cont= 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(sald_fec_sald)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_Fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_cod_dpvi = li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sald_fec_sald< lda_fecha_aux;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sald_conta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_sal_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald where sald_cod_dpvi = li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sald_fec_sald = lda_fecha;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_sal_cont is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_sal_cont = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_conteo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_fec_sald = lda_fecha_aux and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_cod_dpvi = li_cod_dpvi_aux;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_conteo is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_conteo = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_dispo = ld_sal_cont +ld_dispo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_conteo = 0 then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' values (lda_fecha_aux')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcasald')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sald_dispo = ld_dispo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sald_fec_sald = lda_fecha_aux and')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sald_cod_dpvi = li_cod_dpvi_aux;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cont = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_pruebas(li_cod_ani integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_Saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_tcdv <> 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute PROCEDURE informix.sp_arreglo_saldo_dpvi(li_cod_ani')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_pruebas2()')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_Dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_Saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpvi_cod_Dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_tcdv not in (1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute PROCEDURE informix.sp_crea_saldos(2022')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- into li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_dpf_arregla_pagos_parciales(al_cod_dpfi
integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dpfi_ante = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select dpfi_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_dpfi = al_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_rubr = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_Valor = ld_val_dpfi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_intv = li_plz_dpfi / li_num_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_j = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --delete bcapgpf where pgpf_cod_dpfi = li_cod_dpfi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' for ll_i = 1 to li_num_pago+1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_i = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_venc = lda_fec_inic + li_plz_dpfi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_j=1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_rubr = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_val_inte =ld_val_dpfi * ld_tas_dpfi *
li_plz_dpfi /36000;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_valor = ld_val_inte / li_num_pago;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_j = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_venc = lda_fec_inic + li_intv;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (select count(*) from bcapgpf where pgpf_cod_dpfi =
li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_rubr = 1) = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapgpf values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if li_cod_rubr >1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if (select count(*) from bcapgpf where pgpf_cod_dpfi
= li_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pgpf_cod_rubr = 2 and pgpf_num_pgpf = ll_i) = 0
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapgpf values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcapgpf set pgpf_val_pgpf = ld_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where pgpf_cod_dpfi = li_cod_dpfi and pgpf_cod_rubr
= 2 and pgpf_num_pgpf = ll_i;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ll_i > 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = lda_fec_venc;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end for')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dpfi_ante = li_cod_dpfi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure
informix.sp_serviciosadicionales_cambioestadoreclamo(ai_cod_recl integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_erec integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ai_cod_trec is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_erec = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_erec = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update afcdrec set drec_cod_erec = li_cod_erec ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_contabilidad_nuevo_cuc(ai_ani_ejer
integer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ctas integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_nom_ccon char(150);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcaccon ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('FROM ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where trim(ccon_cod) NOT IN ( SELECT TRIM(CCON_COD_CCON) FROM BCACCON
WHERE CCON_COD_EJER in (select ejer_cod_ejer from bcaejer where ejer_ani_ejer =
ai_ani_ejer));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaccon set ccon_cla_ccon = ccon_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ejer in (select ejer_cod_ejer from bcaejer where
ejer_ani_ejer = ai_ani_ejer) ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcaccon set ccon_cla_ccon = SEPS')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where ccon_cod_ejer in (select ejer_cod_ejer from bcaejer where
ejer_ani_ejer = ai_ani_ejer) and trim(ccon_cod_ccon) in (select trim(ccon_cod)
from ccon );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select trim(ccon_nom) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ls_nom_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ccon_cod_ccon = ccon_cod ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ejer = (select ejer_cod_ejer from bcaejer where
ejer_ani_ejer = ai_ani_ejer)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcaccon set ccon_nom_ccon = trim(ls_nom_ccon) where
ccon_cod_ctas= li_cod_ctas;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('CREATE PROCEDURE informix.sp_ahorro_acumulativo(lda_fecha date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_dias')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_caja char(3);define ls_num_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_val_debi decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_num_debi = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_tcdv = 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select tran_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatran ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tran_cod_tran = 37;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_num_secu = ll_num_secu +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_cod_count= 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ll_pape = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_val_total = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select trim(caja_cod_caja)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacaja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where caja_cod_usua = li_cod_usua;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_ingresos = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ld_egresos = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_dpvi_deb = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_eacd in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv =tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and DPVI_COD_tcdv = LI_COD_TCDV')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = didv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and didv_cod_rubr = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and didv_fec_venc <= lda_fecha')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and didv_cod_edid not in (5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(dpvi_sal_disp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ld_ingresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_eacd in (1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_dpvi = li_cod_dpvi_deb;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_des_tcdv = trim( ls_des_tcdv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_ingresos is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_ingresos = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_edid = 5;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_ingresos >0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_ingresos < ld_egresos then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_egresos = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_edid =1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ld_egresos > 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(mcdv_cod_mcdv)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_mcdv = ll_cod_mcdv +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcapape values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_count = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select max(pape_cod_pape)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ll_cod_count')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where pape_cod_tran = 37')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and pape_cod_ofic = li_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamcdv values(ll_cod_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaddte values(ll_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ll_cod_mcdv= ll_cod_mcdv +1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcamcdv values(ll_cod_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcaddte values(ll_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcastmp values(li_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcadpap values (0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcdidv set didv_val_ahor = didv_val_ahor -
ld_egresos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' didv_cod_edid = li_cod_edid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where didv_cod_didv = li_cod_didv and didv_cod_rubr
in ( 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_ingresos = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ld_egresos = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_cod_dpvi_deb = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update bcatran set tran_num_secu= ll_num_secu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where tran_cod_tran =37;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_logaccesoportalweb(al_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afclpwe values(al_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_mayorizar(ai_cod_dcom int')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cie_peri char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_comp date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_reg_tiac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_reg_kard int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tdoc char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ofic=1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- Contabilidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ac_may = ''0'' and ac_sw in (''I''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('return;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select comp_anulado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_anula')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where comp_cod_comp=ai_cod_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_anula = 1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' return ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select coop_rep_empl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_mone = (select vprm_val_vprm from bcavprm where vprm_cod_prms
= 2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_mone is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_mon_cta = (select ccon_cod_mone from bcaccon where ccon_cod_ctas =
ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_ejer = (select ccon_cod_ejer from bcaccon where ccon_cod_ctas
= ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ejer is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_peri is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_comp = (select comp_num_comp from bcacomp where
comp_cod_comp = ai_cod_comp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cie_peri = (select peri_cie_peri from bcaperi where peri_cod_peri
= li_cod_peri);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cie_peri = ''1'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_comp = (select comp_num_comp from bcacomp where
comp_cod_comp = ai_cod_comp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ofic is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (ac_may = ''0'' and ac_sw = ''U'') or (ac_may = ''1'' and ac_sw =
''D'') then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = -1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_signo = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let ad_valor = ad_valor *li_signo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if not exists(select sact_cod_ctas from bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sact_cod_peri = li_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_ctas = ai_cod_ctas and sact_cod_ofic=li_cod_ofic) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into bcasact values (ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if not exists(select sctd_cod_ctas from afcsctd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sctd_cod_peri = li_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_cod_ctas = ai_cod_ctas and sctd_cod_ofic=li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd = lda_fec_comp ) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsctd values (ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ac_cod_tasi = ''D'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sact_sal_debi = sact_sal_debi + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ctas = ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ofic=li_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcsctd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sctd_sal_debe = sctd_sal_debe + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_cod_peri = li_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_cod_ctas = ai_cod_ctas and sctd_cod_ofic=li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd = lda_fec_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif ac_cod_tasi = ''C'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sact_sal_cred = sact_sal_cred + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ctas = ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ofic=li_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcsctd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sctd_sal_cred = sctd_sal_cred + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_cod_peri = li_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_cod_ctas = ai_cod_ctas and sctd_cod_ofic=li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd = lda_fec_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_mone = li_mon_cta then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure sp_tmpsact(ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- execute procedure sp_aux_dcom(ai_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_tmpsact(ai_cod_ctas integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_suma = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create temp table nivel (nivel integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ncue_cod_ejer = ai_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_suma = li_suma + li_longit;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into nivel values (li_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl = li_ctrl + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_cuenta = (select ccon_cod_ccon from bcaccon where ccon_cod_ctas =
ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_longit = length(lc_cuenta);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select coop_rep_empl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select digitos into li_suma')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where digitos < li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_cuenta = substr(lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ai_cod_ctas = (select ccon_cod_ctas from bcaccon where
ccon_cod_ccon = lc_cuenta and ccon_cod_ejer = ai_ejer);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('If ai_cod_ctas > 0 or ai_cod_ctas is not null Then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not exists(select sact_cod_ctas from bcasact ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_ctas = ai_cod_ctas and
sact_cod_peri = ai_peri and sact_cod_ofic=ai_cod_ofic) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into bcasact values(ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if not exists(select sctd_cod_ctas from afcsctd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sctd_cod_peri = ai_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_cod_ctas = ai_cod_ctas and sctd_cod_ofic=ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd = ada_fec_comp ) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsctd values (ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ac_tasi = ''D'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sact_sal_debi = sact_sal_debi + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri=ai_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ctas = ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ofic = ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcsctd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sctd_sal_debe = sctd_sal_debe + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_cod_peri = ai_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sctd_cod_ctas = ai_cod_ctas and sctd_cod_ofic=ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd = ada_fec_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ac_tasi = ''C'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update bcasact')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sact_sal_cred = sact_sal_cred + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sact_cod_peri = ai_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ctas = ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sact_cod_ofic = ai_cod_ofic;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcsctd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sctd_sal_cred = sctd_sal_cred + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_cod_peri = ai_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sctd_cod_ctas = ai_cod_ctas and sctd_cod_ofic=ai_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd = ada_fec_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('End if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table nivel;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(';')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_mayorizar_diario(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_num_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ai_cod_ctas integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ac_cod_tasi char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ad_Valor decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cie_peri char(1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_comp date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_reg_tiac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ll_reg_kard int;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_cod_tdoc char(3);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ls_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lc_cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_ctrl = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_suma = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select coop_rep_empl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into ls_repr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcacoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('delete afcsctd where sctd_fec_sctd between ada_Fec_inic and
ada_Fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_cod_mone = (select vprm_val_vprm from bcavprm where vprm_cod_prms
= 2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('into li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('from bcaejer where ejer_ani_ejer = year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create temp table nivel (nivel integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ncue_cod_ncue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcancue')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ncue_cod_ejer = li_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_suma = li_suma + li_longit;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into nivel values (li_ctrl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_ctrl = li_ctrl + 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select comp_anulado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_anula')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacomp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where comp_cod_comp= dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_anulado = 0 and comp_mayori = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and ccon_cod_ctas = dcom_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and comp_fec_comp between ada_fec_inic and ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if li_cod_ofic is null then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('raise exception -746')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if not exists(select sctd_cod_ctas from afcsctd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('where sctd_cod_peri = li_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_cod_ctas = ai_cod_ctas and sctd_cod_ofic=li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd = lda_fec_comp ) then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afcsctd values (ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if ac_cod_tasi = ''D'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcsctd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sctd_sal_debe = sctd_sal_debe + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_cod_peri = li_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_cod_ctas = ai_cod_ctas and sctd_cod_ofic=li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd = lda_fec_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('elif ac_cod_tasi = ''C'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcsctd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sctd_sal_cred = sctd_sal_cred + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_cod_peri = li_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_cod_ctas = ai_cod_ctas and sctd_cod_ofic=li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd = lda_fec_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lc_cuenta = (select ccon_cod_ccon from bcaccon where ccon_cod_ctas =
ai_cod_ctas);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_longit = length(lc_cuenta);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select digitos into li_suma')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from nivel')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where digitos < li_longit')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 1 desc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lc_cuenta = substr(lc_cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ai_cod_ctas = (select ccon_cod_ctas from bcaccon where
ccon_cod_ccon = lc_cuenta and ccon_cod_ejer = li_cod_ejer);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('If ai_cod_ctas > 0 or ai_cod_ctas is not null Then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if not exists(select sctd_cod_ctas from afcsctd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_cod_peri = li_cod_peri and
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sctd_cod_ctas = ai_cod_ctas and
sctd_cod_ofic=li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd = lda_fec_comp )
then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcsctd values
(ai_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if ac_cod_tasi = ''D'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcsctd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sctd_sal_debe = sctd_sal_debe + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_cod_peri = li_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sctd_cod_ctas = ai_cod_ctas and sctd_cod_ofic=li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd = lda_fec_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' elif ac_cod_tasi = ''C'' then')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update afcsctd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' set sctd_sal_cred = sctd_sal_cred + ad_valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where sctd_cod_peri = li_cod_peri and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' sctd_cod_ctas = ai_cod_ctas and sctd_cod_ofic=li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sctd_fec_sctd = lda_fec_comp;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('End if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drop table nivel;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cartera_actualiza_mora(ai_num_cred integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define lda_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_tas_mora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define li_dias_gracia integer;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('define ld_cap_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let li_dias_gracia = ft_cod_parametros(1728);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadivc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where divc_num_Cred = ai_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_fec_venc < ada_fec_actu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_cred = divc_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and divc_cod_Ediv not in(4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let lda_fec_venc = date(''01/01/1900'');')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' SELECT DIRB_FEC_DIRB')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into lda_fec_venc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb where dirb_cod_divc = li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dirb_cod_rubc = 4;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_venc is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_venc = lda_fec_divi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias_gracia = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if lda_fec_venc = ''01/01/1900'' then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_venc = lda_fec_divi;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_dias_gracia = 0 ; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF ld_cap_divc > 0 THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let li_num_dias = abs(lda_fec_venc -
ada_fec_actu );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_num_dias>0 THEN ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' IF li_num_dias > li_dias_gracia
THEN')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
sp_calculo_mora(li_num_dias - li_dias_gracia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valormora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valormora>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if(select count(*)
from bcadirb where dirb_cod_divc= li_cod_divc and dirb_cod_rubc = 4 )>0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' update
bcadirb set dirb_val_dirb = dirb_val_dirb+ valormora')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert
into bcadirb values(li_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valormora = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ELSE')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valormora = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' END IF;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_cambio_tclie(al_cod_clie integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('if (ai_tcl_ante <>ai_tcl_actu ) then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into afccatc values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_balancesocial_p1(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define codigoIndicador char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define nombreIndicador char(200);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define cumplimiento char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valornumerador decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valorTotal decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define ld_Saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P101''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie in (select dpvi_cod_clie from
bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_tcdv <> 1 and dpvi_cod_eacd = 1)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador +
valordenominador1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select (nvl(sum((SELECT sum(mcdv_val_mcdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi =x.dpvi_cod_dpvi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_fec_mcdv <=ada_fec_fina ))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(sum((SELECT sum(mcdv_val_mcdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi =x.dpvi_cod_dpvi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_fec_mcdv <=ada_fec_fina ) )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P102''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador +
valordenominador1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = valornumerador/valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select coop_val_sbu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacoop;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P103''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clna_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clna_cod_sexo =''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_nat_juri = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador +
valordenominador1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('select bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE bals_ind_seps =''P104''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_sect = clie_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_tsec = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_nat_juri = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador +
valordenominador1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P105''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_auid not in (3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_nat_juri = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador +
valordenominador1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P106''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd =1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_Fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and (select sum(drie_Val_drie) from afcdrie where
drie_cod_ineg = 1 and drie_cod_clie = x.clie_cod_clie)<= coop_val_sbu
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador +
valordenominador1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ofic_cod_ofic <>0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps = ''P107''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P109''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_disc = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_nat_juri = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador +
valordenominador1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select nvl(sum((SELECT sum(mcdv_val_mcdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi =x.dpvi_cod_dpvi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_fec_mcdv <=ada_fec_fina ))')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' nvl(sum((SELECT sum(mcdv_val_mcdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi =x.dpvi_cod_dpvi and ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_cod_tran in (6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' mcdv_fec_mcdv <=ada_fec_fina ) )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P110''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador +
valordenominador1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_num_cred = calf_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clna_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clna_cod_sexo =''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_fec_Calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P111''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_fec_Calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P111''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_Fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_Cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cap_cred<= coop_val_sbu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P112''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_Fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_Cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P112''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_num_cred = calf_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_tsec = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_fec_Calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P113''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_fec_Calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P113''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(distinct cred_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_num_cred = calf_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = sect_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sect_cod_tsec = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_fec_Calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P114''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(distinct cred_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_fec_Calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_num_cred = calf_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P114''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_num_cred = calf_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_fec_Calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_cod_ccre = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P115''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_fec_Calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P115''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(cred_cap_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_Fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_Cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ccre = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P119''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_Fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_Cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P119''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(distinct dpvi_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and (year(ada_fec_fina) -year(clie_Fec_nac))<25')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P120''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(distinct dpvi_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P120''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_balancesocial_p2(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define codigoIndicador char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define nombreIndicador char(200);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define cumplimiento char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valornumerador decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valordenominador ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valorTotal decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define ld_Saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define ls_tipo char(20);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE bals_ind_seps =''P201''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afceduc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE educ_cod_tedu = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_fec_educ between ada_fec_inic and
ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cal_clie = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE bals_ind_seps =''P203''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afceduc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE educ_cod_tedu = 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_fec_educ between ada_fec_inic and
ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr) <= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador +
valordenominador1; ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = empl_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_carg = carg_cod_carg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = clna_cod_Clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and carg_cod_tica in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P204''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clna_cod_sexo =''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = empl_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_carg = carg_cod_carg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = clna_cod_Clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and carg_cod_tica in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P204''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<= ada_fec_fina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P205''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clna_cod_sexo =''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cal_clie = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<= ada_fec_fina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P205''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cal_clie = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<= ada_fec_fina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P207''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and (year(ada_fec_fina) - year(clie_fec_nac))<25')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cal_clie = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<= ada_fec_fina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P207''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cal_clie = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE bals_ind_seps =''P208''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<= ada_fec_fina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_auid not in (3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cal_clie = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<= ada_fec_fina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cal_clie = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---Porcentaje de socios o representantes asistentes a
Asambleas que pertenecen a grupos priorizados')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE bals_ind_seps =''P211''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afceduc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE clie_cod_clie = educ_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_cod_tedu = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_auid not in (3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_fec_educ between ada_fec_inic and
ada_fec_fina ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afceduc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE clie_cod_clie = educ_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_cod_tedu = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_fec_educ between ada_fec_inic and
ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or valordenominador = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valorTotal = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ----Porcentaje de representantes que participan en
elecciones (por agencia)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE bals_ind_seps =''P202''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<= ada_fec_fina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = educ_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_cod_tedu = 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_fec_educ between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_auid not in (3)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cal_clie = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<= ada_fec_fina ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cal_clie = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_ofic= ofic_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_ofic = li_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---- Porcentaje de vocales procedentes de zonas de influencia')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE bals_ind_seps =''P202''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = empl_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_carg = carg_cod_carg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clna_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and carg_cod_tica in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clna_cod_sexo =''M''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ciud_cod_ciud = sect_cod_ciud and sect_cod_sect
= x.clie_cod_sect)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<= ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = empl_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_carg = carg_cod_carg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and carg_cod_tica in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_sect = li_cod_Sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_balancesocial_p3(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define codigoIndicador char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define nombreIndicador char(200);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define cumplimiento char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valorTotal decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define ld_Saldo decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define cuenta char(15);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define nombrecuenta char(100);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define expresado')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define lda_fec_inic date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define ls_campo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let moneda = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select ejer_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaejer where ejer_ani_ejer = year(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select peri_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_peri')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaperi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where peri_cod_ejer = ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and peri_mes_peri = month(ada_fec_fina);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = date(month(ada_fec_fina) || /01/||
year(ada_fec_fina));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P301 Porcentaje de capital en relación al
patrimonio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bals_ind_seps =''P301''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
sp_contabilidad_saldo_diario(ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = valornumerador *-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure sp_contabilidad_saldo_diario(ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador *-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --P302 Reservas de cada socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bals_ind_seps =''P302''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bals_ind_seps =''P302''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador1 +
valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
informix.sp_contabilidad_saldo_diario(ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valornumerador= valornumerador*-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or valordenominador = 0 then
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ----')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --P303 Capital social por socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bals_ind_seps =''P303''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador1 +
valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
informix.sp_contabilidad_saldo_diario(ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valornumerador= valornumerador*-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or valordenominador = 0 then
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ------- P304 Fondo irrepartible de reserva legal por
socio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bals_ind_seps =''P304''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador1 +
valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
informix.sp_contabilidad_saldo_diario(ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valornumerador= valornumerador*-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or valordenominador = 0 then
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --- P305 Porcentaje del presupuesto anual destinado a
balance social')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P306 Porcentaje de gastos administrativos en
relación al gasto total')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bals_ind_seps =''P306''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
informix.sp_contabilidad_saldo_diario(ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valornumerador= valornumerador*-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
informix.sp_contabilidad_saldo_diario(ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valornumerador= valornumerador*-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or valordenominador = 0 then
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --P309 Porcentaje de fondeo proveniente de socios en
relación al total de fondeo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bals_ind_seps =''P309''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
informix.sp_contabilidad_saldo_diario(ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valornumerador= valornumerador*-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
informix.sp_contabilidad_saldo_diario(ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valordenominador= valordenominador*-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or valordenominador = 0 then
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador + valornumerador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --P310 Porcentaje de pasivos en relación al
patrimonio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bals_ind_seps =''P310''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
informix.sp_contabilidad_saldo_diario(ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valornumerador= valornumerador*-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
informix.sp_contabilidad_saldo_diario(ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('let valordenominador= valordenominador*-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or valordenominador = 0 then
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ----P311 Mantiene actualizada la normativa y procedimientos de
prevención de lavado de activos relacionada con la procedencia de fondos ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --P312 Porcentaje de socios con el mÃnimo de certificados de
aportación')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bals_ind_seps =''P312''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador1 +
valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
informix.sp_contabilidad_saldo_diario(ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador= valornumerador*-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or valordenominador = 0 then
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---- cambiar valor minimo segun estatu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = valornumerador / valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_Fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or valordenominador = 0 then
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --- P313 Porcentaje de socios con participación superior al
5% del capital social')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bals_ind_seps =''P313''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador1 +
valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' execute procedure
informix.sp_contabilidad_saldo_diario(ejercicio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into cuenta')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador= valornumerador*-1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = valornumerador *5/100;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcadpvi x')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and sp_valor_dpvi_fecha (ada_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P307 Promedio de transacciones por periodo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador1 +
valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bals_ind_seps =''P307''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador1 +
valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran = 8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran = 9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_cod_ccre = ccre_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_Fec_inic between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_cod_edpf not in (6) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_Fec_inic between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' order by 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P308 Promedio de tasas activas y pasivas por rangos
de valor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador1 +
valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where bals_ind_seps =''P308''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(clie_fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_fec_cier>ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador1 +
valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_campo1= ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct tadv_tas_acti ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatadv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where tcdv_cod_tcdv = tadv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and tcdv_cod_tcdv <> 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and rbal_val_maxi between tadv_mon_inic and
tadv_mon_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and rbal_val_mini between tadv_mon_inic and
tadv_mon_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador1 <> valornumerador and ls_campo <>
ls_campo1 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let ls_campo1= ls_campo;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = valornumerador ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct dpfi_tas_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_Cod_edpf not in (6)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_Fec_inic between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_val_dpfi between rbal_val_mini and
rbal_val_maxi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select distinct cred_tas_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_Fec_inic between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cap_cred between rbal_val_mini and
rbal_val_mini')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end foreach')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_balancesocial_p4(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define codigoIndicador char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define nombreIndicador char(200);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define cumplimiento char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valorTotal decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- P406 Transacciones realizadas por personas
vulnerables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P406''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and (year(ada_fec_fina) - year(clie_fec_nac))>=65')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P406''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and (year(ada_fec_fina) - year(clie_fec_nac))<18')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcatcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = tcdv_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P406''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_disc = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador2 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador2 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = valornumerador + valornumerador1
+ valornumerador2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P407 Operaciones de crédito concedidas a personas
vulnerables')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P407''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and (year(ada_fec_fina) - year(clie_fec_nac))>=65')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_fec_inic between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and (year(ada_fec_fina) - year(clie_fec_nac))<18')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_fec_inic between ada_fec_inic and
ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where clie_cod_clie = cred_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre not in (4)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_disc = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_fec_inic between ada_fec_inic and
ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador2 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador2 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = valornumerador + valornumerador1
+ valornumerador2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P416 Reuniones realizadas anualmente por los
miembros del CAD')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(distinct educ_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afceduc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE bals_ind_seps =''P416''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_cod_tedu = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_fec_educ between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P417 Reuniones realizadas anualmente por los
miembros del CV')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(distinct educ_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afceduc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE bals_ind_seps =''P417''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_cod_tedu = 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_fec_educ between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P418 Asambleas generales realizadas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(distinct educ_fec_educ)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afceduc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE bals_ind_seps =''P418''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_cod_tedu = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_fec_educ between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --P419 Porcentaje de socios o representantes que
participan en las asambleas generales')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(distinct educ_fec_educ)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afceduc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE bals_ind_seps =''P419''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_cod_tedu = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_fec_educ between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE date(clie_Fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cal_clie = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or valordenominador = 0
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --P420 Porcentaje de los miembros del CAD que
participan en reuniones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(distinct educ_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afceduc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE bals_ind_seps =''P420''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_cod_tedu = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_fec_educ between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE date(clie_Fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = empl_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_carg = carg_cod_carg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and carg_cod_tica = 7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_fec_ingr < ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_Fec_sali is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE date(clie_Fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = empl_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_carg = carg_cod_carg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and carg_cod_tica = 7')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_fec_ingr < ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_Fec_sali >ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador +
valordenominador1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or valordenominador = 0
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valortotal = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valortotal =
valornumerador/valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P421 Porcentaje de los miembros del CV que
participan en reuniones')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(distinct educ_cod_clie)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM afceduc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE bals_ind_seps =''P421''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_cod_tedu = 5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and educ_fec_educ between ada_fec_inic and
ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE date(clie_Fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = empl_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_carg = carg_cod_carg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and carg_cod_tica = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_fec_ingr < ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_Fec_sali is null;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' FROM bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' WHERE date(clie_Fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = empl_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_cod_carg = carg_cod_carg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and carg_cod_tica = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_fec_ingr < ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and empl_Fec_sali >ada_fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = valordenominador +
valordenominador1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or valordenominador = 0
then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador = 1 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --- P428 Base de datos de funcionarios de la
entidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create procedure informix.sp_balancesocial_p6(ada_fec_inic date ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define codigoIndicador char(10);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define nombreIndicador char(200);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define cumplimiento char(2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valornumerador5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define valorTotal decimal(15')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' define lda_fec_inic date;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P615 Socios que utilizan canales electrónicos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasoci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and soci_fec_ing<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and soci_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P615''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1 group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' -- P616 Transacciones por canales electrónicos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasoci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and soci_fec_ing<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and soci_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P616''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_caja = caja_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and caja_cod_usua = vprm_Val_vprm')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and vprm_cod_prms = 7001')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P617 Visitas a la página web de la entidad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcasoci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and soci_fec_ing<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and soci_cod_clie = clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P617''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv = 1 group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P619 Variaci�n cartera productivo-comercial')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_Cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_FEc_calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_cod_ccre = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P619'' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = 12/31/|| year(ada_fec_fina) - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_FEc_calf =lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_cod_ccre = 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or valordenominador = 0 then
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valortotal = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador =0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valortotal = valornumerador/valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P620 Variaci�n cartera consumo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_Cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_FEc_calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_cod_ccre = 2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P620'' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = 12/31/|| year(ada_fec_fina) - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_FEc_calf =lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_cod_ccre = 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or
valordenominador = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valortotal = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador =0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valortotal = valornumerador/valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P621 Variaci�n cartera educativo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_Cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_FEc_calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_cod_ccre = 9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P621'' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = 12/31/|| year(ada_fec_fina) - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_FEc_calf =lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_cod_ccre = 9;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or
valordenominador = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valortotal = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador =0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valortotal = valornumerador/valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P622 Variaci�n cartera vivienda')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_Cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_FEc_calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_cod_ccre = 3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P622'' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = 12/31/|| year(ada_fec_fina) - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_FEc_calf =lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_cod_ccre = 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or
valordenominador = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valortotal = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador =0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valortotal = valornumerador/valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P623 Variaci�n cartera microcredito')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_Cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_FEc_calf =ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_cod_ccre = 4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P623'' group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let lda_fec_inic = 12/31/|| year(ada_fec_fina) - 1;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select sum(calf_sal_cred)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valordenominador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacalf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where calf_FEc_calf =lda_fec_inic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and calf_cod_ccre = 3;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valordenominador is null or
valordenominador = 0 then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valortotal = 0;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valordenominador =0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' else')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valortotal = valornumerador/valordenominador;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P625 Transacciones realizadas en corresponsales
solidarios')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcaclie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where date(clie_Fec_ingr)<=ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and clie_cod_clie = dpvi_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ban_bals = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P625''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_eacd = 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> 1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_caja = caja_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and caja_des_caja like ''FACILITO%''')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_dpvi = dpvi_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina
group by 2;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P628 Transacciones con costo (tarifa diferenciada)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bals_ban_bals = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P628'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadirb ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dirb_fec_dirb between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dirb_cod_rubc in (7);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ---P629 Transacciones con costo (tarifa cero)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into li_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcbals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' bals_ban_bals = 0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and bals_ind_seps =''P629'' ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpvi_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpvi_cod_tcdv <> ft_cod_parametros(1301);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcadpfi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where dpfi_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and dpfi_cod_edpf not in (6);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador3')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from afcinve ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where inve_fec_inic between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and inve_cod_edpf not in (6);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador4')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran = 8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi
where dpvi_cod_tcdv <> ft_cod_parametros(1301));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador5')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran = 11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape in (select mban_cod_pape from bcamban)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape not in (select trtr_cod_refe from
afctrtr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi
where dpvi_cod_tcdv <> ft_cod_parametros(1301));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador6')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran = 9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi
where dpvi_cod_tcdv <> ft_cod_parametros(1301));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador7 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran = 10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape in (select mban_cod_pape from bcamban)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_pape not in (select trtr_cod_refe from
afctrtr)')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi
where dpvi_cod_tcdv <> ft_cod_parametros(1301));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador8')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran = 37')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi
where dpvi_cod_tcdv <> ft_cod_parametros(1301));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador9')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcamcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where mcdv_fec_mcdv between ada_fec_inic and ada_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_tran= 25')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and mcdv_cod_dpvi in (select dpvi_cod_dpvi from bcadpvi
where dpvi_cod_tcdv <> ft_cod_parametros(1301));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador10')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcapape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where pape_cod_tran = 21')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and date(pape_Fec_pape) between ada_fec_fina and
ada_Fec_fina;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' select count(*) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' into valornumerador11')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' from bcacred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' where cred_fec_inic between ada_fec_fina and ada_Fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' and cred_cod_ecre <> 4;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador1 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador1 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador2 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador2 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador3 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador3 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador4 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador4 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador5 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador5 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador6 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador6 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador7 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador7 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador8 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador8 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador9 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador9 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador10 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador10 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' if valornumerador11 is null then ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador11 = 0 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' let valornumerador =
valornumerador+valornumerador1+valornumerador2+valornumerador3+valornumerador4+valo
rnumerador5+valornumerador6+valornumerador7+valornumerador8+valornumerador9+valornu
merador10+valornumerador11;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' insert into afcdbal values(0')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --P714 Porcentaje de cartera destinada a finanzas
verdes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES(' --P715 Socios beneficiados por finanzas verdes')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('end procedure;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cta_provision (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_id () to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_name_pc (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cod_soci (integer) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_activa_socio (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_prm_pfijo (integer) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_infor_pfijo () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_prm_conta (integer) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_r_bal_compro (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_nivel_cta (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_r_situa_gene (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_r_esta_finan (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_r_esta_finan_r (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cotiza_inte (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_saldo_promedio (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_borrar (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_r_anx_provision (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_saldop_cliente (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_patrocinio (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_prms_carteras () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_r_cta_provision (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_val_prm_conta (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_opera_hora (date) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sprom_cuenta (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_temdepe (char) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_scnat_actividad (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_gscnj_actividad (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_gscnat_depe () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_gscnat_sectort () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_gscnj_sectordo (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_pcr (integer) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_movi_hora (date) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_movi_hora_caja (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_movi_clie (date) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_movi_clie_caja (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_estado_depos (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_estado_prov (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_saldo_cuenta_c (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_mov_ctas_cons (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_r_b_compro_cage (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_r_b_pergan_cage (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_r_s_gene_cage (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_r_saldo_cta_c (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_nexo (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cv_cgarantes (date) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_re_cgarantes (date) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_saldos_ctas_c (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_datos_consolidacion (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_prms_variables () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_r_b_compro_c (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_r_bal_pergan_c (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_r_situa_gene_c (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_prms_cart () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_saldo_indiv_cta (varchar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_liquidez_estruc (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_scnat_depe () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_scnat_sectort () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_scnj_sectordo (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cajasaper (date) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_prm_globales_1 () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_prms_cartera () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cart_acti (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cart_ramg (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_divid_vencvin () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_cod_ctas (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_calcula_base_exponente (decimal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_prms_registro () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_prms_imp_seg () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_prm_inversiones (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_validanumgarantias (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_saldos_ctas (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sal_pro_mensual (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_calc_sald_promsocio (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_p_mayori (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_r_saldo_cta (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_provision_amazonas (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_saldo_divipagados (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_corrige_dobleconta (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_papeleta (integer) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_saldos_captaciones (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.arreglocompro (integer) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_comp_sal_ctas (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_rubro_cartera (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_inicio_fecha_mes (date) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_inicio_movcapta () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsr04 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsr03 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_calculo_fecha (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.retiro_socios () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.primernombres (char) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_fecha_mes_anterior (date) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_fin_fecha_mes (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsf11 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_prms_dinamico (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsc04 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_numvalor_dpvi_fecha (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_numregis_dpvi_fecha (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_num_cliente (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_tasa_efectiva (decimal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_bcecte (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_calculo_edad (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_corrigue_otrosingresos (integer)
to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_calificacion_anterior (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsi02 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_prms_dinamico_inve (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_dpvi_provision (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_uaf_limiteriesgos (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_balance_evolucion_patrominio
(integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_saldo_credito_fecha (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_valor_credito_pago_fecha (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_max_fecha_transaccion (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_consolidado_magisterio
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_bcesoc (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_actualiza_cliente_peps (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_mov_cuentas (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_valida_fecha_primer_pago
(integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_llena_espacios (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_quita_ceros (char) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_valor_dpvi_fecha (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_nombre_garante (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.reportes_anexomayor (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.reportes_anexomayor_totales (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_numero_telefonos_socios (integer)
to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_seps_captaciones (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_cuenta_cartera (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_calf_promedio_creditos (integer)
to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_indice_clases (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_cartera_valor_credito_anterior
(integer) to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_nombre_oficial (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_captaciones_r_polizasvida (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsc03 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_seps_cartera (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_presupuesto_valores_presupuesto
(integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_calculo_mora (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_calculo_segdesgra (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_captaciones_reporte_pignorados
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_bcepfi (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.reportes_uaf (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_activos_cod_generacion (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsi01 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_divid_venc () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_saldos_creditos (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_consulta_garantes (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cambiofechas_dividendos (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_cuenta_obligacion (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_amortizacion_obligaciones (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_bceinsumos_clientes (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_bceinsumos_transacciones (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_saldo_cuenta (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_saldo_saldocapital (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_numero_telefonos (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_divid_venc_movil (char) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_inicio_caja (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_crea_papeleta (datetime')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_crea_bcadeef (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_crea_bcadefe (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.f_verifica_cuentas (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_cod_parametros (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_gestion_clase (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_captacion_producto_genero
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_concedidos_usuario
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_concedidos_plazo
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_concedidos_actividad
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_concedidos_garantia
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_concedidos_linea
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_concedidos_oficial
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cart_rang (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function
informix.sp_sig_cartera_gestion_operacion_recuperacion (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_gestion_actividad
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_nombre_dependencia_nivel5
(integer) to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_captacion_producto_ocupacion
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_gestion_cuotasvencidas
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_gestion_sector (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_gestion_linea (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_gestion_edad (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_captacion_producto_edad
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_clientegenero (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_clienteestado (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sri_formulario103 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_contabilidad_liquidez_seps
(integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_nombre_clasecredito (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_nombre_situacioncredito (integer)
to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_divid_solinkob () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_op_transaccion (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_cod_identificacion (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_cartera_condicion_solicitud
(integer) to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_calc_sald_prom (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_contabilidad_flujodecaja
(integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_balance_flujoefectivo (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_desplazarfecha (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_valor_dividendo (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function
informix.sp_cartera_reporte_emergencia_sanitaria1 () to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function
informix.sp_cartera_reporte_emergencia_sanitaria () to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_tasa_dpvi (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_seps_plantilla (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_lsms_dividendos_vencidos_garantes
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_lsms_dividendos_vencidos (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_ctaspagar (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_gestion_cobranza (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_lsms_dividendosporvencer (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function
informix.sp_limites_concetracion_cartera_vinculados (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_sig_mensaje_limites_riegos (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_limites_depositos100 (date) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_nombre_actividad_nivel4_cred
(char) to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_gestion_garantia
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_gestion_genero (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_administrada_linea
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_cartera_concedidos_zona
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_clienteactividad (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_clienteautoidentificacion
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_clienteprofesion (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_porcion_volatilidad (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_historial_crediticio
(integer) to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_nombres_garantes (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_captaciones_ingresosegresos
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cosede_beneficiarios (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_limites_concentracion_cartera
(integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_limites_concentracion_depositos
(integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_reporte_garantias (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_indicemorosidad (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_nivelactividadeconomica (char) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_mascara (char) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sri_formulario104 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_saldo_bancos (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_reporte_notificaciones
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_quita_signo_numero (char) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_reporte_seguro_desgravamen
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_prm_globales (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_nombre_oficina (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_reporte_ahorro_cert (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_reporte_recuperacion
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_conafis (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_historico_dpfi () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_codigo_actividadeconomica_nivel5
(integer) to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_uaf_matrizlavadoactivos (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_contabilidad_reporte_saldo_cta
(char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_proceso_cartera_comisiones
(integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_reporte_productoscoactivas (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_vipg_insumos_clientes (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_vipg_insumo_transacciones (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_vipg_insumo_empleados (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.ft_asu_parametros (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_update_bcacoop (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_opcion_perfil (char) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_permiso_usuario (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_genera_tdoc (char) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_veri_digitos (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_veri_digitos_u (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_update_perm_usu (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_veri_niveles (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_genera_permiso (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_perfil_usuario (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_veri_bcabene (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ins_pfijo (integer) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_update_perf_usu (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_del_pfijo (integer) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_usua_passwd (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_borra_bcaopen (char) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_aux_dcom (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_p_cierre_ejer (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ins_mcdv (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_subida_ctas () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_comp_c () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_comp_d () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_upd_tcdv (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_genera_prmcont (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_crea_sini (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_upd_picn (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_del_vpcn (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_upd_dpvi (integer) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_transac_usuario (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_actualiza_prm (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_actualiza_tdoc (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ins_tinv (char) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.temporal () to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tmpcsac_2 (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tmpcsac_1 (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tmpcsac (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tmpsacp_2 (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tmpsacp_1 (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tmpsacp (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_calcula_saldos_dpvi (date) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ins_vpcn (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_upd_vpcn (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_genera_sal_cons (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_mayorizar_c (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tmpsact_c (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_sal_cta_mes_c (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_recalculo_sald_dpvi (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_upd_sdct (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_update_tr_usu (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_nclientes_2 (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ncs_rurales_3 (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ins_acem (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_upd_acem (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_upd_aeac (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ins_defec (integer) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_devengado (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_reclasificacion (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_actu_ingr_conf (decimal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_calc_num_cost (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_plazofijo_automaticos (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_upd_tadv (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_sal_cta_mes (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_calc_sald_dpvi (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_historial_posteo (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_act_sal_libr (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ins_gara (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_del_gara (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_actualiza_logestado (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_historial_inactivacion (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tmpsact_comp_sal (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_actualiza_anexo (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_detalle_beneficio_social
(integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_act_sal_disp (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_historico_bcadirb (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_corrige_modificacion (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure
informix.sp_procedure_actualiza_telefono_principal (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_actualiza_ingresos_egresos
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_saldo_cta_cobrar (decimal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_upd_tasa (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_reparametrizar (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_cambio_tvinc (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_actualiza_ingresos_egresos_act
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_actualiza_mora (date) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_genera_periodos (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tabla_pagos_deposito_vista
(integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_recalculointerescredito
(integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_recalculointeres (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_saldo_cta_pagar (decimal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_verificacion_afcgrup (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_nomina_empleadooficina (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_nomina_eliminaempleadooficina
(integer) to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ic_mercado (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ncs_mujeres_4 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_vo_pasivas (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tactivos_5 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tcaptacion_6 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tcapt_rural_7 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tcapt_mujer_8 (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_vo_activas (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tcartera_9 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tcar_rural_10 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tcart_rur_mu_11 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_pcart_rural_14 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_vo_activas1 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_vcreditos_12 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ncreditos_13 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ncred_rural_15 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_nsc_creditos_16 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ct_instituc (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_nempleados_17 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_nemple_cred_18 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_nempl_area_19 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_nempl_mujer_20 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_productividad (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_prom_cred_21 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_prom_cred_ru_22 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tactiv_nempl_23 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tcart_nempl_24 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tcapt_nempl_25 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tactf_nempl_26 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_cart_oficial_27 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_i_financieros (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_i_financieros1 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_s_liquidez (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ef_adminis (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tasa_activa_39 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tasa_pasiva_40 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_marg_finan_41 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_gastos_activ_42 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_gastos_capt_43 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_act_saldos (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_corrige_bcadivc (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_abrir_ejercicio (integer) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_anulacreditos (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_cartera_carga_rubros_ctascobrar
(integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_detalle_calificacion (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_cart_1dia_32 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_cart_30dia_33 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_cart_90dia_34 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_cartm_tcart_28 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_nclientes_2 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_nsocios_1 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_capt_cred_36 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_cart_ri_ru_31 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_cart_rie_30 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_disp_capt_37 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_disp_inv_cap_38 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_patri_activ_35 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tcartm_ru_29 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_sig_brechas_escenario (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_sig_calculo_promedio_mora_cartera
(integer) to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_captaciones_pignorados (decimal')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_sig_brechas_liquidez (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_sig_brechas_liquidez_esperado
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_sig_brechas_liquidez_dinamico
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.ft_saldo_credito_fecha (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ahorro_programadocredito (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_insertarubros (integer) to public
as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tmpsact_comp_salb13 (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ahorro_cert (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_creditos_concedidos
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_contabilidad_saldo_diario
(integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sig_liquidezestructural (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsl01_fechas (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_balancediario (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsl01 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_valor_confirmar (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_malareclasificacionddic (date) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_mov_ctas (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cuentas_volatilidad (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_captaciones_reportedetalladoanexo
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_actualiza_logs_afchomo (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_crea_saldos (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_pruebas (integer) to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_pruebas2 () to public as
informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_dpf_arregla_pagos_parciales
(integer) to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_providencias_judiciales_vipg
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_srirtf (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure
informix.sp_serviciosadicionales_cambioestadoreclamo (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsci01 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_reporte_creditos_anulados
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_contabilidad_nuevo_cuc (integer)
to public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_ahorro_acumulativo (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_buror06 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_logaccesoportalweb (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_amortizacion_credito (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_malareclasificacion (date) to
public as informix;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_saldos_dpvi_d01 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_bcetin (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_mayorizar (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_tmpsact (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_mayorizar_diario (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_reporte_solicitudes
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsb13 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsb11_12 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsb11 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cuentas_inmobilizadas (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_scnj_actividad (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_captaciones_spi_cuentas (char')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_buro_general (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_cartera_actualiza_mora (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function
informix.sp_cartera_reporte_creditos_tramitejudicial (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_veri_bcaclie (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_cambio_tclie (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_roles_reporte_anexo_sin_detalle
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function
informix.sp_captaciones_reportes_movimientocaja (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_dpvi_maxfecha (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function
informix.sp_cartera_reporte_consolidado_concedido_recuperado (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_bce_plab01 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_crea_papeleta_dpf (datetime')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_crear_detalle_papeleta (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_bcadpfi_renocancauto (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepss01 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_bce02 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_clientes_reporte_clientessocios
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_cartera_cambio_fechas_pagos
(integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_srirtfaho (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_srirtfdpf (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_srirtfcred (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_listas_educacion_financiera
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_listas_representantes_asamblea
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_listas_votacion_representantes
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_listas_reunion_miembros_cad
(date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_listas_reunion_miembros_cv (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsbs01 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_balancesocial_p1 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_balancesocial_p2 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_balancesocial_p3 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_balancesocial_p4 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on procedure informix.sp_balancesocial_p6 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_bce01 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_arreglo_saldo_dpvi (integer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sricrs (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sricrssaldos (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsc01 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsd01 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant execute on function informix.sp_sepsc02 (date')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('revoke usage on language SPL from public ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grant usage on language SPL to public ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create unique index informix.idx_prioridad on informix.bcarubr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(rubr_num_prio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create index informix.in_orec_dpvi on informix.bcamcdv (mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_orec) using btree ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create unique index informix.uc_detalle_fcdi on informix.bcadfcd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(dfcd_cod_fcdi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create unique index informix.idx_ofic_usua on informix.bcaofus ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(ofus_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create unique index informix.idx_nom_esrf on informix.bcaesrf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(esrf_nom_esrf) using btree ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create unique index informix.idx_tiin_descripci on informix')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('.bcatiin (tiin_des_tiin) using btree ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create unique index informix.pbx_unique1 on informix.bcapaca ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(paca_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create unique index informix.idx_bcaclie on informix.bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create unique index informix.idx_clie_icli on informix.bcaicli ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(icli_cod_clie) using btree ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create unique index informix.ix_bcaprdr on informix.bcaprdr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(prdr_ide_prdr) using btree ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create unique index informix.idx_num_for on informix.bcaopag ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(opag_num_for) using btree ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasocr add constraint (foreign key (socr_cod_tgar)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatgar constraint informix.fk_bcatgar_bcasocr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcttar add constraint (foreign key (ttar_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcttar);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcctar add constraint (foreign key (ctar_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcctar);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcstar add constraint (foreign key (star_cod_ttar)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcttar constraint informix.fk_afcttar_afcstar);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcstar add constraint (foreign key (star_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcstar);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatndd add constraint (foreign key (tndd_cod_star)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcstar constraint informix.fk_afcstar_bcatndd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgcob add constraint (foreign key (gcob_cod_star)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcstar constraint informix.fk_afcstar_afcgcob);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afchtso add constraint (foreign key (htso_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afchtso);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afchreq add constraint (foreign key (hreq_est_hreq)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afchere constraint informix.fk_afchere_afchreq);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatndd add constraint (foreign key (tndd_usu_modi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcatndd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcctvc add constraint (foreign key (ctvc_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcctvc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcastmp add constraint (foreign key (stmp_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcastmp_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclie add constraint (foreign key (clie_cod_prof)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcprof constraint informix.fk_afcprof_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatasc add constraint (foreign key (tasc_cod_lcre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcalcre constraint informix.fk_bcalcre_bcatasc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdcam add constraint (foreign key (dcam_cod_deef)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadeef constraint informix.fk_bcadeef_afcdcam);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_tope)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctope constraint informix.fk_afctope_bcacred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcctvc add constraint (foreign key (ctvc_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_afcctvc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdicl add constraint (foreign key (dicl_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_afcdicl_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcddep add constraint (foreign key (ddep_cod_mcdv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamcdv constraint informix.fk_r740_bcamcdv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcalcre add constraint (foreign key (lcre_cod_ccre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccre constraint informix.fk_r749_bcaccre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacfam add constraint (foreign key (cfam_cod_tide)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatide constraint informix.fk_bcacfam_bcatide);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcnutc add constraint (foreign key (nutc_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcaofic_afcnutc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcnutc add constraint (foreign key (nutc_cod_tcli)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcli constraint informix.fk_bcatcli_afcnutc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcamonc add constraint (foreign key (monc_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_referen_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaplcr add constraint (foreign key (plcr_cod_intv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaintv constraint informix.fk_bcaplcr_bcaintv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaplcr add constraint (foreign key (plcr_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_bcaplcr_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagchq add constraint (foreign key (gchq_est_gchq)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaegch constraint informix.fk_referen_bcaecgh);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcamodu add constraint (foreign key (modu_cod_grup)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcagrup constraint informix.fk_bcamodu_bcagrup);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaprms add constraint (foreign key (prms_cod_modu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamodu constraint informix.fk_bcaprms_bcamodu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaopci add constraint (foreign key (opci_cod_menu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamenu constraint informix.fk_bcaopci_bcamenu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaopci add constraint (foreign key (opci_cod_modu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamodu constraint informix.fk_bcaopci_bcamodu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcavprm add constraint (foreign key (vprm_cod_prms)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaprms on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcavprm_bcaprms);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcavprm add constraint (foreign key (vprm_cod_tprm)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatprm constraint informix.fk_bcavprm_bcatprm);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaciud add constraint (foreign key (ciud_cod_prov)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaprov constraint informix.fk_bcaciud_bcaprov);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasect add constraint (foreign key (sect_cod_ciud)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaciud constraint informix.fk_bcasect_bcaciud);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasect add constraint (foreign key (sect_cod_tsec)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatsec constraint informix.fk_bcasect_bcatsec);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaofic add constraint (foreign key (ofic_cod_tofi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatofi constraint informix.fk_bcaofic_bcatofi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaofic add constraint (foreign key (ofic_cod_coop)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacoop constraint informix.fk_bcaofic_bcacoop);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaofic add constraint (foreign key (ofic_cod_ciud)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaciud constraint informix.fk_bcaofic_bcaciud);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaofic add constraint (foreign key (ofic_cod_tman)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatman constraint informix.fk_bcaofic_bcatman);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadepa add constraint (foreign key (depa_cod_dsup)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadepa constraint informix.fk_bcadepa_bcadepa);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclie add constraint (foreign key (clie_cod_tide)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatide constraint informix.fk_bcaclie_bcatide);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclie add constraint (foreign key (clie_cod_sect)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasect constraint informix.fk_bcaclie_bcasect);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclie add constraint (foreign key (clie_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcaclie_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclie add constraint (foreign key (clie_cod_tcli)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcli constraint informix.fk_bcaclie_bcatcli);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclna add constraint (foreign key (clna_cod_eciv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaeciv constraint informix.fk_bcaclna_bcaeciv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclna add constraint (foreign key (clna_cod_sexo)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasexo constraint informix.fk_bcaclna_bcasexo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclna add constraint (foreign key (clna_cod_sect)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasect constraint informix.fk_bcaclna_bcasect);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpvi add constraint (foreign key (dpvi_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcadpvi_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpvi add constraint (foreign key (dpvi_cod_tfir)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfir constraint informix.fk_bcadpvi_bcatfir);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpvi add constraint (foreign key (dpvi_cod_eacd)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaeacd constraint informix.fk_bcadpvi_bcaeacd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpvi add constraint (foreign key (dpvi_cod_tcdv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcdv constraint informix.fk_bcadpvi_bcatcdv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpvi add constraint (foreign key (dpvi_ofi_cier)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcadpvi_bcaofi1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_ccre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccre constraint informix.fk_bcacred_bcaccre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_ecre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaecre constraint informix.fk_bcacred_bcaecre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_tese)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatese constraint informix.fk_bcacred_bcatese);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_bcacred_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_tcre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcre constraint informix.fk_bcacred_bcatcre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_tamo)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatamo constraint informix.fk_bcacred_bcatamo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_dtcr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadtcr constraint informix.fk_bcacred_bcadtcr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_tvin)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatvin constraint informix.fk_bcacred_bcatvin);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_tgar)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatgar constraint informix.fk_bcacred_bcatgar);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_intv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaintv constraint informix.fk_bcacred_bcaintv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_pape)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapape constraint informix.fk_bcacred_bcapape);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcacred_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_ffin)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaffin constraint informix.fk_bcacred_bcaffin);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_lcre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcalcre constraint informix.fk_bcacred_bcalcre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagtia add constraint (foreign key (gtia_cod_cgti)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacgti constraint informix.fk_bcagtia_bcacgti);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagtia add constraint (foreign key (gtia_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcagtia_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcausua add constraint (foreign key (usua_cod_empl)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaempl constraint informix.fk_bcausua_bcaempl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcausua add constraint (foreign key (usua_cod_perf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaperf constraint informix.fk_bcausua_bcaperf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacaja add constraint (foreign key (caja_cod_tcar)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcar constraint informix.fk_bcacaja_bcatcar);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapape add constraint (foreign key (pape_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcapape_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapape add constraint (foreign key (pape_cod_tran)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatran constraint informix.fk_bcapape_bcatran);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatran add constraint (foreign key (tran_cod_tdoc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatdoc constraint informix.fk_bcatran_bcatdoc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapape add constraint (foreign key (pape_cod_ediv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaediv constraint informix.fk_bcapape_bcaediv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacont add constraint (foreign key (cont_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcacont_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacomp add constraint (foreign key (comp_cod_peri)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaperi constraint informix.fk_bcacomp_bcaperi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacomp add constraint (foreign key (comp_cod_tdoc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatdoc constraint informix.fk_bcacomp_bcatdoc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcachqs add constraint (foreign key (chqs_cod_mban)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamban constraint informix.fk_bcachqs_bcamban);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcachqs add constraint (foreign key (chqs_cod_ecba)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaecba constraint informix.fk_bcachq_bcaecba);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcelab add constraint (foreign key (elab_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcelab);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaorec add constraint (foreign key (orec_cod_chqs)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcachqs constraint informix.fk_bcaorec_bcachqs);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaorec add constraint (foreign key (orec_cod_ooem)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaooem constraint informix.fk_bcaorec_bcaooem);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaccom add constraint (foreign key (ccom_cod_mese)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamese constraint informix.fk_bcaccom_bcamese);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcelab add constraint (foreign key (elab_usu_paga)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcelab1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaccom add constraint (foreign key (ccom_cod_tdoc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatdoc constraint informix.fk_bcaccom_bcatdoc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadeef add constraint (foreign key (deef_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_bcadeef_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadeef add constraint (foreign key (deef_cod_modu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamodu constraint informix.fk_bcadeef_bcamodu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadeef add constraint (foreign key (deef_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_bcadeef_bcatasi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapgpf add constraint (foreign key (pgpf_cod_pape)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapape constraint informix.fk_bcapgpf_bcapape);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapgpf add constraint (foreign key (pgpf_cod_edpf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaedpf constraint informix.fk_bcapgpf_bcaedpf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapgpf add constraint (foreign key (pgpf_cod_rubr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcarubr constraint informix.fk_bcapgpf_bcarubr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaejer add constraint (foreign key (ejer_cod_cont)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacont constraint informix.fk_bcaejer_bcacont);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapcom add constraint (foreign key (pcom_cod_cont)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacont constraint informix.fk_bcapcom_bcacont);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacpre add constraint (foreign key (cpre_cod_cont)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacont constraint informix.fk_bcacpre_bcacont);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacpre add constraint (foreign key (cpre_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_bcacpre_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaccon add constraint (foreign key (ccon_cod_tcue)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcue constraint informix.fk_bcaccon_bcatcue);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaccon add constraint (foreign key (ccon_cod_ejer)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaejer constraint informix.fk_bcaccon_bcaejer);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaccon add constraint (foreign key (ccon_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_bcaccon_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaccon add constraint (foreign key (ccon_cod_natu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcanatu constraint informix.fk_bcaccon_bcanatu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaperi add constraint (foreign key (peri_mes_peri)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamese constraint informix.fk_bcaperi_bcamese);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacons add constraint (foreign key (cons_cod_ejer)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaejer constraint informix.fk_bcacons_bcaejer);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcarubr add constraint (foreign key (rubr_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcarubr_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcarubr add constraint (foreign key (rubr_cod_modu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamodu constraint informix.fk_bcarubr_bcamodu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacomi add constraint (foreign key (comi_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcacomi_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatcdv add constraint (foreign key (tcdv_cod_fcin)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcafcin constraint informix.fk_bcatcdv_bcafcin);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatcdv add constraint (foreign key (tcdv_cod_tcap)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcap constraint informix.fk_bcatcdv_bcatcap);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatcdv add constraint (foreign key (tcdv_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_bcatcdv_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatcdv add constraint (foreign key (tcdv_cod_ttpf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcattpf constraint informix.fk_bcatcdv_bcattpf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatcdv add constraint (foreign key (tcdv_cco_acti)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcatcdv_activos);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatcdv add constraint (foreign key (tcdv_cco_prov)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcatcdv_prov);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatcdv add constraint (foreign key (tcdv_cco_gast)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcatcdv_gast);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatcdv add constraint (foreign key (tcdv_cco_inac)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcatcdv_inactiv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatcdv add constraint (foreign key (tcdv_cco_dxcf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcatcdv_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacban add constraint (foreign key (cban_cod_banc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcabanc constraint informix.fk_bcacban_bcabanc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacban add constraint (foreign key (cban_cod_tcba)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcba constraint informix.fk_bcacban_bcatcba);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacban add constraint (foreign key (cban_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcacban_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacban add constraint (foreign key (cban_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_bcacban_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacban add constraint (foreign key (cban_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcacban_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacban add constraint (foreign key (cban_cod_ecba)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaecba constraint informix.fk_bcacban_bcaeban);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcabloq add constraint (foreign key (bloq_cod_cban)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacban constraint informix.fk_bcabloq_bcacban);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcelab add constraint (foreign key (elab_cod_pape)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapape constraint informix.fk_bcapape_afcelab);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatrcj add constraint (foreign key (trcj_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcatrcj_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcafxtc add constraint (foreign key (fxtc_cod_tcdv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcdv constraint informix.fk_bcafxtc_bcatcdv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcafxtc add constraint (foreign key (fxtc_cod_flib)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaflib constraint informix.fk_bcafxtc_bcaflib);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcachra add constraint (foreign key (chra_cod_cban)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacban constraint informix.fk_bcachra_bcacban);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcachra add constraint (foreign key (chra_cod_ecba)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaecba constraint informix.fk_bcachra_bcaecba);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcamban add constraint (foreign key (mban_cod_cban)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacban constraint informix.fk_bcamban_bcacban);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcamban add constraint (foreign key (mban_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_bcamban_bcatasi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcamban add constraint (foreign key (mban_cod_pape)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapape constraint informix.fk_bcamban_bcapape);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcamban add constraint (foreign key (mban_cod_tmba)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatmba constraint informix.fk_bcamban_bcatmba);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapres add constraint (foreign key (pres_cod_cpre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacpre constraint informix.fk_bcapres_bcacpre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadchv add constraint (foreign key (dchv_cod_banc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcabanc constraint informix.fk_bcadchv_bcabanc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadchv add constraint (foreign key (dchv_cod_modu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamodu constraint informix.fk_bcadchv_bcamodu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadchv add constraint (foreign key (dchv_cod_tfpg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfpg constraint informix.fk_bcadchv_bcatfpg);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcamcdv add constraint (foreign key (mcdv_cod_pape)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapape constraint informix.fk_bcamcdv_bcapape);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcamcdv add constraint (foreign key (mcdv_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcamcdv_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcamcdv add constraint (foreign key (mcdv_cod_tran)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatran constraint informix.fk_bcamcdv_bcatran);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcalibr add constraint (foreign key (libr_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcalibr_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcalibr add constraint (foreign key (libr_cod_fxtc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcafxtc constraint informix.fk_bcalibr_bcafxtc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadivc add constraint (foreign key (divc_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcadivc_bcacred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadivc add constraint (foreign key (divc_cod_ediv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaediv constraint informix.fk_bcadivc_bcaediv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatafo add constraint (foreign key (tafo_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_bcatafo_bcatasi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacamb add constraint (foreign key (camb_cod_tdin)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatdin constraint informix.fk_bcacamb_bcatdin);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaocu2 add constraint (foreign key (ocu2_cod_ocu1)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaocu1 constraint informix.fk_bcaocu2_bcaocu1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaocup add constraint (foreign key (ocup_cod_ocu2)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaocu2 constraint informix.fk_bcaocup_bcaocu2);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcandoc add constraint (foreign key (ndoc_cod_tdoc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatdoc constraint informix.fk_bcandoc_bcatdoc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadepg add constraint (foreign key (depg_cod_pgpf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapgpf constraint informix.fk_bcadepg_bcapgpf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadepg add constraint (foreign key (depg_cod_tran)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatran constraint informix.fk_bcadepg_bcatran);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadepg add constraint (foreign key (depg_cod_tfpg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfpg constraint informix.fk_bcadepg_bcatfpg);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaoptr add constraint (foreign key (optr_cod_opci)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaopci on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcaoptr_bcaopci);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaoptr add constraint (foreign key (optr_cod_tran)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatran on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcaoptr_bcatran);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaplaz add constraint (foreign key (plaz_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_bcaplaz_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcamont add constraint (foreign key (mont_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_bcamont_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaccco add constraint (foreign key (ccco_cod_tcue)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcue constraint informix.fk_bcaccco_bcatcue);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaccco add constraint (foreign key (ccco_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_bcaccco_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcafpsd add constraint (foreign key (fpsd_cod_pasd)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapasd constraint informix.fk_bcafpsd_bcatfoc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatcse add constraint (foreign key (tcse_cod_fpsd)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcafpsd constraint informix.fk_bcatcse_bcafpsd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcafppf add constraint (foreign key (fppf_cod_ttpf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcattpf constraint informix.fk_bcafppf_bcattpf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaflib add constraint (foreign key (flib_cod_tlib)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatlib constraint informix.fk_bcaflib_bcatlib);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpln add constraint (foreign key (dpln_cod_itrv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaitrv constraint informix.fk_bcadpln_bcaitrv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadtcr add constraint (foreign key (dtcr_cod_tdtc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatdtc constraint informix.fk_bcatdtc_bcadtcr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaaper add constraint (foreign key (aper_cod_perf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaperf on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcaaper_bcaperf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaaper add constraint (foreign key (aper_cod_opci)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaopci on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcaaper_bcaopci);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaausu add constraint (foreign key (ausu_cod_opci)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaopci on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcaausu_bcaopci);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaimpr add constraint (foreign key (impr_cod_opci)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaopci on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcaimpr_bcaopci);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaacli add constraint (foreign key (acli_cod_tact)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatact constraint informix.fk_bcaacli_bcatact);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaacli add constraint (foreign key (acli_cod_ocup)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaocup constraint informix.fk_bcaacli_bcaocup);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatene add constraint (foreign key (tene_cod_unid)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaunid constraint informix.fk_bcatene_bcaunid);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatene add constraint (foreign key (tene_cod_sect)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasect constraint informix.fk_bcatene_bcasect);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatele add constraint (foreign key (tele_cod_ttel)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcattel constraint informix.fk_bcatele_bcattel);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatele add constraint (foreign key (tele_cod_utel)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcautel constraint informix.fk_bcatele_bcautel);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadecl add constraint (foreign key (decl_cod_depe)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadepe constraint informix.fk_bcadecl_bcadepe);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadecl add constraint (foreign key (decl_cod_clna)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclna constraint informix.fk_bcadecl_bcaclna);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcfptr add constraint (foreign key (fptr_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcfptr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadtra add constraint (foreign key (dtra_cod_fcdi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcafcdi constraint informix.fk_bcadtra_bcafcdi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadtra add constraint (foreign key (dtra_cod_tafo)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatafo constraint informix.fk_bcadtra_bcatafo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadfcd add constraint (foreign key (dfcd_cod_fcdi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcafcdi on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcadfcd_bcafcdi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadfcd add constraint (foreign key (dfcd_cod_tfpg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfpg constraint informix.fk_bcadfcd_bcatfpg);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateof add constraint (foreign key (teof_cod_ttel)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcattel constraint informix.fk_bcateof_bcattel);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateof add constraint (foreign key (teof_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcateof_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacfam add constraint (foreign key (cfam_cod_tcfa)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcfa constraint informix.fk_bcacfam_bcatcfa);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcabene add constraint (foreign key (bene_cod_tben)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatben constraint informix.fk_bcabene_bcatben);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcajorn add constraint (foreign key (jorn_cod_dsem)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadsem on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcajorn_bcadsem);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacoti add constraint (foreign key (coti_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcacoti_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcajcop add constraint (foreign key (jcop_cod_dsem)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadsem constraint informix.fk_bcajcop_bcadsem);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcajcop add constraint (foreign key (jcop_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcajcop_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadefe add constraint (foreign key (defe_cod_camb)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacamb constraint informix.fk_bcadefe_bcacamb);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadefe add constraint (foreign key (defe_cod_deef)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadeef constraint informix.fk_bcadefe_bcadeef);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasact add constraint (foreign key (sact_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcasact_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasact add constraint (foreign key (sact_cod_peri)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaperi constraint informix.fk_bcasact_bcapero);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapdco add constraint (foreign key (pdco_cod_comp)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapcom constraint informix.fk_bcapdco_bcapcom);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapdco add constraint (foreign key (pdco_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcapdco_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapdco add constraint (foreign key (pdco_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_bcapdco_bcatasi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcancue add constraint (foreign key (ncue_cod_ejer)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaejer constraint informix.fk_bcancue_bcaejer);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaimru add constraint (foreign key (imru_cod_impu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaimpu constraint informix.fk_bcaimru_bcaimpu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaimru add constraint (foreign key (imru_cod_rubr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcarubr constraint informix.fk_bcaimru_bcarubr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacrau add constraint (foreign key (crau_cod_rubr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcarubr constraint informix.fk_bcacrau_bcarubr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcactip add constraint (foreign key (ctip_cod_ctaa)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcactip_bcacco1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcactip add constraint (foreign key (ctip_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcactip_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcactip add constraint (foreign key (ctip_cod_impu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaimpu constraint informix.fk_bcactip_bcaimpu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaimpa add constraint (foreign key (impa_cod_impu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaimpu constraint informix.fk_bcaimpa_bcaimpu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaprpf add constraint (foreign key (prpf_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_bcaprpf_bcatasi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaprpf add constraint (foreign key (prpf_cod_pgpf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapgpf constraint informix.fk_bcaprpf_bcapgpf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadeip add constraint (foreign key (deip_cod_pgpf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapgpf constraint informix.fk_bcadeip_bcapgpf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadeip add constraint (foreign key (deip_cod_prms)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaprms constraint informix.fk_bcadeip_bcaprms);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadeip add constraint (foreign key (deip_cod_tran)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatran constraint informix.fk_bcadeip_bcatran);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaprdi add constraint (foreign key (prdi_cod_prms)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaprms constraint informix.fk_bcaprdi_bcaprms);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadirb add constraint (foreign key (dirb_cod_rubc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcarubr constraint informix.fk_bcadirb_bcarubc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadirb add constraint (foreign key (dirb_cod_divc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadivc constraint informix.fk_bcadirb_bcadivc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapdte add constraint (foreign key (pdte_cod_tfpg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfpg constraint informix.fk_bcapdte_bcatfpg);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapdte add constraint (foreign key (pdte_cod_pago)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapago constraint informix.fk_bcapdte_bcapago);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagtcr add constraint (foreign key (gtcr_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcagtcr_bcacred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagtcr add constraint (foreign key (gtcr_num_gtia)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcagtia constraint informix.fk_bcagtcr_bcagtia);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacocr add constraint (foreign key (cocr_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcacocr_bcacred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacocr add constraint (foreign key (cocr_cod_comi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacomi constraint informix.fk_bcacocr_bcacomi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacpcr add constraint (foreign key (cpcr_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcacpcr_bcacred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacpcr add constraint (foreign key (cpcr_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcacpcr_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagbie add constraint (foreign key (gtia_num_gtia)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcagtia constraint informix.fk_bcagbie_bcagtia);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagbie add constraint (foreign key (gbie_cod_sect)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasect constraint informix.fk_bcagbie_bcasect);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapose add constraint (foreign key (pose_num_gtia)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcagtia constraint informix.fk_bcapose_bcagtia);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagpre add constraint (foreign key (gpre_num_gtia)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcagtia constraint informix.fk_bcagpre_bcagtia);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagpre add constraint (foreign key (gpre_cod_sect)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasect constraint informix.fk_bcagpre_bcasect);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagtit add constraint (foreign key (gtit_num_gtia)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcagtia constraint informix.fk_bcagtit_bcagtia);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagtit add constraint (foreign key (gtit_cod_banc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcabanc constraint informix.fk_bcagtit_bcabanc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaobcr add constraint (foreign key (obcr_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcaobcr_bcacred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadbau add constraint (foreign key (dbau_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcadbau_bcacred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadbau add constraint (foreign key (dbau_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcadbau_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapddb add constraint (foreign key (pddb_cod_pago)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapago constraint informix.fk_bcapddb_bcapago);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapddb add constraint (foreign key (pddb_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcapddb_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacous add constraint (foreign key (cous_cod_cont)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacont on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcacous_bcacont);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatasa add constraint (foreign key (tasa_cod_plaz)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaplaz on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcatasa_bcaplaz);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatasa add constraint (foreign key (tasa_cod_mont)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamont on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcatasa_bcamont);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatxcp add constraint (foreign key (txcp_cod_tran)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatran constraint informix.fk_bcatxcp_bcatran);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatxcp add constraint (foreign key (txcp_cod_tcdv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcdv constraint informix.fk_bcatxcp_bcatcdv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcameac add constraint (foreign key (meac_cod_tcdv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcdv constraint informix.fk_bcameac_bcatcdv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcavpcn add constraint (foreign key (vpcn_cod_picn)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapicn constraint informix.fk_bcavpcn_bcapicn);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcavpcn add constraint (foreign key (vpcn_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcavpcn_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcabpln add constraint (foreign key (bpln_cod_dpln)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpln constraint informix.fk_bcapln_bcadpln);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatpln add constraint (foreign key (tpln_cod_dpln)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpln constraint informix.fk_bcatpln_bcadpl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaddte add constraint (foreign key (ddte_cod_mcdv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamcdv constraint informix.fk_bcaddte_bcamcdv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaddte add constraint (foreign key (ddte_cod_tfpg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfpg constraint informix.fk_bcaddte_bcatfpg);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacpan add constraint (foreign key (cpan_cod_mcdv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamcdv constraint informix.fk_bcacpan_bcamcdv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadaut add constraint (foreign key (daut_cod_dpln)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpln constraint informix.fk_bcadaut_bcadpln);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatadv add constraint (foreign key (tadv_cod_tcdv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcdv constraint informix.fk_bcatadv_bcatcdv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclib add constraint (foreign key (clib_cod_mlbr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamlbr constraint informix.fk_bcaclib_bcamlbr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatcdp add constraint (foreign key (tcdp_cod_tcdv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcdv constraint informix.fk_bcatcdp_bcatcdv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaerro add constraint (foreign key (erro_cod_bbdd)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcabbdd constraint informix.fk_bcaerro_bcabbdd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadefz add constraint (foreign key (defz_cod_banc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcabanc constraint informix.fk_bcadefz_bcabanc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadefz add constraint (foreign key (defz_cod_tfpg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfpg constraint informix.fk_bcadefz_bcatfpg);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcafadv add constraint (foreign key (fadv_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcafadv_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadcom add constraint (foreign key (dcom_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcadcom_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadcom add constraint (foreign key (dcom_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_bcadcom_bcatasi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadcom add constraint (foreign key (dcom_cod_comp)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacomp constraint informix.fk_bcadcom_bcacomp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadbpf add constraint (foreign key (dbpf_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcadbpf_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadbpf add constraint (foreign key (dbpf_cod_depg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadepg constraint informix.fk_bcadbpf_bcadepg);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadbpf add constraint (foreign key (dbpf_cod_tran)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatran constraint informix.fk_bcadbpf_bcatran);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpap add constraint (foreign key (dpap_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_bcadpap_bcatasi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpap add constraint (foreign key (dpap_cod_pape)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapape constraint informix.fk_bcadpap_bcapape);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpap add constraint (foreign key (dpap_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcadpap_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpap add constraint (foreign key (dpap_cod_rubr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcarubr constraint informix.fk_bcadpap_bcarubr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.tmpdcom add constraint (foreign key (dcom_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_tmpdcom_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaprdv add constraint (foreign key (prdv_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcaprdv_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaprdv add constraint (foreign key (prdv_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_bcaprdv_bcatasi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaustr add constraint (foreign key (ustr_cod_optr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaoptr on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcaustr_bcaoptr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaform add constraint (foreign key (fomr_cod_tfor)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfor constraint informix.fk_bcaform_bcatfor);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclna add constraint (foreign key (clna_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclna_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcavpre add constraint (foreign key (vpre_cod_pres)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapres constraint informix.fk_bcavpre_bcapres);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcavpre add constraint (foreign key (vpre_cod_mese)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamese constraint informix.fk_bcavpre_bcamese);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcactap add constraint (foreign key (ctap_cod_prms)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcavprm constraint informix.fk_bcactap_bcavprm);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcactap add constraint (foreign key (ctap_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcactap_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacpar add constraint (foreign key (cpar_cod_paco)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapaco on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcacpar_bcapaco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacpar add constraint (foreign key (cpar_cod_cont)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacont on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcacpar_bcacont);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaefba add constraint (foreign key (efba_cod_tfpg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfpg constraint informix.fk_bcaefba_bcatfpg);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaefba add constraint (foreign key (efba_cod_banc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcabanc on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcaefba_bcabanc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaobct add constraint (foreign key (obct_cod_cban)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacban constraint informix.fk_bcaobct_bcacban);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadmba add constraint (foreign key (dmba_cod_mban)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamban constraint informix.fk_bcadmba_bcamban);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadmba add constraint (foreign key (dmba_cod_tfpg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfpg constraint informix.fk_bcadmba_bcatfpg);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasald add constraint (foreign key (sald_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcasald_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcabxco add constraint (foreign key (bxco_cod_bech)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcabech constraint informix.fk_bcabxco_bcabech);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcabxco add constraint (foreign key (bxco_cod_comp)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacomp constraint informix.fk_bcabxco_bcacomp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadecb add constraint (foreign key (decb_cod_flib)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaflib constraint informix.fk_bcadecb_bcaflib);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaempl add constraint (foreign key (empl_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaempl_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatndd add constraint (foreign key (tndd_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcatndd_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatndd add constraint (foreign key (tndd_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_bcatndd_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatndd add constraint (foreign key (tndd_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_bcatndd_bcatasi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadimp add constraint (foreign key (impc_cod_impc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaimpc constraint informix.fk_bcadimp_bcaimpc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacsob add constraint (foreign key (csob_cod_tsob)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatsob constraint informix.fk_bcacsob_bcatsob);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacsob add constraint (foreign key (csob_cod_cban)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacban constraint informix.fk_bcacsob_bcacban);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasdct add constraint (foreign key (sdct_cod_cban)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacban constraint informix.fk_bcasdct_bcacban);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcinve add constraint (foreign key (inve_cod_edpf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaedpf constraint informix.fk_afcinve_bcaedpf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcachcj add constraint (foreign key (chcj_cod_dchv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadchv constraint informix.fk_bcadchv_bcachcj);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcachcj add constraint (foreign key (chcj_cod_deef)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadeef constraint informix.fk_bcadeef_bcachcj);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadtot add constraint (foreign key (dtot_cod_dtot)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapott constraint informix.fk_bcadtot_bcapott);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadtot add constraint (foreign key (dtot_cod_trcj)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatrcj constraint informix.fk_ref_16792_16792);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaotcl add constraint (foreign key (dotr_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dotr_cod_clie) references informix.bcaottr constraint informix')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('.fk_bcadotr_bcaottr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaotcl add constraint (foreign key (dotr_cod_trcj)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatrcj constraint informix.fk_bcadotr_bcatrcj);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasacp add constraint (foreign key (sacp_cod_cons)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacons constraint informix.fk_bcasacp_bcacons);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasacp add constraint (foreign key (sacp_cod_mese)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamese constraint informix.fk_bcasacp_bcamese);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasacp add constraint (foreign key (sacp_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccco constraint informix.fk_bcasacp_bcaccco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacdco add constraint (foreign key (cdco_cod_ccom)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccom constraint informix.fk_bccdco_bcaccom);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacdco add constraint (foreign key (cdco_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_bcacdco_bcatasi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacdco add constraint (foreign key (cdco_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccco constraint informix.fk_bcacdco_bcaccco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacsac add constraint (foreign key (csac_cod_mese)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamese constraint informix.fk_bcacsac_bcamese);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacsac add constraint (foreign key (csac_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccco constraint informix.fk_bcacsac_bcaccco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadoem add constraint (foreign key (doem_cod_ooem)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaooem constraint informix.fk_bcadoem_bcaooem);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadoem add constraint (foreign key (doem_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_bcadoem_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadoem add constraint (foreign key (doem_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcadoem_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcandoc add constraint (foreign key (ndoc_cod_ejer)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaejer constraint informix.fk_bcandoc_bcaejer);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapape add constraint (foreign key (pape_cod_tdoc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatdoc constraint informix.fk_bcapape_bcatdoc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcafchq add constraint (foreign key (fchq_cod_banc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcabanc constraint informix.fk_bcafcqh_bcabanc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcading add constraint (foreign key (ding_cod_ineg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaineg constraint informix.fk_bcaineg_bcading);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcabanc add constraint (foreign key (banc_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcabanc_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpvi add constraint (foreign key (dpvi_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcadpvi_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcafsal add constraint (foreign key (fsal_cod_csal)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacsal constraint informix.fk_bcacsal_bcafsal);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaordc add constraint (foreign key (ordc_cod_dcom)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadcom constraint informix.fk_bcaordc_bcadcom);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaacce add constraint (foreign key (acce_cod_bbdd)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcabbdd constraint informix.fk_bcaacce_bcabbdd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcacred_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcinve add constraint (foreign key (inve_cod_tinv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctinv constraint informix.fk_afcinve_afctinv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagara add constraint (foreign key (gara_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcagara_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcanoti add constraint (foreign key (noti_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcacred_bcanoti);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaconc add constraint (foreign key (conc_cod_cban)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacban constraint informix.fk_bcaconc_bcacban);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacsac add constraint (foreign key (csac_cod_ejer)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaejer constraint informix.fk_bcacsac_bcaejer);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_eope)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaeope constraint informix.fk_bcaeope);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_iope)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaiope constraint informix.fk_bcaiope);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_orig)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaorig constraint informix.fk_bcaorig);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaprov add constraint (foreign key (prov_cod_pais)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapais constraint informix.fk_bcapais);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaavpic add constraint (foreign key
(avpic_cod_dpvi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_referen_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagtia add constraint (foreign key (gtia_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcagtia_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasocr add constraint (foreign key (socr_cod_ccre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccre constraint informix.fk_bcasocr_bcaccre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasocr add constraint (foreign key (socr_cod_dtcr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadtcr constraint informix.fk_bcasocr_bcadtcr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasocr add constraint (foreign key (socr_cod_esol)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaesol constraint informix.fk_bcasoli_bcaesol);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasocr add constraint (foreign key (socr_cod_intv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaintv constraint informix.fk_bcasocr_bcaintv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasocr add constraint (foreign key (socr_cod_tamo)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatamo constraint informix.fk_bcasocr_bcatamo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapgre add constraint (foreign key (pgre_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcapgre_bcacred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_socr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasocr constraint informix.fk_bcacred_bcasocr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaendc add constraint (foreign key (endc_num_gtia)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcagtia );')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagchq add constraint (foreign key (gchq_cod_banc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcabanc constraint informix.fk_bcabanc_bcabanc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagchq add constraint (foreign key (gchq_num_gtia)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcagtia constraint informix.fk_bcagchq_bcagtia);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaacli add constraint (foreign key (acli_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaacli_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaorco add constraint (foreign key (orco_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatene add constraint (foreign key (tene_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcatene_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaanrl add constraint (foreign key (anrl_cod_depe)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadepe constraint informix.fk_bcadepe_bcaanrl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatele add constraint (foreign key (tele_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcatele_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaeesf add constraint (foreign key (eesf_cod_esfe)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaesfe constraint informix.fk_referen_bcaesfe);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasetr add constraint (foreign key (tpid_cod_iden)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatide constraint informix.fk_referen_bcatide);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdssc add constraint (foreign key (dssc_cod_socr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasocr constraint informix.fk_bcasocr_afcdssc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasetr add constraint (foreign key (tptr_cod_tptr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatptr constraint informix.fk_bcatptr_bcasetr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcarefi add constraint (foreign key (refi_cod_pgpf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapgpf constraint informix.fk_bcapgpf_bcarefi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdssc add constraint (foreign key (dssc_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcacred_afcdssc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcarefi add constraint (foreign key (setr_cod_setr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasetr constraint informix.fk_bcasetr_bcarefi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadrtr add constraint (foreign key (refi_cod_refi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcarefi constraint informix.fk_bcarefi_bcadrtr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdssc add constraint (foreign key (dssc_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcdssc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclie add constraint (foreign key (clie_cod_tviv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctviv constraint informix.fk_referen_afctviv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateex add constraint (foreign key (tpie_cod_tpie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatpie constraint informix.fk_bcatpie_bcateex);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateex add constraint (foreign key (diad_cod_diad)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadiad constraint informix.fk_bcadiad_bcateex);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateex add constraint (foreign key (core_cod_core)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacore constraint informix.fk_bcacore_bcateex);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateex add constraint (foreign key (tsie_cod_tsie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatsie constraint informix.fk_bcatsie_bcateex);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacoop add constraint (foreign key (coop_cod_tiin)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatiin constraint informix.fk_bcacoop_bcatiin);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateim add constraint (foreign key (tpie_cod_tpie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatpie constraint informix.fk_bcatpie_bcateim);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateim add constraint (foreign key (diad_cod_diad)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadiad constraint informix.fk_bcadiad_bcateim);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacomp add constraint (foreign key (comp_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcacomp_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateim add constraint (foreign key (core_cod_core)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacore constraint informix.fk_bcacore_bcateim);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateim add constraint (foreign key (tsie_cod_tsie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatsie constraint informix.fk_bcatsie_bcateim);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateim add constraint (foreign key (piva_cod_secu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapiva constraint informix.fk_bcapiva_bcateim);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateim add constraint (foreign key (pice_cod_pice)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapice constraint informix.fk_bcapice_bcateim);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadrti add constraint (foreign key (teim_cod_teim)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcateim constraint informix.fk_bcateim_bcadrti);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatlco add constraint (foreign key (setr_cod_setr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasetr constraint informix.fk_bcasetr_bcatlco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatlco add constraint (foreign key (piva_cod_secu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapiva constraint informix.fk_bcapiva_bcatlco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatlco add constraint (foreign key (pice_cod_pice)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapice constraint informix.fk_bcapice_bcatlco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatlve add constraint (foreign key (tlve_cod_setr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasetr constraint informix.fk_bcasetr_bcatlve);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatlve add constraint (foreign key (tlve_cod_pice)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapice constraint informix.fk_bcapice_bcatlve);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadrtv add constraint (foreign key (drtv_cod_tlve)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatlve constraint informix.fk_bcatlve_bcadrtv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasocr add constraint (foreign key (socr_cod_prdr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaprdr constraint informix.fk_bcasocr_bcaprdr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaprdr add constraint (foreign key (prdr_cod_ccre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccre constraint informix.fk_bcaccre_bcaprdr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaprdr add constraint (foreign key (prdr_cod_intv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaintv constraint informix.fk_bcaintv_bcaprdr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaeesf add constraint (foreign key (eesf_cod_esac)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaesac constraint informix.fk_referen_bcaesac);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcamoni add constraint (foreign key (moni_cod_dmon)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadmon constraint informix.fk_bcamoni_bcadmon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadvar add constraint (foreign key (dvar_cod_vari)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcavari constraint informix.fk_bcadvar_bcavari);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaindi add constraint (foreign key (tind_cod_tind)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatind constraint informix.fk_bcaindi_bcatind);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatafi add constraint (foreign key (tafi_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcatafi_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatafi add constraint (foreign key (tafi_cta_depr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint
informix.fk_bcatafi_bcaccon_depr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatafi add constraint (foreign key (tafi_cta_gast)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint
informix.fk_bcatafi_bcaccon_gast);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaddep add constraint (foreign key (ddep_cod_depa)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadepa constraint informix.fk_bcaddep_bcadepa);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadtac add constraint (foreign key (dtac_cod_tafi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatafi constraint informix.fk_bcadtac_bcatafi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaacti add constraint (foreign key (acti_cod_ddep)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaddep constraint informix.fk_bcaacti_bcaddep);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaacti add constraint (foreign key (acti_cod_dtac')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acti_cod_tafi) references informix.bcadtac constraint informix')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('.fk_bcaacti_bcadtac);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaacti add constraint (foreign key (acti_cod_eafi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaeafi constraint informix.fk_bcaacti_bcaeafi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaacti add constraint (foreign key (acti_cod_empl)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaempl constraint informix.fk_bcaacti_bcaempl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadepr add constraint (foreign key (depr_cod_acti)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaacti constraint informix.fk_bcadepr_bcaacti);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaacem add constraint (foreign key (acemi_cod_acti)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaacti constraint informix.fk_bcaempl_bcaacti);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaaeac add constraint (foreign key (aeac_cod_acti)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaacti constraint informix.fk_bcaaeac_bcaacti);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcahact add constraint (foreign key (hact_cod_acti)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaacti constraint informix.fk_bcahact_bcaacti);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasoci add constraint (foreign key (soci_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcasoci_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaabog add constraint (foreign key (abog_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcaofic_bcaabog);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcajuic add constraint (foreign key (juic_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcacred_bcajuic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcajuic add constraint (foreign key (juic_cod_abog')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('juic_cod_ofic) references informix.bcaabog constraint informix')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('.fk_bcaabog_bcajuic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcajuic add constraint (foreign key (juic_cod_ejui)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaejui constraint informix.fk_bcaejuic_bcajui);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaperi add constraint (foreign key (peri_cod_ejer)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaejer constraint informix.fk_bcaperi_bcaejer);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatasc add constraint (foreign key (tasc_cod_plcr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaplcr constraint informix.fk_bcatasc_bcaplcr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatasc add constraint (foreign key (tasc_cod_monc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamonc constraint informix.fk_bcatasc_bcamonc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatasc add constraint (foreign key (tasc_cod_ccre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccre constraint informix.fk_bcatasc_bcaccre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaorco add constraint (foreign key (orco_est_orco)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaeanr constraint informix.fk_bcaeanr_bcaeanr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaofus add constraint (foreign key (ofus_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcaofus_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaoffa add constraint (foreign key (offa_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcaoffa_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaoffa add constraint (foreign key (offa_cod_esrf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaesrf constraint informix.fk_bcaoffa_bcaesrf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaoffa add constraint (foreign key (offa_cod_tran)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatran constraint informix.fk_bcaoffa_bcatran);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afccpof add constraint (foreign key (cpof_ofi_orig)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_afccpofd_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afccpof add constraint (foreign key (cpof_ofi_dest)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_afccpofo_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afccpof add constraint (foreign key (cpof_cta_pagr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_afccpofc_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afccpof add constraint (foreign key (cpof_cta_cobr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_afccpofp_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasact add constraint (foreign key (sact_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcasact_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadeef add constraint (foreign key (deef_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcadeef_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcamcdv add constraint (foreign key (mcdv_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcamcdv_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclie add constraint (foreign key (clie_cod_pais)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapais constraint informix.fk_bcaclie_bcapais);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcahesu add constraint (foreign key (hesu_cod_empl)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaempl constraint informix.fk_bcahesu_bcaempl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacarg add constraint (foreign key (carg_cod_tica)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatica constraint informix.fk_bcacarg_bcatica);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaempl add constraint (foreign key (empl_cod_taud)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcataud constraint informix.fk_bcaempl_bcataud);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaempl add constraint (foreign key (empl_cod_carg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacarg constraint informix.fk_bcaempl_bcacarg);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaempl add constraint (foreign key (empl_cod_rlab)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcarlab constraint informix.fk_bcaempl_bcarlab);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaemdp add constraint (foreign key (emdp_cod_ereg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaereg constraint informix.fk_bcaemdp_bcaereg);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaemdp add constraint (foreign key (emdp_cod_depa)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadepa constraint informix.fk_bcaemdp_bcadepa);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaemdp add constraint (foreign key (emdp_cod_empl)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaempl constraint informix.fk_bcaemdp_bcaempl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaemdp add constraint (foreign key (emdp_cod_tdpd)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatdpd constraint informix.fk_bcaemdp_bcatdpd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapaca add constraint (foreign key (paca_cod_ccre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccre constraint informix.fk_bcapaca_bcaccre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapcal add constraint (foreign key (pcal_cod_ccre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccre constraint informix.fk_bcapcal_bcaccre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcarcla add constraint (foreign key (rcla_cod_ccre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccre constraint informix.fk_bcarcla_bcaccre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcarcla add constraint (foreign key (rcla_cod_tgar)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatgar constraint informix.fk_bcarcla_bcatgar);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagara add constraint (foreign key (gara_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcagara_bcacred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacfam add constraint (foreign key (cfam_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcacfam_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcabene add constraint (foreign key (bene_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcabene_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcabene add constraint (foreign key (bene_cod_cben)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcabene_bcacli1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaimag add constraint (foreign key (imag_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaimag_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcabpln add constraint (foreign key (bpln_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcabpln_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcafadv add constraint (foreign key (fadv_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcafadv_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacobs add constraint (foreign key (cobs_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcacobs_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacfir add constraint (foreign key (cfir_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_bcacfir);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcading add constraint (foreign key (ding_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_bcading);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcafsal add constraint (foreign key (fsal_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_bcafsal);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcarols add constraint (foreign key (rols_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_bcarols);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaotde add constraint (foreign key (otde_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_bcaotde);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasocr add constraint (foreign key (socr_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcasoli_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaanrl add constraint (foreign key (anrl_cod_eanr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaeanr constraint informix.fk_bcaeanr_bcaanrl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaabog add constraint (foreign key (abog_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_bcaabog);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaprdr add constraint (foreign key (prdr_cod_lcre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcalcre constraint informix.fk_bcalcre_bcalcre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasocr add constraint (foreign key (socr_cod_lcred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcalcre constraint informix.fk_bcasocr_bcalcre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasocr add constraint (foreign key (socr_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcasocr_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdsoc add constraint (foreign key (dsoc_cod_socr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasocr constraint informix.fk_afcdsoc_bcasocr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdsoc add constraint (foreign key (dsoc_est_ante)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaesol constraint informix.fk_afcdsoc_bcaesol);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcprso add constraint (foreign key (prso_cod_prms)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaprms constraint informix.fk_afcprso_bcaprms);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcainan add constraint (foreign key (inan_cod_tcdv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcdv constraint informix.fk_bcainan_bcatcdv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaabdv add constraint (foreign key (abdv_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcaabdv_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaabdv add constraint (foreign key (abdv_cod_divc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadivc constraint informix.fk_bcaabdv_bcadivc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaabdv add constraint (foreign key (abdv_cod_pago)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapago constraint informix.fk_bcaabdv_bcapago);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaabdv add constraint (foreign key (abdv_cod_pape)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapape constraint informix.fk_bcaabdv_bcapape);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaabdv add constraint (foreign key (abdv_cod_rubr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcarubr constraint informix.fk_bcaabdv_bcarubr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcconf add constraint (foreign key (conf_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_afcconf_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcinve add constraint (foreign key (inve_cod_banc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcabanc constraint informix.fk_afcinve_bcabanc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcinve add constraint (foreign key (inve_cod_ffin)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaffin constraint informix.fk_afcinve_bcaffin);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcinve add constraint (foreign key (inve_cod_loca)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcloca constraint informix.fk_afcinve_afcloca);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcinve add constraint (foreign key (inve_cod_pape)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapape constraint informix.fk_afcinve_bcapape);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcinve add constraint (foreign key (inve_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_afcinve_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcinve add constraint (foreign key (inve_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_afcinve_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcinve add constraint (foreign key (inve_cod_peri)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaintv constraint informix.fk_afcinve_bcaintv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcminv add constraint (foreign key (minv_cod_tran)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatran constraint informix.fk_afcminv_bcatran);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcminv add constraint (foreign key (minv_cod_inve)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcinve constraint informix.fk_afcminv_afcinve);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcminv add constraint (foreign key (minv_cod_rubr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcarubr constraint informix.fk_afcminv_rubros);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcminv add constraint (foreign key (minv_cod_edpf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaedpf constraint informix.fk_afcminv_bcaedpf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcminv add constraint (foreign key (minv_cod_tfpg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfpg constraint informix.fk_afcminv_bcatfpg);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcminv add constraint (foreign key (minv_pag_tfpg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfpg constraint informix.fk_afcminv_bcatfpgp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacrrl add constraint (foreign key (crrl_cod_orco)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaorco constraint informix.fk_fk_bcao_bcaorco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacrrl add constraint (foreign key (crrl_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_bcacrrl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacrrl add constraint (foreign key (crrl_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcacred_bcacrrl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaanrl add constraint (foreign key (anrl_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcadpvi_bcaanrl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaanrl add constraint (foreign key (anrl_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_bcaanrl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadanr add constraint (foreign key (danr_cod_anrl)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaanrl constraint informix.fk_bcaanrl_bcadanr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadanr add constraint (foreign key (danr_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_referen_bcacred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacdso add constraint (foreign key (cdso_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcacdso_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaicli add constraint (foreign key (icli_cod_ting)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaintv constraint informix.fk_bcaicli_bcaintv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaicli add constraint (foreign key (icli_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaicli_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadect add constraint (foreign key (dect_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcadect_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadect add constraint (foreign key (dect_cod_depe)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadepe constraint informix.fk_bcadect_bcadepe);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdadp add constraint (foreign key (dadp_cod_anrl)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaanrl constraint informix.fk_afcdadp_bcaanrl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdadp add constraint (foreign key (dadp_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_afcdadp_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaabdv add constraint (foreign key (abdv_cod_ediv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaediv constraint informix.fk_bcaabdv_bcaediv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaprdr add constraint (foreign key (prdr_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_bcaccon_bcaprdr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaprdr add constraint (foreign key (prdr_cod_tide)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatide constraint informix.fk_bcaprdr_bcatide);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpfi add constraint (foreign key (dpfi_cod_fppf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcafppf constraint informix.fk_bcadpfi_bcafppf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpfi add constraint (foreign key (dpfi_cod_edpf)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaedpf constraint informix.fk_bcadpfi_bcaedpf);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpfi add constraint (foreign key (dpfi_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_bcadpfi_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpfi add constraint (foreign key (dpfi_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcadpfi_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpfi add constraint (foreign key (dpfi_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcadpfi_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapgpf add constraint (foreign key (pgpf_cod_dpfi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpfi constraint informix.fk_bcapgpf_bcadpfi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacrau add constraint (foreign key (crau_cod_dpfi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpfi constraint informix.fk_bcacrau_bcadpfi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcarvpf add constraint (foreign key (rvpf_cod_dpfi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpfi constraint informix.fk_bcarvpf_bcadpfi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcarvpf add constraint (foreign key (rvpf_dpfi_ante)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpfi constraint informix.fk_bcarvpf_bcadpf1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaanpf add constraint (foreign key (anpf_cod_dpfi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpfi constraint informix.fk_bcaanpf_bcadpfi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaicli add constraint (foreign key (icli_cod_temd)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctemd constraint informix.fk_bcaicli_afctemd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdact add constraint (foreign key (dact_cod_anrl)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaanrl constraint informix.fk_afcdact_bcaanrl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctemd add constraint (foreign key (temd_cod_recu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctemd constraint informix.fk_afctemd_afctemd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctemd add constraint (foreign key (temd_cod_rec1)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctemd constraint informix.fk_afctemd_afctemd1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaandv add constraint (foreign key (andv_ofi_gene)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_r728_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaandv add constraint (foreign key (andv_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_r729_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaandv add constraint (foreign key (andv_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_r730_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaandv add constraint (foreign key (andv_cod_tanx)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatanx constraint informix.fk_bcaandv_bcatanx);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcabanc add constraint (foreign key (banc_cod_temi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctemi constraint informix.fk_r732_afctemi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcabanc add constraint (foreign key (banc_cod_crie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afccrie constraint informix.fk_r731_afccrie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afccltr add constraint (foreign key (clrl_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_r733_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afccltr add constraint (foreign key (clrl_cod_trla)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctrla constraint informix.fk_r734_afctrla);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcccob add constraint (foreign key (ccob_int_cort)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaintv constraint informix.fk_afccob_bcaintv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcttpr add constraint (foreign key (ttpr_cod_ctas)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccon constraint informix.fk_afcttpr_bcaccon);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcttpr add constraint (foreign key (ttpr_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_afcttpr_bcatasi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afchreq add constraint (foreign key (hreq_usu_asig)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afchreq);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afchreq add constraint (foreign key (hreq_usu_treq)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afchreq1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afchreq add constraint (foreign key (hreq_cod_htso)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afchtso constraint informix.fk_afchtso_afchreq);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afchreq add constraint (foreign key (hreq_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_afchreq);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcmcco add constraint (foreign key (mcco_cod_prdr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaprdr constraint informix.fk_afcmcco_bcaprdr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcmcco add constraint (foreign key (mcco_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_afcccob_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcmcco add constraint (foreign key (mcco_cod_eacd)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaeacd constraint informix.fk_afcccob_bcaeacd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcmcco add constraint (foreign key (mcco_cod_proc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcccob constraint informix.fk_referen_afcccob);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcmcco add constraint (foreign key (mcco_cod_pape)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapape constraint informix.fk_afcmcco_bcapape);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcmcco add constraint (foreign key (mcco_cod_ttpr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcttpr constraint informix.fk_afcmcco_afcttpr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcmcpa add constraint (foreign key (mcpa_cod_mcco)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcmcco constraint informix.fk_afcmcpa_afcmcco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcmcpa add constraint (foreign key (mcpa_cod_prdr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaprdr constraint informix.fk_afcmcpa_bcaprdr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcmcpa add constraint (foreign key (mcpa_cod_modu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamodu constraint informix.fk_afcmcpa_bcamodu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcmcpa add constraint (foreign key (mcpa_cod_esta)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaeacd constraint informix.fk_afcmcpa_bcaeacd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdmcp add constraint (foreign key (mcpa_cod_mcpa)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcmcpa constraint informix.fk_afcdmcp_afcmcpa);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdmco add constraint (foreign key (dmco_cod_mcco)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcmcco constraint informix.fk_afcdmco_afcmcco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdmco add constraint (foreign key (dmco_cod_tfpg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfpg constraint informix.fk_afcdmco_bcatfpg);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdmco add constraint (foreign key (dmco_cod_pape)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapape constraint informix.fk_referen_bcapape);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdmco add constraint (foreign key (dmco_cod_ttpr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcttpr constraint informix.fk_afcdmco_afcttpr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcmcpa add constraint (foreign key (mcpa_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_afcmcpa_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdmcp add constraint (foreign key (dmcp_cod_tfpg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfpg constraint informix.fk_afcdmcp_bcatfpg);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdmcp add constraint (foreign key (dmcp_cod_pape)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapape constraint informix.fk_afcdmcp_bcapape);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdmcp add constraint (foreign key (dmcp_cod_tran)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatran constraint informix.fk_afcdmcp_bcatran);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afccrce add constraint (foreign key (crce_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_r735_bcacred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afccrce add constraint (foreign key (crce_ecr_ante)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaecre constraint informix.fk_r737_bcaecre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afccrce add constraint (foreign key (crce_ecr_actu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaecre constraint informix.fk_r738_bcaecre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afccrce add constraint (foreign key (crce_cod_pape)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapape constraint informix.fk_r739_bcapape);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasoci add constraint (foreign key (soci_act_soci)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcescp constraint informix.fk_bcasoci_afcescp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclie add constraint (foreign key (clie_nat_juri)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctsoc constraint informix.fk_r756_afctsoc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgcob add constraint (foreign key (gcob_cod_tprm)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatprm constraint informix.fk_r752_bcatprm);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgcob add constraint (foreign key (gcob_cod_rubr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcarubr constraint informix.fk_r754_bcarubr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatlco add constraint (foreign key (tpco_cod_tpco)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatpco constraint informix.fk_bcatpco_bcatlco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaprdr add constraint (foreign key (prdr_cod_tpco)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatpco constraint informix.fk_bcatpco_bcatpco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcsoop add constraint (foreign key (soop_cod_optr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaoptr constraint informix.fk_r758_bcaoptr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcsoop add constraint (foreign key (soop_num_soci)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasoci constraint informix.fk_r759_bcasoci);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcsoop add constraint (foreign key (soop_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_r764_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclie add constraint (foreign key (clie_cod_cocu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afccocu constraint informix.fk_referen_afccocu);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcrban add constraint (foreign key (rban_cod_tcba)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcba constraint informix.fk_r765_bcatcba);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcrban add constraint (foreign key (rban_cod_banc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcabanc constraint informix.fk_r766_bcabanc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcrban add constraint (foreign key (rban_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_r767_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afclces add constraint (foreign key (lces_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_referen_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afchdpf add constraint (foreign key (hdpf_cod_dpfi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpfi constraint informix.fk_r769_bcadpfi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afchdpf add constraint (foreign key (hdpf_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_r770_bcaofic);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdagc add constraint (foreign key (dagc_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_r772_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdagc add constraint (foreign key (dagc_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_r773_bcacred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdagc add constraint (foreign key (dagc_cod_anrl)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaanrl constraint informix.fk_r774_bcaanrl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaocup add constraint (foreign key (ocup_rec_ocup)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaocup constraint informix.fk_bcaocup_bcaocup);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacoop add constraint (foreign key (coop_cod_tsis)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctsis constraint informix.fk_r755_afctsis);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacoop add constraint (foreign key (coop_cod_tsco)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctsco constraint informix.fk_r771_afctsco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclie add constraint (foreign key (clie_cod_tcsr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctcsr constraint informix.fk_r772_afctcsr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclie add constraint (foreign key (clie_cod_auid)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcauid constraint informix.fk_afcauid_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclna add constraint (foreign key (clna_cod_intr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaintr constraint informix.fk_bcaclna_bcaintr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagbie add constraint (foreign key (gbie_cod_gtbi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcgtbi constraint informix.fk_afcgtbi_bcagbie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcagtit add constraint (foreign key (gtit_cod_gtti)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcgtti constraint informix.fk_afcgtit_bcagtti);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afciinv add constraint (foreign key (iinv_cod_minv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcminv constraint informix.fk_afciinv_afcminv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afciinv add constraint (foreign key (iinv_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_referen_bcatasi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateim add constraint (foreign key (suco_cod_suco)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasuco constraint informix.fk_bcasuco_bcateim);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatlco add constraint (foreign key (suco_cod_suco)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasuco constraint informix.fk_bcasuco_bcatlco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcrfpe add constraint (foreign key (rfpe_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_afcrfpe_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcrfpe add constraint (foreign key (rfpe_cli_codi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_afcrfpe_bcaclie1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdeop add constraint (foreign key (deop_cod_eope)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaeope constraint informix.fk_afcrdeop_bcaeope);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdecr add constraint (foreign key (decr_cod_deop)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcdeop constraint informix.fk_afcdecr_afcrdeop);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacaja add constraint (foreign key (caja_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcacaja_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdecr add constraint (foreign key (decr_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_afcdecr_bcacred);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcriec add constraint (foreign key (riec_cod_ineg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaineg constraint informix.fk_afcriec_bcainec);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcapape add constraint (foreign key (pape_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcapape_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdrie add constraint (foreign key (drie_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_afcdrie_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdrie add constraint (foreign key (drie_cod_riec)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcriec constraint informix.fk_afcdrie_afcriec);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdrso add constraint (foreign key (drso_cod_drie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcdrie constraint informix.fk_afcdrso_afcdrie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacont add constraint (foreign key (cont_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcacont_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdrso add constraint (foreign key (drso_cod_socr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasocr constraint informix.fk_afcdrso_bcasocr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdrso add constraint (foreign key (drso_cod_riec)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcriec constraint informix.fk_afcdrso_afcriec);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcrbso add constraint (foreign key (rbso_cod_rban)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcrban constraint informix.fk_afcrbso_afcrban);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcddri add constraint (foreign key (ddri_cod_drie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcdrie constraint informix.fk_afcddri_afcdrie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdcre add constraint (foreign key (dcre_cod_ccre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccre constraint informix.fk_afcdcre_bcaccre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcasocr add constraint (foreign key (socr_cod_dcre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcdcre constraint informix.fk_bcasocr_afcdcre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_dcre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcdcre constraint informix.fk_bcacred_afcdcre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacomp add constraint (foreign key (comp_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcacomp_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdidv add constraint (foreign key (didv_cod_rubr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcarubr constraint informix.fk_bcarubr_afcdidv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdidv add constraint (foreign key (didv_cod_edid)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaediv constraint informix.fk_bcaediv_afcdidv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdidv add constraint (foreign key (didv_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcadpvi_afcdidv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdpta add constraint (foreign key (dpta_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcadpvi_afcdpta);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaorec add constraint (foreign key (orec_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcaorec_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaccom add constraint (foreign key (ccom_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcaccom_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdpta add constraint (foreign key (dpta_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_bcatasi_afcdpta);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcencr add constraint (foreign key (encr_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcadpvi_afcencr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcencr add constraint (foreign key (encr_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcacred_afcencr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcabloq add constraint (foreign key (bloq_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcabloq_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcencr add constraint (foreign key (encr_cod_picn)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapicn constraint informix.fk_bcapicn_afcencr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaausu add constraint (foreign key (ausu_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcaausu_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdsco add constraint (foreign key (dsco_cod_socr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcasocr constraint informix.fk_bcasocr_afcdsco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdsco add constraint (foreign key (dsco_cod_tcom)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctcom constraint informix.fk_afctcom_afcdsco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadtra add constraint (foreign key (dtra_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcadtra_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcajorn add constraint (foreign key (jorn_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcajorn_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcclpe add constraint (foreign key (clpe_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_afcclpe);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcclpe add constraint (foreign key (clpe_cod_peps)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcpeps constraint informix.fk_afcpeps_afcclpe);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdtlv add constraint (foreign key (dtlv_cod_dcom)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadcom constraint informix.fk_bcadcom_afcdtlv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacous add constraint (foreign key (cous_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcacous_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcavpcn add constraint (foreign key (vpcn_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcavpcn);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclib add constraint (foreign key (clib_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_referen_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaustr add constraint (foreign key (ustr_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua on delete cascade constraint ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.fk_bcaustr_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaobct add constraint (foreign key (obct_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcaobct_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacobs add constraint (foreign key (cobs_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcacobs_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacsob add constraint (foreign key (csob_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcacsob_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaconc add constraint (foreign key (conc_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcaconc_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcastmp add constraint (foreign key (stmp_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_r750_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaacce add constraint (foreign key (acce_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcaacce_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcachqs add constraint (foreign key (chqs_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcachqs_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacrrl add constraint (foreign key (crrl_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcacrrl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaanrl add constraint (foreign key (anrl_usu_rec)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcaanrl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaanrl add constraint (foreign key (anrl_usu_env)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausus_bcadanr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacoan add constraint (foreign key (usua_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcacoan);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcarefi add constraint (foreign key (usua_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcarefi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadrtr add constraint (foreign key (usua_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcadrtr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateex add constraint (foreign key (usua_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcateex);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcateim add constraint (foreign key (usua_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcateim);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdicl add constraint (foreign key (dicl_usu_dicl)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_afcdicl_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadrti add constraint (foreign key (usua_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcadrti);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadrtc add constraint (foreign key (usua_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcadrtc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatlve add constraint (foreign key (tlve_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcatlve);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaacti add constraint (foreign key (acti_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcaacti_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdmcp add constraint (foreign key (dmcp_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_afcdmcp_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afccrce add constraint (foreign key (crce_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_r736_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgcob add constraint (foreign key (gcob_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_r753_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatlco add constraint (foreign key (usua_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcatlco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcachqs add constraint (foreign key (chqs_cod_chra)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcachra constraint informix.fk_bcachqs_bcachra);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgrup add constraint (foreign key (grup_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcgrup);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgrup add constraint (foreign key (grup_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_afcgrup);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctgru add constraint (foreign key (tgru_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afctgru);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgcli add constraint (foreign key (gcli_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcgcli);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgcli add constraint (foreign key (gcli_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_afcgcli);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgcli add constraint (foreign key (gcli_cod_tgru)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctgru constraint informix.fk_afctgru_afcgcli);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgcli add constraint (foreign key (gcli_cod_grup)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcgrup constraint informix.fk_afcgrup_afcgcli);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadetd add constraint (foreign key (detd_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcacred_bcadetd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadetd add constraint (foreign key (detd_cod_rubc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcarubr constraint informix.fk_bcarubr_bcadetd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadetd add constraint (foreign key (detd_cod_divc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadivc constraint informix.fk_bcadivc_bcadetd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadetd add constraint (foreign key (detd_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcadetd);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadetd add constraint (foreign key (detd_usu_modi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcadetd1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaabog add constraint (foreign key (abog_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcaabog);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaabog add constraint (foreign key (abog_cod_rubr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcarubr constraint informix.fk_bcarubr_bcaabog);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgcab add constraint (foreign key (gcab_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcgcab);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgccr add constraint (foreign key (gccr_cod_gcab)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcgcab constraint informix.fk_afcgcab_afcgccr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgdco add constraint (foreign key (gdco_cod_esta)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcgtes constraint informix.fk_afcgtes_afcgdco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgdco add constraint (foreign key (gdco_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcgdco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgdco add constraint (foreign key (gdco_num_cred)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacred constraint informix.fk_bcacred_afcgdco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgdco add constraint (foreign key (gdco_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_afcgdco);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdrcp add constraint (foreign key (drcp_cod_mcpa)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcmcpa constraint informix.fk_afcmcpa_afcdrcp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdrcp add constraint (foreign key (drcp_cod_rubr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcarubr constraint informix.fk_bcarubr_afcdrcp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afclcos add constraint (foreign key (lcos_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afclcos);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctpdv add constraint (foreign key (tpdv_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afctpdv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcatcdv add constraint (foreign key (tcdv_cod_tpdv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctpdv constraint informix.fk_afctpdv_bcatcdv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcccdv add constraint (foreign key (ccdv_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcccdv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadpvi add constraint (foreign key (dpvi_cod_ccdv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcccdv constraint informix.fk_afcccdv_bcadpvi);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcttad add constraint (foreign key (ttad_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afccttad);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdpta add constraint (foreign key (dpta_cod_ttad)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcttad constraint informix.fk_afcttad_afcdpta);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaemdp add constraint (foreign key (emdp_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_bcaemdp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdisc add constraint (foreign key (disc_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcdisc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaempl add constraint (foreign key (empl_cod_disc)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcdisc constraint informix.fk_afcdisc_bcaempl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaempl add constraint (foreign key (empl_tfp_pago)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfpg constraint informix.fk_bcatfpg_bcaempl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctcem add constraint (foreign key (tcem_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afctcem);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaempl add constraint (foreign key (empl_cod_tcem)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctcem constraint informix.fk_afctcem_bcaempl);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcemof add constraint (foreign key (emof_cod_empl)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaempl constraint informix.fk_bcaempl_afcemof);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcemof add constraint (foreign key (emof_cod_ofic)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaofic constraint informix.fk_bcaofic_afcemof);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctres add constraint (foreign key (tres_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afctres);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclie add constraint (foreign key (clie_cod_tres)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctres constraint informix.fk_afctres_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcaclie add constraint (foreign key (clie_pai_resi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapais constraint informix.fk_bcapais_bcaclie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afclsms add constraint (foreign key (lsms_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afclsms);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afclsms add constraint (foreign key (lsms_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_afclsms);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afchdre add constraint (foreign key (hdre_cod_hreq)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afchreq constraint informix.fk_afchreq_afchdre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afchdre add constraint (foreign key (hdre_cod_htso)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afchtso constraint informix.fk_afchtso_afchdre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afchdre add constraint (foreign key (hdre_usu_hdre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afchdre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afchdre add constraint (foreign key (hdre_usu_fina)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afchdre1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgaul add constraint (foreign key (gaul_cod_dpfi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpfi constraint informix.fk_bcadpfi_afcgaul);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgaul add constraint (foreign key (gaul_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcgaul);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcgaul add constraint (foreign key (gaul_num_gtia)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcagtia constraint informix.fk_bcagtia_afcgaul);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadfcr add constraint (foreign key (dfcr_cod_ccre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaccre constraint informix.fk_bcadfcr_bcaccre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadfcr add constraint (foreign key (dfcr_cod_dtcr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadtcr constraint informix.fk_bcadfcr_bcadtcr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadfcr add constraint (foreign key (dfcr_cod_intv)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaintv constraint informix.fk_bcadfcr_bcaintv);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadfcr add constraint (foreign key (dfcr_cod_tamo)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatamo constraint informix.fk_bcadfcr_bcatamo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadfcr add constraint (foreign key (dfcr_cod_tcse)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcse constraint informix.fk_bcadfcr_bcatcse);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadfcr add constraint (foreign key (dfcr_cod_mone)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamone constraint informix.fk_bcadfcr_bcamone);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadfcr add constraint (foreign key (dfcr_cod_lcre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcalcre constraint informix.fk_bcadfcr_bcalcre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadfcr add constraint (foreign key (dfcr_cod_eope)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaeope constraint informix.fk_bcadfcr_bcaeope);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadfcr add constraint (foreign key (dfcr_cod_dcre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcdcre constraint informix.fk_bcadfcr_afcdcre);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcadfcr add constraint (foreign key (dfcr_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcadfcr_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctlnc add constraint (foreign key (tlnc_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afctlnc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctlnc add constraint (foreign key (tlnc_usu_envi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afctlnc1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afclimr add constraint (foreign key (limr_cod_dmon)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadmon constraint informix.fk_bcadmon_afclimr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afclimr add constraint (foreign key (limr_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afclimr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcprfa add constraint (foreign key (prfa_cod_grup)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcgrfa constraint informix.fk_afcgrfa_afcprfa);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcctrt add constraint (foreign key (ctrt_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcctrt);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdtrt add constraint (foreign key (dtrt_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcdtrt);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdtrt add constraint (foreign key (dtrt_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_bcatasi_afcdtrt);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctrtr add constraint (foreign key (trtr_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afctrtr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctrtr add constraint (foreign key (trtr_cod_cban)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcacban constraint informix.fk_bcacban_afctrtr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctrtr add constraint (foreign key (trtr_cod_dpvi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcadpvi constraint informix.fk_bcadpvi_afctrtr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctrtr add constraint (foreign key (trtr_cod_tran)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatran constraint informix.fk_bcatran_afctrtr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctrtr add constraint (foreign key (trtr_cod_tasi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatasi constraint informix.fk_bcatasi_afctrtr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctrtr add constraint (foreign key (trtr_usu_modi)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afctrtr1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctrtr add constraint (foreign key (trtr_cod_mban)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcamban constraint informix.fk_bcamban_afctrtr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctrtr add constraint (foreign key (trtr_cod_ctrt)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcctrt constraint informix.fk_afcctrt_afctrtr);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcprfa add constraint (foreign key (prfa_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcprfa);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctrfa add constraint (foreign key (trfa_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afctrfa);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctrfa add constraint (foreign key (trfa_cod_pape)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapape constraint informix.fk_bcapape_afctrfa);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctrfa add constraint (foreign key (trfa_pap_reve)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcapape constraint informix.fk_bcapape1_afctrfa);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctrfa add constraint (foreign key (trfa_cod_tfpg)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatfpg constraint informix.fk_bcatfpg_afctrfa);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afctrfa add constraint (foreign key (trfa_usu_reve)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua1_afctrfa);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afchomo add constraint (foreign key (homo_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afchomo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afclhom add constraint (foreign key (lhom_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afclhom);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcclho add constraint (foreign key (clho_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcclho);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afccore add constraint (foreign key (core_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afccore);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdcor add constraint (foreign key (dcor_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcdcor);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdcor add constraint (foreign key (dcor_cod_core)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afccore constraint informix.fk_afccore_afcdcor);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdrec add constraint (foreign key (drec_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcdrec);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdrec add constraint (foreign key (drec_cod_fptr)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcfptr constraint informix.fk_afcfptr_afcdrec);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdrec add constraint (foreign key (drec_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_afcdrec);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdrec add constraint (foreign key (drec_cod_loca)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcloca constraint informix.fk_afcloca_afcdrec);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdrec add constraint (foreign key (drec_cod_dcor)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcdcor constraint informix.fk_afcdcor_afcdrec);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdrec add constraint (foreign key (drec_cod_erec)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcerec constraint informix.fk_afcerec_afcdrec);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdrec add constraint (foreign key (drec_usu_reso)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcdrec1);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdreo add constraint (foreign key (dreo_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcdreo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdreo add constraint (foreign key (dreo_cod_drec)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcdrec constraint informix.fk_afcdrec_afcdreo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdreo add constraint (foreign key (dreo_cod_trre)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctrre constraint informix.fk_afctrre_afcdreo);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.bcacred add constraint (foreign key (cred_cod_tcse)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcatcse constraint informix.fk_bcacred_bcatcse);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afclpdp add constraint (foreign key (lpdp_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afclpdp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afclpdp add constraint (foreign key (lpdp_cod_clie)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcaclie constraint informix.fk_bcaclie_afclpdp);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table root.afccacf add constraint (foreign key (cacf_usu_modi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint root.fk_afccacf_bcausua);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afceduc add constraint (foreign key (educ_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afceduc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afceduc add constraint (foreign key (educ_cod_tedu)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afctedu constraint informix.fk_afctedu_afceduc);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcbals add constraint (foreign key (bals_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcbals);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afccump add constraint (foreign key (cump_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afccump);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdbal add constraint (foreign key (dbal_cod_bals)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afcbals constraint informix.fk_afcbals_afcdbal);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdbal add constraint (foreign key (dbal_cod_cump)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.afccump constraint informix.fk_afccump_afcdbal);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcdbal add constraint (foreign key (dbal_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcdbal);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('alter table informix.afcrbal add constraint (foreign key (rbal_cod_usua)
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('references informix.bcausua constraint informix.fk_bcausua_afcrbal);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcaopen insert on informix.bcaopen ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute function informix.sp_name_pc(nuevo.open_ses_id ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcaperf insert on informix.bcaperf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_opcion_perfil(nuevo.perf_cod_perf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcatdoc insert on informix.bcatdoc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_genera_tdoc(nuevo.tdoc_cod_tdoc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcamone insert on informix.bcamone ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_ins_pfijo(nuevo.mone_cod_mone ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.td_bcamone delete on informix.bcamone ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing old as anterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_del_pfijo(anterior.mone_cod_mone ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcapicn update of picn_val_picn ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcapicn referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_upd_picn(nuevo.picn_cod_picn ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcapago update of pago_ctr_pago ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcapago referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_recalculointeres(nuevo.pago_cod_pago ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcapaco insert on informix.bcapaco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_genera_prmcont(nuevo.paco_cod_paco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcaopci insert on informix.bcaopci ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_permiso_usuario(nuevo.opci_cod_opci ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcabanc insert on informix.bcabanc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_ins_defec(nuevo.banc_cod_banc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcadpvi update of dpvi_cod_eacd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcadpvi referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure
informix.sp_historial_inactivacion(anterior.dpvi_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcadpvi insert on informix.bcadpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure
informix.sp_tabla_pagos_deposito_vista(nuevo.dpvi_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.td_bcacaja delete on informix.bcacaja ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing old as anterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_actualiza_prm(anterior.caja_cod_tcar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcacaja insert on informix.bcacaja ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_actualiza_prm(nuevo.caja_cod_tcar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcacaja update of caja_cod_tcar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcacaja referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_actualiza_prm(nuevo.caja_cod_tcar ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcacont insert on informix.bcacont ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_genera_permiso(nuevo.cont_cod_cont ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcacomp insert on informix.bcacomp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_actualiza_tdoc(nuevo.comp_cod_tdoc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcaejer insert on informix.bcaejer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_genera_periodos(nuevo.ejer_cod_ejer ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcadchv update of dchv_est_actu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcadchv referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--se envia el c�digo de la transacci�n para validar que cuando es pago de
intereses')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--no se ejecute el sp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_act_saldos(nuevo.dchv_cod_mcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcamcdv insert on informix.bcamcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--se envia el c�digo de la transacci�n para validar que cuando es pago de
intereses')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--no se ejecute el sp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_calc_sald_dpvi(TODAY ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcamcdv update of mcdv_ctr_impr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcamcdv referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--se envia el c�digo de la transacci�n para validar que cuando es pago de
intereses')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--no se ejecute el sp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_act_sal_libr(nuevo.mcdv_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcalibr update of libr_sal_libr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcalibr referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_historial_posteo(anterior.libr_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcaoptr insert on informix.bcaoptr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_transac_usuario(nuevo.optr_cod_optr ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcaaper update of aper_ctr_opci ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcaaper referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_update_perm_usu(nuevo.aper_cod_perf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcaausu update of ausu_ctr_opci ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcaausu referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_update_tr_usu(nuevo.ausu_cod_usua ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcabene insert on informix.bcabene ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as newbene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_veri_bcabene(newbene.bene_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcabene update on informix.bcabene ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as newbene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_veri_bcabene(newbene.bene_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcancue insert on informix.bcancue ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_veri_digitos(nuevo.ncue_cod_ncue ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcancue update of ncue_num_digi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcancue referencing old as viejo new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_veri_digitos_u(nuevo.ncue_cod_ncue ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.td_bcancue delete on informix.bcancue ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing old as viejo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_veri_niveles(viejo.ncue_cod_ncue ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcadirb insert on informix.bcadirb ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- if nuevo.dirb_cod_rubc not in (1')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--- end if;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_historico_bcadirb(nuevo.dirb_cod_divc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcadirb update of dirb_val_dirb ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcadirb referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--se envia el c�digo de la transacci�n para validar que cuando es pago de
intereses')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--no se ejecute el sp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_historico_bcadirb(nuevo.dirb_cod_divc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcatasa update on informix.bcatasa ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing old as anterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_upd_tasa(anterior.tasa_cod_tasa ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcavpcn insert on informix.bcavpcn ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_ins_vpcn(nuevo.vpcn_cod_picn ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcavpcn update of vpcn_num_vpcn')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpcn_valor on informix.bcavpcn referencing old as anterior ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_upd_vpcn(nuevo.vpcn_cod_picn ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.td_bcavpcn delete on informix.bcavpcn ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing old as anterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_del_vpcn(anterior.vpcn_cod_dpvi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcaddte insert on informix.bcaddte ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--se envia el c�digo de la transacci�n para validar que cuando es pago de
intereses')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--no se ejecute el sp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_act_sal_disp(TODAY ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.td_bcatadv delete on informix.bcatadv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing old as anterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_upd_tadv(anterior.tadv_cod_tadv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcatadv update on informix.bcatadv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing old as anterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_upd_tadv(anterior.tadv_cod_tadv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcadcom update of dcom_may_dcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcadcom referencing old as ant new as post')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when (((post.dcom_may_dcom = 0. ) AND (ant.dcom_may_dcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('= 1. ) ) )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_mayorizar(ant.dcom_cod_dcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when (((post.dcom_may_dcom = 1. ) AND (ant.dcom_may_dcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('= 0. ) ) )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_mayorizar(post.dcom_cod_dcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcadcom insert on informix.bcadcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as post')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_mayorizar(post.dcom_cod_dcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcadcom_v update of dcom_valor on ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('informix.bcadcom referencing old as ant new as post')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when (((post.dcom_may_dcom != 0. ) AND (ant.dcom_may_dcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('= 1. ) ) )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_mayorizar(ant.dcom_cod_dcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when (((post.dcom_may_dcom = 1. ) AND (ant.dcom_may_dcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('!= 0. ) ) )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_mayorizar(post.dcom_cod_dcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.td_bcadcom delete on informix.bcadcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing old as post')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_mayorizar(post.dcom_cod_dcom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcadmba insert on informix.bcadmba ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_upd_sdct(nuevo.dmba_cod_dmba ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcacdco update of cdco_may_cdco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcacdco referencing old as ant new as post')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when (((post.cdco_may_cdco = 0. ) AND (ant.cdco_may_cdco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('= 1. ) ) )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_mayorizar_c(ant.cdco_cod_ccom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('when (((post.cdco_may_cdco = 1. ) AND (ant.cdco_may_cdco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('= 0. ) ) )')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_mayorizar_c(post.cdco_cod_ccom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.td_bcacdco delete on informix.bcacdco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing old as post')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_mayorizar_c(post.cdco_cod_ccom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcacdco insert on informix.bcacdco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as post')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_mayorizar_c(post.cdco_cod_ccom ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcaacti insert on informix.bcaacti ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_ins_acem(nuevo.acti_cod_acti ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcaacti update of acti_cod_empl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcaacti referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_upd_acem(nuevo.acti_cod_acti ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcaacti_est update of acti_cod_eafi ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcaacti referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_upd_aeac(nuevo.acti_cod_acti ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcaempl insert on informix.bcaempl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_nomina_empleadooficina(nuevo.empl_cod_empl
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcaempl update of empl_cod_ofic ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcaempl referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_nomina_empleadooficina(nuevo.empl_cod_empl
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.td_bcagara delete on informix.bcagara ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing old as anterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_del_gara(anterior.gara_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcagara update of gara_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcagara referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_ins_gara(nuevo.gara_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcagara insert on informix.bcagara ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_ins_gara(nuevo.gara_num_cred ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcaclie update on informix.bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute function informix.sp_veri_bcaclie(nuevo.clie_nat_juri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('.bcaclie.clie_nom_clie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcaclie insert on informix.bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute function informix.sp_veri_bcaclie(nuevo.clie_nat_juri ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('.bcaclie.clie_nom_clie);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcaclie_ofct update of clie_cod_ofct ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcaclie referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- execute function informix.sp_cambio_bcaclie(nuevo.clie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('insert into informix.afchofc (hofc_cod_hofc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hofc_cod_usua')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(0 ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcaclie1 update on informix.bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute function informix.sp_actualiza_cliente_peps(nuevo.clie_cod_clie
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('.bcaclie.clie_ban_peps);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcaclie1 insert on informix.bcaclie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute function informix.sp_actualiza_cliente_peps(nuevo.clie_cod_clie
')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('.bcaclie.clie_ban_peps);')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcaclie2 update of clie_cod_tcli ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcaclie referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_cambio_tclie(nuevo.clie_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcaclie3 update of clie_cod_tvin ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcaclie referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_cambio_tvinc(nuevo.clie_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_afcconf insert on informix.afcconf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('-- actualiza ingreso de socio ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_actu_ingr_conf(nuevo.conf_va1_conf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_afcminv insert on informix.afcminv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_calc_num_cost(nuevo.minv_cod_inve ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_afcdmco insert on informix.afcdmco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_saldo_cta_cobrar(nuevo.dmco_val_dmco ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_afcdmcp insert on informix.afcdmcp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_saldo_cta_pagar(nuevo.dmcp_val_dmcp ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcasoci update of soci_ban_soci ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcasoci referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_logaccesoportalweb(nuevo.soci_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_afclces insert on informix.afclces ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_actualiza_logestado(nuevo.lces_cod_clie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_afcdagc insert on informix.afcdagc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_actualiza_anexo(nuevo.dagc_cod_anrl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_afcdrie insert on informix.afcdrie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--se envia el c�digo de la transacci�n para validar que cuando es pago de
intereses')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--no se ejecute el sp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure
informix.sp_actualiza_ingresos_egresos(nuevo.drie_fec_actu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_afcdrie update on informix.afcdrie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--se envia el c�digo de la transacci�n para validar que cuando es pago de
intereses')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--no se ejecute el sp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure
informix.sp_actualiza_ingresos_egresos_act(nuevo.drie_fec_actu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.td_afcdrie delete on informix.afcdrie ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing old as anterior')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--se envia el c�digo de la transacci�n para validar que cuando es pago de
intereses')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--no se ejecute el sp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure
informix.sp_actualiza_ingresos_egresos_act(anterior.drie_fec_actu ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcatcdv update of tcdv_aho_mini ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcatcdv referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_upd_tcdv(nuevo.tcdv_cod_tcdv ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcacoop update of coop_sib_coop ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcacoop referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_update_bcacoop(nuevo.coop_sib_coop ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcausua insert on informix.bcausua ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_perfil_usuario(nuevo.usua_cod_usua ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcausua update of usua_cod_perf ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcausua referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_update_perf_usu(nuevo.usua_cod_usua ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcausua_pass update of usua_passwd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcausua referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_usua_passwd(nuevo.usua_cod_usua ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_afcgcli insert on informix.afcgcli ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_verificacion_afcgrup(nuevo.gcli_cod_tgru ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_afcgcli update of gcli_cod_tgru ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.afcgcli referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure informix.sp_verificacion_afcgrup(nuevo.gcli_cod_tgru ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_bcadetd insert on informix.bcadetd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure
informix.sp_cartera_carga_rubros_ctascobrar(nuevo.detd_cod_divc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcadetd update of detd_val_detd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcadetd referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure
informix.sp_cartera_carga_rubros_ctascobrar(nuevo.detd_cod_divc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_bcadetd_ban update of detd_ban_detd ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.bcadetd referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure
informix.sp_cartera_carga_rubros_ctascobrar(nuevo.detd_cod_divc ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.td_afcemof delete on informix.afcemof ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing old as elimina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure
informix.sp_nomina_eliminaempleadooficina(elimina.emof_cod_empl ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('));')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.tu_afchomo update of homo_fec_carg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('on informix.afchomo referencing old as anterior new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--se envia el c�digo de la transacci�n para validar que cuando es pago de
intereses')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('--no se ejecute el sp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure
informix.sp_actualiza_logs_afchomo(anterior.homo_fec_carg ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('create trigger informix.ti_afcdreco insert on informix.afcdreo ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('referencing new as nuevo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('for each row')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('(')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('execute procedure
informix.sp_serviciosadicionales_cambioestadoreclamo(nuevo.dreo_cod_drec ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcauid (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('auid_cod_auid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcbals (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bals_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcband (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('band_cod_band) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcbcos (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bcos_cod_bcos) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afccacf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cacf_cod_cacf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afccalr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calr_cod_calr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afccatc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catc_cod_catc) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcccdv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccdv_cod_ccdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcccxc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccxc_est_calf) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afccega (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cega_cod_cega')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afccocu (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cocu_cod_cocu) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afccore (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('core_cod_core')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afccotr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cotr_cod_cotr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afccpof (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpof_cta_cobr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afccrce (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crce_cod_crce')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crce_num_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afccrie (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crie_cod_crie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcctar (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctar_cod_ctar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table afcctar (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctar_ban_ctar) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcctrt (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctrt_cod_ctrt')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcctvc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctvc_cod_ctvc) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcctvc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctvc_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afccump (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cump_cod_cump')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdbal (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbal_cod_bals')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdcal (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_num_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table afcdcal (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcal_cod_ediv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdcam (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcam_cod_dcam')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdccr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dccr_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table afcdccr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dccr_fec_fina')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdcor (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcor_cod_core')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdcre (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcre_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcddep (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddep_cod_ddep) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcddep (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddep_cod_mcdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcddic (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_num_divc) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table afcddic (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddic_fec_calf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdicl (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dicl_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdidv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('didv_cod_didv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdidv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('didv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table afcdidv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('didv_num_didv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdisc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('disc_cod_disc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdmco (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmco_cod_mcco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdmcp (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmcp_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdrie (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drie_cod_drie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdrie (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drie_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdsoc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsoc_cod_dsoc) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdsoc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsoc_cod_socr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdtlc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlc_cod_dtlc) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdtlv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtlv_cod_dcom')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcdtrt (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtrt_cod_dtrt')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcectr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ectr_cod_ectr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcemof (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emof_cod_emof')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcerec (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('erec_cod_erec) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcescl (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('escl_cod_escl) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcescp (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('escp_cod_escp) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcfptr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fptr_cod_fptr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table afcfptr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fptr_ban_fptr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcfval (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cod_fval) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcfval_103 (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fval_cod_fval) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcgaul (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gaul_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcgcab (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcab_cod_gcab) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcgcab (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcab_cod_usua) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcgccr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gccr_cod_gcab')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcgcob (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcob_cod_gcob')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table afcgcob (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gcob_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcgdco (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_cod_gdco) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcgdco (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gdco_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcgrfa (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grfa_cod_grfa) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcgtbi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtbi_cod_gtbi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcgtes (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtes_cod_gtes) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcgtti (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtti_cod_gtti) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afchdpf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_cod_hdpf) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afchdpf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hdpf_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afchere (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('here_cod_here) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afchicr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hicr_cod_hicr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afchidv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hidv_cod_hidv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afchofc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('hofc_cod_hofc) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afchtso (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('htso_cod_htso')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afclimr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('limr_cod_dmon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcliqe (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('liqe_cod_liqe) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcloca (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('loca_cod_loca) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afclsms (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lsms_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcmcco (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcco_cod_prdr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcmcpa (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_mcpa) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcmcpa (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcpa_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcminv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_cod_edpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('minv_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcnutc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('nutc_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcpotv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('potv_cod_potv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcprfa (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_cod_grup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table afcprfa (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prfa_ban_esta) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcprof (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prof_cod_prof) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcprso (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prso_cod_prms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcpsms (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_cod_psms')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table afcpsms (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('psms_cod_plan')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcrbal (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbal_cod_rbal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcrbal (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rbal_cod_usua) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcrfpe (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_cod_rfpe) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcrfpe (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rfpe_cli_codi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcriec (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('riec_cod_ineg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcsacr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sacr_cod_sacr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcsctd (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_cod_ctas) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table afcsctd (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sctd_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcstar (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('star_cod_star')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcstar (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('star_cod_ttar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table afcstar (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('star_ban_star) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctcem (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcem_cod_tcem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctcom (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcom_cod_tcom) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctcsr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcsr_cod_tcsr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctdeu (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdeu_cod_tdeu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctedu (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tedu_cod_tedu) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctemi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('temi_cod_temi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctgru (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgru_cod_tgru')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctinv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tinv_cod_tinv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctope (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tope_cod_tope) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctpdv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpdv_cod_tpdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctpsr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpsr_cod_tpsr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctres (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tres_cod_tres')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctrfa (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trfa_usu_reve) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctrla (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trla_cod_trla) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctrre (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trre_cod_trre) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctrtr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_cban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trtr_cod_tran')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctsco (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsco_cod_tsco) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctsoc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsoc_cod_tsoc) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcttad (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttad_cod_ttad')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afcttar (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttar_cod_ttar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table afcttar (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttar_ban_ttar) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table afctviv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tviv_cod_tviv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaabdv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_abdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('abdv_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaacer (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acer_cod_acer) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaacli (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('acli_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaagar (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('agar_cod_agar) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaanme (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anme_num_anio) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaanpf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anpf_cod_dpfi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaaper (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('aper_cod_opci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaausu (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ausu_cod_opci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaavpic (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('avpic_cod_dpvi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcabanc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('banc_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcabbdd (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bbdd_cod_bbdd) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcabene (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('bene_cod_bene')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacaja (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('caja_cod_tcar')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacalf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_fec_calf) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcacalf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('calf_num_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacamb (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('camb_cod_camb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcacamb (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('camb_val_camb) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacarg (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('carg_cod_carg) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacarg (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('carg_cod_tica) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacatr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('catr_cod_catr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacban (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cban_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaccco (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_ctas) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaccco (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccco_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaccon (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ctas) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaccon (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcaccon (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccon_cod_ccon) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaccre (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ccre_cod_ccre) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacfam (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_cod_cfam) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacfam (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcacfam (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cfam_ide_cfam) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacgti (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cgti_cod_cgti) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcachqs (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chqs_cod_chqs) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcachqs (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chqs_cod_chra')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcachra (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('chra_cod_cban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaciud (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciud_cod_ciud) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaciud (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ciud_cod_prov) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaclib (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clib_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcaclib (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clib_num_libr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaclie (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_ape_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_cod_tide')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_pai_resi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcaclie (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clie_nom_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaclna (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaclna (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('clna_cod_eciv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacocr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cocr_cod_comi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacomi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comi_cod_comi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcacomi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comi_est_comi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacomp (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_cod_comp) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacomp (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('comp_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaconc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('conc_cod_cban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacore (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('core_cod_core) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacoti (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('coti_cod_coti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacous (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cous_cod_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacpar (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpar_cod_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacpcr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cpcr_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacrau (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crau_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacred (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_num_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacred (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_eope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_tamo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('cred_cod_tope')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacrpg (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('crpg_cod_gara) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcacsal (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('csal_cod_csal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcactap (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ctap_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadbau (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbau_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadbpf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dbpf_cod_depg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadchv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_cod_dchv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadchv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcadchv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dchv_num_ctab')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadcom (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dcom_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaddep (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddep_cod_ddep')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaddte (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ddte_cod_mcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadecb (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decb_cod_flib) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadecl (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('decl_cod_clna')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadeef (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deef_cod_deef) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadeef (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deef_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadefe (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('defe_cod_defe) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadefe (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('defe_cod_camb')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadeip (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deip_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcadeip (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('deip_fec_pape) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadepa (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depa_cod_depa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadepe (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depe_cod_depe')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadepg (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depg_cod_depg) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadepg (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('depg_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadetd (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('detd_cod_detd) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadetd (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('detd_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadfcd (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcd_cod_dfcd) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadfcd (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfcd_cod_fcdi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadfes (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfes_anio) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcadfes (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dfes_fec_dfes) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadiad (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('diad_cod_diad) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcading (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ding_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadirb (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dirb_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadivc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_cod_divc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcadivc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('divc_num_divc) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadmba (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmba_cod_dmba) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadmba (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmba_cod_mban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadmon (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dmon_cod_dmon) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadoem (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('doem_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadpap (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpap_num_dpap) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadpap (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpap_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadpfi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_dpfi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadpfi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpfi_cod_ofic) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadpvi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_dpvi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadpvi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_ccdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dpvi_cod_tfir')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadrtc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtc_cod_drtc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadrtr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('drtr_cod_drtr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadrtr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_cod_refi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadsem (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dsem_cod_dsem) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadtcr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtcr_cod_dtcr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadtot (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtot_cod_dtot')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadtra (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtra_cod_dtra) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcadtra (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dtra_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaeacd (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eacd_cod_eacd) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaeafi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eafi_cod_eafi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaeanr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eanr_cod_eanr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaecba (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ecba_cod_ecba) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaeciv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eciv_cod_eciv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaecre (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ecre_cod_ecre) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaediv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ediv_cod_ediv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaedpf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('edpf_cod_edpf) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaeesf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eesf_cod_eesf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaefba (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('efba_cod_efba) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaefba (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('efba_cod_banc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaegch (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('egch_cod_egch) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaejer (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ejer_cod_cont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcaejer (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ejer_ani_ejer) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaejui (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ejui_cod_ejui) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaemdp (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emdp_cod_depa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('emdp_cod_usua) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaempl (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_cod_carg')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('empl_cod_taud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaeope (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('eope_cod_eope) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaereg (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ereg_cod_ereg) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaerro (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('erro_cod_bbdd) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcaerro (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('erro_cod_erro) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaesac (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esac_cod_esac) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaesep (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esep_cod_esep) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaesfe (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esfe_cod_esfe) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaesol (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esol_cod_esol) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaesrf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('esrf_cod_esrf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcafadv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fadv_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcafcdi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fcdi_cod_fcdi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcafcin (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fcin_cod_fcin) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaffin (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ffin_cod_ffin) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaflib (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('flib_cod_flib')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaform (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fomr_cod_tfor')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcafppf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fppf_cod_fppf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcafpsd (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fpsd_cod_fpsd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcafret (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fret_cod_fret) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcafsal (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fsal_cod_fsal) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcafsal (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fsal_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcafxtc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('fxtc_cod_flib')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcagara (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gara_cod_gara) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcagara (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gara_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcagbie (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gbie_cod_gtbi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcagpre (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gpre_cod_sect')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcagrup (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grup_cod_grup) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcagtcr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtcr_num_cred')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcagtia (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtia_num_gtia) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcagtia (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('gtia_cod_cgti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaindi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('indi_cod_indi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaineg (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ineg_cod_ineg) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaintr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('intr_cod_intr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaintv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('intv_cod_intv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaiope (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('iope_cod_iope) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcajcop (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jcop_cod_dsem')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcajorn (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('jorn_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcalcre (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('lcre_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcalibr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('libr_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcamban (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mban_cod_cban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcamcdv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcamcdv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mcdv_cod_orec) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcamdep (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mdep_cod_mdep) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcameac (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('meac_cod_tcdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcameac (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('meac_cod_meac) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcamenu (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('menu_cod_menu) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcamese (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mese_cod_mese) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcamlbr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mlbr_cod_mlbr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcamodu (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('modu_cod_grup')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcamonc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('monc_cod_monc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcamont (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mont_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcanatu (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('natu_cod_natu) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcancue (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ncue_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcandoc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ndoc_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcanoti (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('noti_cod_noti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaobcr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obcr_cod_obcr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaobcr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('obcr_num_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaocu1 (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu1_cod_ocu1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaocu2 (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu2_cod_ocu2) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaocu2 (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocu2_cod_ocu1) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaocup (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocup_cod_ocup) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaocup (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ocup_cod_ocu2')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaoffa (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('offa_cod_esrf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaofic (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofic_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaofus (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofus_cod_ofic')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcaofus (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ofus_cod_usua) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaooem (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ooem_cod_ooem) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaopci (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opci_cod_opci) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaopci (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opci_cod_menu')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaopen (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('open_cod_open')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcaopen (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('open_des_open) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaoptr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('optr_cod_opci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaordc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ordc_cod_dcom) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcaordc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ordc_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaorec (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orec_cod_chqs')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaorig (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('orig_cod_orig) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaotcl (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dotr_cod_pape')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcaotcl (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('dotr_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaottr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ottr_cod_pape) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaottr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ottr_cod_caja) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcaottr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ottr_cod_clie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapaca (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('paca_cod_ccon')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapaco (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('paco_cod_paco) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapago (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pago_cod_pago) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapais (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pais_cod_pais) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapape (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_pape) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapape (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pape_cod_ediv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapasd (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pasd_cod_pasd) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapcal (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pcal_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcapcal (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pcal_est_calf) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapdco (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdco_cod_comp')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapddb (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pddb_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapdte (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pdte_cod_caja')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaperf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('perf_cod_perf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaperi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('peri_cod_ejer')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapgpf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_pgpf) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapgpf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_cod_dpfi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcapgpf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgpf_num_pgpf) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapgre (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgre_cod_pgre) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapgre (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pgre_num_cred) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapibi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pibi_cod_pibi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapice (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pice_cod_pice) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapicn (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('picn_cod_picn) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapiva (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('piva_cod_secu) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaplaz (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plaz_cod_mone')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaplcr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('plcr_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcapott (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pott_cod_pott) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaprcb (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prcb_cod_prcb) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaprdi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdi_cod_prms) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcaprdi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdi_cod_prdi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaprdr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_cod_prdr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaprdr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdr_cod_tpco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaprdv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prdv_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaprms (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prms_cod_prms) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaprms (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prms_cod_modu) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaprov (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prov_cod_pais')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaprpf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prpf_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcaprpf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('prpf_fec_prpf) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcarcla (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rcla_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcarefi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_cod_refi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcarefi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('refi_cod_pgpf')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaremq (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('remq_cod_remq) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcarlab (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rlab_cod_rlab) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcarsib (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_cod_rsib) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcarsib (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_sib_rsib) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcarsib (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rsib_cod_modu) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcarubr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('rubr_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcasact (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sact_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcasald (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sald_fec_sald) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcasald (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sald_cod_dpvi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcasdct (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sdct_cod_cban')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcasect (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sect_cod_sect) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcasect (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sect_cod_ciud')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcasetr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('setr_cod_setr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcasexo (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('sexo_cod_sexo) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcasoci (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('soci_act_soci')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcasocr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_socr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcasocr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_intv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('socr_cod_tgar) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcastmp (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('stmp_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcastmp (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('stmp_cod_didv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcasuco (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('suco_cod_suco) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatacr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tacr_cod_tacr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatact (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tact_cod_tact) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatadv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tadv_cod_tadv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatafo (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tafo_cod_tafo')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatamo (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tamo_cod_tamo) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatanx (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tanx_cod_tanx) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatasa (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasa_cod_mont')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatasc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasc_cod_ccre')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatasi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tasi_cod_tasi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcataud (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('taud_cod_taud) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatben (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tben_cod_tben')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatcap (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcap_cod_tcap) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatcar (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcar_cod_tcar) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatcba (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcba_cod_tcba) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatcdv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cco_acti')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_fcin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcdv_cod_ttpf) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatcfa (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcfa_cod_tcfa')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatcli (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcli_cod_tcli) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatcre (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcre_cod_tcre) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatcse (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcse_cod_fpsd')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatcue (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tcue_cod_tcue) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatdep (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdep_cod_tdep) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatdin (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdin_cod_tdin) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatdoc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdoc_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatdpd (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tdpd_cod_tdpd) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatele (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tele_cod_tele) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatele (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tele_cod_clie')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatese (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tese_cod_tese) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatfir (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tfir_cod_tfir) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatfor (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tfor_cod_tfor) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatfpg (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tfpg_cod_tfpg) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatgar (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tgar_cod_tgar) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcathdv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('thdv_cod_tadv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcathdv (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('thdv_fec_thdv) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatica (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tica_cod_tica) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatide (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tide_cod_tide) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatifi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tifi_cod_tifi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatiin (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tiin_cod_tiin')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatind (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tind_cod_tind) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatlco (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('pice_cod_pice')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpco_cod_tpco')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatlib (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlib_cod_tlib) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatlve (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tlve_cod_pice')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatman (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tman_cod_tman) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatmba (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tmba_cod_tmba) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatndd (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tndd_usu_modi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatofi (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tofi_cod_tofi) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatpco (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpco_cod_tpco) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatpie (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tpie_cod_tpie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatprm (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tprm_cod_tprm) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatptr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tptr_cod_tptr) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatran (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tran_cod_tdoc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatrcj (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trcj_cod_ctas')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatsec (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsec_cod_tsec) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatsie (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tsie_cod_tsie) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcattel (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttel_cod_ttel) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcattpf (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ttpf_cod_ttpf) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatvin (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tvin_cod_tvin) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcatxcp (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('txcp_cod_tcdv')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcaustr (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('ustr_cod_optr')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcausua (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('usua_cod_empl')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcautel (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('utel_cod_utel) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcavaft (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vaft_cod_vaft) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcavpcn (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpcn_cod_dpvi')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table bcavpcn (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vpcn_fec_inic) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcavprm (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vprm_cod_prms) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table bcavprm (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('vprm_cod_tprm) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 1.00000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table ccon (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('id) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table d01saldos (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('mes) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table d01saldos (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('anio')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysaggregates (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('aggid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysaggregates (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('owner) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysams (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('am_id')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysams (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('am_owner) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysattrtypes (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('extended_id')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysattrtypes (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('seqno) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysblobs (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tabid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysblobs (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('colno) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table syscasts (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('argument_type')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table syscasts (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('argument_xid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table syschecks (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('constrid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table syschecks (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('seqno')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table syscolauth (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tabid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table syscolauth (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('colno')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table syscoldepend (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('constrid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table syscoldepend (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('colno) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table syscolumns (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('extended_id')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table syscolumns (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('colno) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysconstraints (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('constrid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysconstraints (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('owner) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysdefaults (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tabid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysdefaults (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('class')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysdepend (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('btabid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysdistrib (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tabid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysdistrib (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('colno')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysfragments (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tabid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysfragments (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('evalpos')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysindices (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('idxname')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysindices (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('owner) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table syslangauth (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('langid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table syslangauth (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grantee')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysobjstate (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('objtype')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysobjstate (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('name')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysopclasses (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('opclassid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysopclasses (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('owner) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysprocauth (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('procid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysprocauth (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grantee')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysprocbody (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('procid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysprocbody (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('datakey')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysproccolumns (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('procid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysproccolumns (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('paramid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysprocedures (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('procid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysprocedures (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('isproc')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysprocplan (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('procid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysprocplan (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('datakey')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysreferences (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('constrid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysroutinelangs (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('langname) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table systabauth (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tabid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table systabauth (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('grantee')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table systables (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tabid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table systables (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('owner) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table systrigbody (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('trigid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table systrigbody (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('datakey')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table systriggers (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tabid')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table systriggers (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('owner) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysusers (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('username) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysviews (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('tabid) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysviews (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('seqno) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysxtddesc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('extended_id) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysxtddesc (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('seqno) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table sysxtdtypes (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('extended_id')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics medium for table sysxtdtypes (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('owner')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 2.00000 0.95000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table track_01 (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_01_cod) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table track_02 (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_02_cod) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('update statistics high for table track_03 (')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('track_03_cod) ')
GO
INSERT INTO informix.sysaggregates(name)
VALUES('resolution 0.50000 ;')
GO

You might also like