Sei sulla pagina 1di 5

create table venta

( _line_di char(04) not null ,


_arti_di char(06) not null ,
_clie_di char(06) not null ,
_vend_di char(03) not null ,
_fech_di not null ,
_anoo_di char(04) not null ,
_mess_di char(02) not null ,
_diaa_di char(02) not null ,
_sigc_di char(01) not null ,
_cant_di int identity(15,2) ,
_sigm_di char(01) not null ,
_impo_di int identity(15,2) ,
_sucu_di smallint not null ,
_nego_di char(2) not null ,
_movi_di char(1) not null ,
_pago_di smallint not null ,
_rece_di smallint not null ,
_pedi_di smallint not null ,
_znlf_di char(3) not null ,
_znlg_di char(3) not null ,
_gneg_di char(2) not null ,
_glin_di char(2) not null ,
_ubic_di not null ,
_dpto_di char(2) not null ,
_prov_di char(2) not null ,
_dist_di char(2) not null ,
_prec_di int identity(13,2) ,
_cond_di char(03) not null ,
_nume_fac_di char(09) not null ,
_nume_fsu_di char(10) not null ,
_sign_mon_di char(01) not null ,
_codi_cia_di char(02) not null ,
_codi_mtv_di char(02) not null ,
_codi_persona char(10) not null ,
_tipo_pedido char(02) not null ,
_tipo_dol_di int identity(13,2) ,
_flag_consig_di char(01) not null ,
_nume_lote_di char(12) not null ,
_refe_reclamo char(30) not null )

create table gru_merca


( _gru_grupo char(02) not null ,
_gru_grupo_tipo char(02) not null )

create table gru_clien


( _gru_negoc char(02) not null ,
_gru_negoc_tipo char(02) not null )

create table mercapc


( _mer_codi_linea smallint not null ,
_mer_codi_mercaderia smallint not null ,
_mer_stat_mercaderia char(01) not null ,
_mer_nomb_merca not null ,
05 mer_nomb_corto_mercaderia char(35) not null ,
05 mer_nume_produccion char(08) not null ,
_mer_tipo_mercaderia char(02) not null ,
_mer_unid_mercaderia char(02) not null ,
_mer_prec_venta int identity(9,2) ,
_mer_prec_publico_directa int identitt(2,2) ,
_mer_tipo_moneda char(01) not null ,
_mer_codi_gama char(08) not null ,
_mer_porc_igv int identity(5,2) ,
_mer_porc_isc int identity(5,2) ,
_mer_cant_puntos smallint not null ,
_mer_codi_formula char(06) not null ,
_mer_codi_acabado int (02) not null ,
_mer_tipo_origen char(01) not null ,
_mer_cant_contenido int identity(9,3) ,
_mer_fech_creacion datetime ,
_mer_porc_royalty int identity(5,2) ,
_mer_codi_proveedor char(06) not null ,
_mer_codi_barras char(15) not null ,
_mer_prec_venta_soles int identity(9,2) ,
_mer_cost_venta int identity(9,2) ,
_mer_cost_promediolf int identity(9,2) ,

Página: 1
_mer_cost_otros int identity(9,2) ,
_mer_codi_mercaprov smallint not null ,
_mer_codi_categoria_grupo char(04) not null ,
_mer_nomb_marca char(20) not null ,
_mer_flag_consignacion_dk char(01) not null ,
_mer_prec_venta_dolar int identity(9,2) ,
_mer_codi_equivalente_ph char(06) not null ,
_mer_codi_marca char(05) not null ,
_mer_cost_promedio_phmaq int identity(9,2) ,
_mer_codi_compania char(02) not null ,
_mer_flag_producto_nuevo char(01) not null ,
_mer_fech_lanzamiento_pn char(08) not null ,
_mer_unid_medida_contenido char(03) not null ,
_mer_prec_venta_anterior int identity(9,2) ,
_mer_fech_cambio_precio char(08) not null ,
_mer_unid_envase int identity(9,3) ,
_mer_ceco char(10) not null )

create table clienpc


