Changes between Version 14 and Version 15 of carga_movimientos


Ignore:
Timestamp:
06/06/12 17:50:19 (13 years ago)
Author:
Luis Carlos
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • carga_movimientos

    v14 v15  
    245245{{{
    246246
    247           UPDATE CN_TABLE_VIG_SEQ
    248           SET SEQ = NVL( (SELECT max(ID_DOCUMENTO) FROM CN_DOCUMENTO where ID_VIGENCIA = 2010 AND ID_CIA=1  ),0 )
    249           WHERE NOM_ENTIDAD='CN_DOCUMENTO' AND ID_CIA=1 and ID_VIGENCIA = 2010
    250 
    251           go
    252           UPDATE CN_TABLE_VIG_SEQ
    253           SET SEQ = NVL( (SELECT max(ID_DOCUMENTO) FROM CN_DOCUMENTO where ID_VIGENCIA = 2011 AND ID_CIA=1  ),0 )
    254           WHERE NOM_ENTIDAD='CN_DOCUMENTO' AND ID_CIA=1 and ID_VIGENCIA = 2011
    255           go
    256           UPDATE CN_TABLE_VIG_SEQ
    257           SET SEQ = NVL( (SELECT max(ID_CAD) FROM CN_CONTROL_CAD where ID_VIGENCIA = 2010 AND ID_CIA=1  ),0 )
    258           WHERE NOM_ENTIDAD='CN_CONTROL_CAD' AND ID_CIA=1 and ID_VIGENCIA = 2010
    259           go
    260           UPDATE CN_TABLE_VIG_SEQ
    261           SET SEQ = NVL( (SELECT max(ID_CAD) FROM CN_CONTROL_CAD where ID_VIGENCIA = 2011 AND ID_CIA=1  ),0 )
    262           WHERE NOM_ENTIDAD='CN_CONTROL_CAD' AND ID_CIA=1 and ID_VIGENCIA = 2011
    263           go
    264           UPDATE CN_TABLE_VIG_SEQ
    265           SET SEQ = NVL( (SELECT max(ID_MOV_CONT) FROM CN_MOVIMIENTO_CONTABLE where ID_VIGENCIA = 2010 AND ID_CIA=1  ),0 )
    266           WHERE NOM_ENTIDAD='CN_MOVIMIENTO_CONTABLE' AND ID_CIA=1 and ID_VIGENCIA = 2010
    267 
    268           go
    269           UPDATE CN_TABLE_VIG_SEQ
    270           SET SEQ = NVL( (SELECT max(ID_MOV_CONT) FROM CN_MOVIMIENTO_CONTABLE where ID_VIGENCIA = 2011 AND ID_CIA=1  ),0 )
    271           WHERE NOM_ENTIDAD='CN_MOVIMIENTO_CONTABLE' AND ID_CIA=1 and ID_VIGENCIA = 2011
     247UPDATE CN_TABLE_VIG_SEQ
     248set seq = nvl( (select max(id_documento) from cn_documento where id_vigencia = 2010 and id_cia=1  ),0 )
     249WHERE NOM_ENTIDAD='CN_DOCUMENTO' AND ID_CIA=1 and ID_VIGENCIA = 2010;
     250
     251UPDATE CN_TABLE_VIG_SEQ
     252set seq = nvl( (select max(id_cad) from cn_control_cad where id_vigencia = 2010 and id_cia=1  ),0 )
     253WHERE NOM_ENTIDAD='CN_CONTROL_CAD' AND ID_CIA=1 and ID_VIGENCIA = 2010;
     254
     255UPDATE CN_TABLE_VIG_SEQ
     256set seq = nvl( (select max(id_mov_cont) from cn_movimiento_contable where id_vigencia = 2010 and id_cia=1  ),0 )
     257WHERE NOM_ENTIDAD='CN_MOVIMIENTO_CONTABLE' AND ID_CIA=1 and ID_VIGENCIA = 2010;
     258
     259UPDATE CN_TABLE_VIG_SEQ
     260set seq = nvl( (select max(id_documento) from cn_documento where id_vigencia = 2011 and id_cia=1  ),0 )
     261WHERE NOM_ENTIDAD='CN_DOCUMENTO' AND ID_CIA=1 and ID_VIGENCIA = 2011;
     262
     263UPDATE CN_TABLE_VIG_SEQ
     264SET SEQ = NVL( (SELECT max(ID_CAD) FROM CN_CONTROL_CAD where ID_VIGENCIA = 2011 AND ID_CIA=1  ),0 )
     265WHERE NOM_ENTIDAD='CN_CONTROL_CAD' AND ID_CIA=1 and ID_VIGENCIA = 2011;
     266
     267UPDATE CN_TABLE_VIG_SEQ
     268set seq = nvl( (select max(id_mov_cont) from cn_movimiento_contable where id_vigencia = 2011 and id_cia=1  ),0 )
     269WHERE NOM_ENTIDAD='CN_MOVIMIENTO_CONTABLE' AND ID_CIA=1 and ID_VIGENCIA = 2011;
     270
     271UPDATE CN_TABLE_VIG_SEQ
     272set seq = nvl( (select max(id_documento) from cn_documento where id_vigencia = 2012 and id_cia=1  ),0 )
     273WHERE NOM_ENTIDAD='CN_DOCUMENTO' AND ID_CIA=1 and ID_VIGENCIA = 2012;
     274
     275UPDATE CN_TABLE_VIG_SEQ
     276SET SEQ = NVL( (SELECT max(ID_CAD) FROM CN_CONTROL_CAD where ID_VIGENCIA = 2012 AND ID_CIA=1  ),0 )
     277WHERE NOM_ENTIDAD='CN_CONTROL_CAD' AND ID_CIA=1 and ID_VIGENCIA = 2012;
     278
     279UPDATE CN_TABLE_VIG_SEQ
     280set seq = nvl( (select max(id_mov_cont) from cn_movimiento_contable where id_vigencia = 2012 and id_cia=1  ),0 )
     281WHERE NOM_ENTIDAD='CN_MOVIMIENTO_CONTABLE' AND ID_CIA=1 and ID_VIGENCIA = 2012;
    272282
    273283}}}