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 |
| 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 | UPDATE CN_TABLE_VIG_SEQ |
| 252 | set seq = nvl( (select max(id_cad) from cn_control_cad where id_vigencia = 2010 and id_cia=1 ),0 ) |
| 253 | WHERE NOM_ENTIDAD='CN_CONTROL_CAD' AND ID_CIA=1 and ID_VIGENCIA = 2010; |
| 254 | |
| 255 | UPDATE CN_TABLE_VIG_SEQ |
| 256 | set seq = nvl( (select max(id_mov_cont) from cn_movimiento_contable where id_vigencia = 2010 and id_cia=1 ),0 ) |
| 257 | WHERE NOM_ENTIDAD='CN_MOVIMIENTO_CONTABLE' AND ID_CIA=1 and ID_VIGENCIA = 2010; |
| 258 | |
| 259 | UPDATE CN_TABLE_VIG_SEQ |
| 260 | set seq = nvl( (select max(id_documento) from cn_documento where id_vigencia = 2011 and id_cia=1 ),0 ) |
| 261 | WHERE NOM_ENTIDAD='CN_DOCUMENTO' AND ID_CIA=1 and ID_VIGENCIA = 2011; |
| 262 | |
| 263 | UPDATE CN_TABLE_VIG_SEQ |
| 264 | SET SEQ = NVL( (SELECT max(ID_CAD) FROM CN_CONTROL_CAD where ID_VIGENCIA = 2011 AND ID_CIA=1 ),0 ) |
| 265 | WHERE NOM_ENTIDAD='CN_CONTROL_CAD' AND ID_CIA=1 and ID_VIGENCIA = 2011; |
| 266 | |
| 267 | UPDATE CN_TABLE_VIG_SEQ |
| 268 | set seq = nvl( (select max(id_mov_cont) from cn_movimiento_contable where id_vigencia = 2011 and id_cia=1 ),0 ) |
| 269 | WHERE NOM_ENTIDAD='CN_MOVIMIENTO_CONTABLE' AND ID_CIA=1 and ID_VIGENCIA = 2011; |
| 270 | |
| 271 | UPDATE CN_TABLE_VIG_SEQ |
| 272 | set seq = nvl( (select max(id_documento) from cn_documento where id_vigencia = 2012 and id_cia=1 ),0 ) |
| 273 | WHERE NOM_ENTIDAD='CN_DOCUMENTO' AND ID_CIA=1 and ID_VIGENCIA = 2012; |
| 274 | |
| 275 | UPDATE CN_TABLE_VIG_SEQ |
| 276 | SET SEQ = NVL( (SELECT max(ID_CAD) FROM CN_CONTROL_CAD where ID_VIGENCIA = 2012 AND ID_CIA=1 ),0 ) |
| 277 | WHERE NOM_ENTIDAD='CN_CONTROL_CAD' AND ID_CIA=1 and ID_VIGENCIA = 2012; |
| 278 | |
| 279 | UPDATE CN_TABLE_VIG_SEQ |
| 280 | set seq = nvl( (select max(id_mov_cont) from cn_movimiento_contable where id_vigencia = 2012 and id_cia=1 ),0 ) |
| 281 | WHERE NOM_ENTIDAD='CN_MOVIMIENTO_CONTABLE' AND ID_CIA=1 and ID_VIGENCIA = 2012; |