( _cli_codi_cliente smallint not null ,
_cli_nomb_cliente char(50) not null ,
_cli_dire_cliente char(50) not null ,
_cli_stat_cliente char(01) not null ,
_cli_nomb_propietario char(40) not null ,
_cli_tele_cliente char(07) not null ,
_cli_tipo_negocio char(02) not null ,
_cli_codi_zona_departamento smallint not null ,
_cli_codi_zona_provincia smallint not null ,
_cli_codi_zona_distrito smallint not null ,
_cli_codi_vend_farmacia smallint not null ,
_cli_codi_vend_perfumeria smallint not null ,
_cli_codi_cobrador smallint not null ,
_cli_nume_libreta_tributaria char(11) not null ,
_cli_codi_sucursal smallint not null ,
_cli_codi_zona_gene smallint not null ,
_cli_codi_zona_prfa smallint not null ,
_cli_codi_zona_baye smallint not null ,
_cli_codi_zona_wyet smallint not null ,
_cli_codi_zona_trif smallint not null ,
_cli_codi_zona_mult smallint not null ,
_cli_codi_zona_sint smallint not null ,
_cli_mont_limite_credito int identity(13,2) ,
_cli_codi_abc_general char(01) not null ,
_cli_codi_abc_farmacia char(01) not null ,
_cli_saldo_mn int identity(13,2) ,
_cli_saldo_linea_cr int identity(13,2) ,
_cli_codi_condicion_pago char(03) not null ,
_cli_flag_venta_suprimida char(01) not null ,
_cli_tipo_cliente char(02) not null ,
_cli_codi_vend_otro smallint not null ,
_cli_saldo_msol int identity(13,2) ,
_cli_saldo_mdol int identity(13,2) ,
_cli_devol_msol int identity(13,2) ,
_cli_devol_mdol int identity(13,2) ,
_cli_monto_lci int identity(13,2) ,
_cli_nume_pp smallint not null ,
_cli_rating char(02) not null ,
_cli_tipo_persona char(01) not null ,
_cli_marc_codistribuidora char(01) not null )

create table clibocsalpc


( _cbs_codi_cliente char(06) not null ,
_cbs_codi_canal smallint not null ,
_cbs_nomb_canal char(40) not null ,
_cbs_codi_canal_tipo smallint not null ,
_cbs_nomb_canal_tipo char(40) not null ,
_cbs_codi_boca_sali_1 smallint not null ,
_cbs_nomb_boca_sali_1 char(40) not null ,
_cbs_codi_boca_sali_2 smallint not null ,
_cbs_nomb_boca_sali_2 char(40) not null )

create table vendepc


( _ven_codi_vendedor char(03) not null ,
_ven_nomb_vendedor char(30) not null ,
_ven_codi_supervisor char(03) not null ,
_ven_codi_sucursal char(02) not null ,

Página: 2
_ven_tipo_especialidad char(02) not null ,
_ven_codi_division char(02) not null ,
_ven_tipo_vendedor char(01) not null ,
_ven_codi_compania char(02) not null )

create table promopc


( _pro_codi_promotor char(03) not null ,
_pro_nomb_promotor char(50) not null ,
_pro_codi_especialidad char(02) not null ,
_pro_codi_supervisor char(03) not null ,
_pro_codi_empleado char(06) not null ,
_pro_nume_celular char(08) not null ,
_pro_fech_creacion char(08) not null )

create table cliprpc


( _cpr_codi_promotor char(03) not null ,
_cpr_codi_cliente char(06) not null ,
_cpr_fech_creacion char(08) not null )

create table marcapc


( _mar_codi_marca char(05) not null ,
_mar_nomb_marca char(30) not null ,
_mar_nomb_corto_marca char(15) not null ,
_mar_codi_ceco char(10) not null ,
_mar_codi_cebe char(10) not null ,
_mar_stat_marca char(01) not null ,
_mar_fech_creacion char(08) not null )

create table superpc


( _sup_codi_supe char(03) not null ,
_sup_nomb_supe char(30) not null ,
_sup_codi_sucu char(02) not null ,
_sup_codi_espe char(02) not null )

create table compapc


( _cia_codi_comp char(02) not null ,
_cia_nomb_comp char(40) not null ,
_cia_dire_comp char(50) not null ,
_cia_nume_ruc_comp char(11) not null )

create table especpc


( _esp_codi_comp char(02) not null ,
_esp_codi_espe char(02) not null ,
_esp_nomb_espe char(30) not null ,
_esp_nume_ejer smallint not null ,
_esp_nume_peri smallint not null )

