git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@221 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
parent
505300b281
commit
26d974b043
Binary file not shown.
32
Database/Script.txt
Normal file
32
Database/Script.txt
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
ALTER TABLE ALBARANES_CLIENTE_DETALLES
|
||||||
|
ADD ID_PEDIDO TIPO_ID;
|
||||||
|
|
||||||
|
update albaranes_cliente_detalles
|
||||||
|
set id_pedido = (select albaranes_cliente.id_pedido
|
||||||
|
from albaranes_cliente
|
||||||
|
where albaranes_cliente.id = albaranes_cliente_detalles.ID_ALBARAN);
|
||||||
|
|
||||||
|
ALTER TABLE ALBARANES_PROVEEDOR_DETALLES
|
||||||
|
ADD ID_PEDIDO TIPO_ID;
|
||||||
|
|
||||||
|
update albaranes_proveedor_detalles
|
||||||
|
set id_pedido = (select albaranes_proveedor.id_pedido
|
||||||
|
from albaranes_proveedor
|
||||||
|
where albaranes_proveedor.id = albaranes_proveedor_detalles.ID_ALBARAN);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TRIGGER FACTURAS_CLIENTE_DELETE FOR FACTURAS_CLIENTE
|
||||||
|
ACTIVE BEFORE DELETE POSITION 0
|
||||||
|
AS
|
||||||
|
begin
|
||||||
|
update albaranes_cliente
|
||||||
|
set albaranes_cliente.fecha_recepcion = null
|
||||||
|
where albaranes_cliente.id_factura = id_factura;
|
||||||
|
end
|
||||||
|
^
|
||||||
|
|
||||||
|
|
||||||
|
SET TERM ; ^
|
||||||
|
|
||||||
Reference in New Issue
Block a user