Description
Properties
| Name | Value |
|---|---|
| File Collation | |
| File Group | |
| Filestream File Group | |
| Is Partitioned | False |
| Partitioned Column | |
| Partition Scheme | |
| File Groups | |
| Filestream Partition Scheme | |
| Filestream File Groups | |
| Heap | False |
| Full Text Catalog | |
| Full Text | |
| Compression | NONE |
| Row Count (~) | 432 |
| Created | 1/12/2015 10:11:19 AM |
| Last Modified | 11/29/2024 5:15:57 PM |
Columns
11| Key | Name | Data Type | Length | Precision | Scale | Not Null | Identity | Rule | Default | Computed | Persisted | Description |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| item_contrato | int | 4 | 10 | 0 | True |
1 - 1 | False |
False |
||||
| id_contrato | int | 4 | 10 | 0 | True |
False |
False |
|||||
| producto | smallint | 2 | 5 | 0 | True |
False |
False |
|||||
| pais_cliente | varchar | 2 | 0 | 0 | False |
False |
False |
|||||
| cliente | int | 4 | 10 | 0 | False |
False |
False |
|||||
| cantidad_producto | smallint | 2 | 5 | 0 | False |
False |
False |
|||||
| precio_unitario | money | 8 | 19 | 4 | False |
False |
False |
|||||
| moneda | varchar | 3 | 0 | 0 | False |
False |
False |
|||||
| precio_referencia_usd | money | 8 | 19 | 4 | False |
False |
False |
|||||
| filial | smallint | 2 | 5 | 0 | False |
False |
False |
|||||
| observaciones | text | 0 | 0 | False |
False |
False |
Indexes
1Foreign Keys
4| Name | Columns | Description |
|---|---|---|
| FK__contratos__clien__391C8655 | cliente | |
| FK__contratos__filia__3A10AA8E | filial | |
| FK__contratos__id_co__37343DE3 | id_contrato | |
| FK__contratos__produ__3828621C | producto |
SQL Script
Copy
CREATE TABLE dbo.contratos_items (
item_contrato int IDENTITY,
id_contrato int NOT NULL,
producto smallint NOT NULL,
pais_cliente varchar(2) NULL,
cliente int NULL,
cantidad_producto smallint NULL,
precio_unitario money NULL,
moneda varchar(3) NULL,
precio_referencia_usd money NULL,
filial smallint NULL,
observaciones text NULL,
PRIMARY KEY CLUSTERED (item_contrato) WITH (FILLFACTOR = 90)
)
ON [PRIMARY]
TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE dbo.contratos_items WITH NOCHECK
ADD CONSTRAINT FK__contratos__clien__391C8655 FOREIGN KEY (cliente) REFERENCES dbo.clientes (cliente)
GO
ALTER TABLE dbo.contratos_items
ADD FOREIGN KEY (filial) REFERENCES dbo.filiales (filial)
GO
ALTER TABLE dbo.contratos_items
ADD FOREIGN KEY (id_contrato) REFERENCES dbo.contratos_grupos (id_contrato)
GO
ALTER TABLE dbo.contratos_items
ADD FOREIGN KEY (producto) REFERENCES dbo.productos (producto)
GO
item_contrato int IDENTITY,
id_contrato int NOT NULL,
producto smallint NOT NULL,
pais_cliente varchar(2) NULL,
cliente int NULL,
cantidad_producto smallint NULL,
precio_unitario money NULL,
moneda varchar(3) NULL,
precio_referencia_usd money NULL,
filial smallint NULL,
observaciones text NULL,
PRIMARY KEY CLUSTERED (item_contrato) WITH (FILLFACTOR = 90)
)
ON [PRIMARY]
TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE dbo.contratos_items WITH NOCHECK
ADD CONSTRAINT FK__contratos__clien__391C8655 FOREIGN KEY (cliente) REFERENCES dbo.clientes (cliente)
GO
ALTER TABLE dbo.contratos_items
ADD FOREIGN KEY (filial) REFERENCES dbo.filiales (filial)
GO
ALTER TABLE dbo.contratos_items
ADD FOREIGN KEY (id_contrato) REFERENCES dbo.contratos_grupos (id_contrato)
GO
ALTER TABLE dbo.contratos_items
ADD FOREIGN KEY (producto) REFERENCES dbo.productos (producto)
GO
Depends On
5Used By
28- dbo.backend_contratos_consumos
- dbo.IV_panel_control
- dbo.IV_panel_control_2021
- dbo.IV_panel_control_22012021
- dbo.IV_panel_control_AGB
- dbo.IV_panel_control_new
- dbo.LN_Blue
- dbo.LN_Blue_23062023
- dbo.LN_Blue_AGB
- dbo.LN_Blue_MIS
- dbo.LN_Blue2
- dbo.LN_contrapartes_
- dbo.LN_contrapartes_sc
- dbo.LN_dashboard_graficos_filtrado
- dbo.LN_dashboard_graficos_filtrado_12102023
- dbo.LN_dashboard_graficos_filtrado_17102023
- dbo.LN_dashboard_graficos_filtrado_MIS
- dbo.LN_dashboard_graficos_filtrado_MIS2
- dbo.LN_informes
- dbo.LN_informes_AGB
- dbo.LN_informes_MIS
- dbo.LN_panel_control
- dbo.LN_panel_control_17012024
- dbo.LN_panel_control_23042024
- dbo.LN_panel_control_MIS
- dbo.LN_panel_control_ORIGINAL
- dbo.LN_tipos_informe_familia
- dbo.consumo_contratos