165 | | {{{ |
| 165 | Tabla CN_TABLE_SEQ |
| 166 | |
| 167 | {{{ |
| 168 | |
| 169 | UPDATE CN_TABLE_SEQ |
| 170 | SET SEQ = NVL((SELECT max(ID_CENTRO_COSTO) FROM CN_CENTRO_COSTO),0) |
| 171 | WHERE NOM_ENTIDAD='CN_CENTRO_COSTO' AND ID_CIA=1 |
| 172 | go |
| 173 | UPDATE CN_TABLE_SEQ |
| 174 | SET SEQ = NVL((SELECT max(ID_SUB_CENTRO_COSTO) FROM CN_SUB_CENTRO_COSTO),0) |
| 175 | WHERE NOM_ENTIDAD='CN_SUB_CENTRO_COSTO' AND ID_CIA=1 |
| 176 | go |
| 177 | UPDATE CN_TABLE_SEQ |
| 178 | SET SEQ = NVL((SELECT max(ID_CONTROL_PERIODO) FROM CN_CONTROL_PERIODO),0) |
| 179 | WHERE NOM_ENTIDAD='CN_CONTROL_PERIODO' AND ID_CIA=1 |
| 180 | |
| 181 | go |
| 182 | UPDATE CN_TABLE_SEQ |
| 183 | SET SEQ = NVL((SELECT max(ID_GRUPO_CUENTA) FROM CN_GRUPO_CUENTA),0) |
| 184 | WHERE NOM_ENTIDAD='CN_GRUPO_CUENTA' AND ID_CIA=1 |
| 185 | |
| 186 | go |
| 187 | UPDATE CN_TABLE_SEQ |
| 188 | SET SEQ = NVL((SELECT max(ID_CLASE_CUENTA) FROM CN_CLASE_CUENTA),0) |
| 189 | WHERE NOM_ENTIDAD='CN_CLASE_CUENTA' AND ID_CIA=1 |
| 190 | |
| 191 | go |
| 192 | UPDATE CN_TABLE_SEQ |
| 193 | SET SEQ = NVL((SELECT max(ID_CUENTA_MAYOR) FROM CN_CUENTA_MAYOR),0) |
| 194 | WHERE NOM_ENTIDAD='CN_CUENTA_MAYOR' AND ID_CIA=1 |
| 195 | |
| 196 | go |
| 197 | UPDATE CN_TABLE_SEQ |
| 198 | SET SEQ = NVL((SELECT max(ID_) FROM CN_),0) |
| 199 | WHERE NOM_ENTIDAD='CN_' AND ID_CIA=1 |
| 200 | |
| 201 | go |
| 202 | UPDATE CN_TABLE_SEQ |
| 203 | SET SEQ = NVL((SELECT max(ID_) FROM CN_),0) |
| 204 | WHERE NOM_ENTIDAD='CN_' AND ID_CIA=1 |
| 205 | |
| 206 | |
| 207 | go |
| 208 | UPDATE CN_TABLE_SEQ |
| 209 | SET SEQ = NVL((SELECT max(ID_CEN_OP) FROM CN_CENTRO_OPERACION),0) |
| 210 | WHERE NOM_ENTIDAD='CN_CENTRO_OPERACION' AND ID_CIA=1 |
| 211 | |
| 212 | |
| 213 | go |
| 214 | UPDATE CN_TABLE_SEQ |
| 215 | SET SEQ = NVL((SELECT max(ID_MAE_TER) FROM CN_MAE_TER),0) |
| 216 | WHERE NOM_ENTIDAD='CN_MAE_TER' AND ID_CIA=1 |
| 217 | |
| 218 | go |
| 219 | UPDATE CN_TABLE_SEQ |
| 220 | SET SEQ = NVL((SELECT max(ID_TD) FROM CN_TD),0) |
| 221 | WHERE NOM_ENTIDAD='CN_TD' AND ID_CIA=1 |
| 222 | |
| 223 | go |
| 224 | UPDATE CN_TABLE_SEQ |
| 225 | SET SEQ = NVL((SELECT max(ID_AUXILIAR) FROM CN_AUXILIAR),0) |
| 226 | WHERE NOM_ENTIDAD='CN_AUXILIAR' AND ID_CIA=1 |
| 227 | |
| 228 | |
| 229 | go |
| 230 | UPDATE CN_TABLE_SEQ |
| 231 | SET SEQ = NVL((SELECT max(ID_TIPO_COMPROBANTE) FROM CN_TIPO_COMPROBANTE),0) |
| 232 | WHERE NOM_ENTIDAD='CN_TIPO_COMPROBANTE' AND ID_CIA=1 |
| 233 | |
| 234 | go |
| 235 | UPDATE CN_TABLE_SEQ |
| 236 | SET SEQ = NVL((SELECT max(ID_CATALOGO) FROM CN_CATALOGO),0) |
| 237 | WHERE NOM_ENTIDAD='CN_CATALOGO' AND ID_CIA=1 |
| 240 | |
| 241 | |
| 242 | Tabla CN_TABLE_VIG_SEQ |
| 243 | |
| 244 | {{{ |
| 245 | |
| 246 | UPDATE CN_TABLE_VIG_SEQ |
| 247 | SET SEQ = NVL( (SELECT max(ID_DOCUMENTO) FROM CN_DOCUMENTO where ID_VIGENCIA = 2010 ),0 ) |
| 248 | WHERE NOM_ENTIDAD='CN_DOCUMENTO' AND ID_CIA=1 and ID_VIGENCIA = 2010 |
| 249 | |
| 250 | go |
| 251 | UPDATE CN_TABLE_VIG_SEQ |
| 252 | SET SEQ = NVL( (SELECT max(ID_DOCUMENTO) FROM CN_DOCUMENTO where ID_VIGENCIA = 2011 ),0 ) |
| 253 | WHERE NOM_ENTIDAD='CN_DOCUMENTO' AND ID_CIA=1 and ID_VIGENCIA = 2011 |
| 254 | go |
| 255 | UPDATE CN_TABLE_VIG_SEQ |
| 256 | SET SEQ = NVL( (SELECT max(ID_CAD) FROM CN_CONTROL_CAD where ID_VIGENCIA = 2010 ),0 ) |
| 257 | WHERE NOM_ENTIDAD='CN_CONTROL_CAD' AND ID_CIA=1 and ID_VIGENCIA = 2010 |
| 258 | go |
| 259 | UPDATE CN_TABLE_VIG_SEQ |
| 260 | SET SEQ = NVL( (SELECT max(ID_CAD) FROM CN_CONTROL_CAD where ID_VIGENCIA = 2011 ),0 ) |
| 261 | WHERE NOM_ENTIDAD='CN_CONTROL_CAD' AND ID_CIA=1 and ID_VIGENCIA = 2011 |
| 262 | go |
| 263 | UPDATE CN_TABLE_VIG_SEQ |
| 264 | SET SEQ = NVL( (SELECT max(ID_MOV_CONT) FROM CN_MOVIMIENTO_CONTABLE where ID_VIGENCIA = 2010 ),0 ) |
| 265 | WHERE NOM_ENTIDAD='CN_MOVIMIENTO_CONTABLE' AND ID_CIA=1 and ID_VIGENCIA = 2010 |
| 266 | |
| 267 | go |
| 268 | UPDATE CN_TABLE_VIG_SEQ |
| 269 | SET SEQ = NVL( (SELECT max(ID_MOV_CONT) FROM CN_MOVIMIENTO_CONTABLE where ID_VIGENCIA = 2011 ),0 ) |
| 270 | WHERE NOM_ENTIDAD='CN_MOVIMIENTO_CONTABLE' AND ID_CIA=1 and ID_VIGENCIA = 2011 |
| 271 | |
| 272 | }}} |
| 273 | |
| 274 | Tabla para las secuencias por año. |