create table tipnepc


( _tip_codi_tipo_nego char(02) not null ,
_tip_desc_tipo_nego char(40) not null )

create table cuo_vend


( _codi_vendedor char(3) ,
_codi_especialidad char(2) ,
_codi_agrupacion char(3) ,
_codi_linea char(4) ,
_codi_division char(2) ,
_nume_ano_registro smallint ,
_nume_mes_registro smallint ,
_mont_cuota bigint(2) ,
_mont_venta bigint(2) ,
_mont_descuento_pp bigint(2) ,
_mont_por_facturar bigint(2) ,
_mont_venta_del_dia bigint(2) ,
_codi_usuario char(10) ,
_fech_movimiento char(8) ,
_hora_movimiento char(4) ,
_codi_compania char(2) ,
_mont_venta_drenaje bigint(2) ,
_mont_cuota_drenaje bigint(2) ,
_mont_comision_venta_total bigint(2) ,
_mont_comision_x_cuota bigint(2) ,
_porc_comision_venta_total smallint(2) ,
_porc_cump_escala_inferior smallint(2) ,

Página: 3
_porc_cump_escala_superior smallint(2) ,
_mont_cuota_minima_escala bigint(2) ,
_mont_comision_escala bigint(2) )

create table PRESUPUESTO:


( _CODI_MERCADERIA CHAR(6) ,
_NUME_ANO_REGISTRO SMALLINT ,
_NUME_MES_REGISTRO SMALLINT ,
_CANT_ORIGINAL INTEGER(3) ,
_CANT_MODIFICADA INTEGER(3) ,
_CANT_AUXILIAR INTEGER(3) ,
_PREC_ORIGINAL BIGINT(2) ,
_PREC_MODIFICADO BIGINT(2) ,
_PREC_AUXILIAR BIGINT(2) ,
_PORC_BOMEPRO_ORIGINAL BIGINT(5) ,
_PORC_BOMEPRO_MODIFICADO BIGINT(5) ,
_PORC_BOMEPRO_AUXILIAR BIGINT(5) ,
_CANT_ORIGINAL_PREFAB INTEGER(3) ,
_CANT_MODIFICADA_PREFAB INTEGER(3) ,
_PORC_DEVOLUCION_ORIGINAL BIGINT(5) ,
_PORC_DEVOLUCION_MODIFICADO BIGINT(5) ,
_PORC_DEVOLUCION_AUXILIAR BIGINT(5) ,
_COST_REPOSICION BIGINT(2) ,
_COST_PROMEDIO BIGINT(2) ,
_COST_REPOSICION_ORIGINAL BIGINT(2) ,
_COST_REPOSICION_MODIFICADO BIGINT(2) ,
_COST_REPOSICION_AUXILIAR BIGINT(2) ,
_COST_PROMEDIO_ORIGINAL BIGINT(2) ,
_COST_PROMEDIO_MODIFICADO BIGINT(2) ,
_COST_PROMEDIO_AUXILIAR BIGINT(2) ,
_FECH_ULTIMA_ACTUALIZACION CHAR(8) ,
_CODI_USUARIO CHAR(12) ,
_CANT_TMP INTEGER(3) ,
_FLAG_BLOQUEO_PPTO CHAR(1) ,
_CODI_USR_BLOQUEO_PPTO CHAR(12) ,
_FECH_BLOQUEO_PPTO CHAR(8) ,
_HORA_BLOQUEO_PPTO CHAR(4) ,
_CODI_MOTIVO_BLOQUEO_PPTO CHAR(2) ,
_FLAG_APROBADO_PPTO CHAR(1) ,
_CODI_USR_APROB_PPTO CHAR(12) ,
_FECH_APROB_PPTO CHAR(8) ,
_HORA_APROB_PPTO CHAR(4) ,
_CODI_MOTIVO_APROB_PPTO CHAR(2) ,
_FLAG_CANTIDAD_CERO_PERMITIDA CHAR(1) )

Indexes on table PRESUPUESTO:


KEY_PRESUP_0 with column CODI_MERCADERIA
and column NUME_ANO_REGISTRO
and column NUME_MES_REGISTRO
No Duplicates allowed

Página: 4
Página: 5

Potrebbero piacerti anche