"localhost:/firebird/data/ILICHEVSK2.FDB". Процедуры Previous topic Chapter index Next topic

CLIENTS_CHANGEID

 

Входные параметры

Параметр

Тип

Описание

CLIENTID

INTEGER

 

TOCLIENTID

INTEGER

 

 

Выходные параметры

(Нет выходных параметров)

 

Описание

(Нет описания для процедуры CLIENTS_CHANGEID)

 

Определение

CREATE PROCEDURE CLIENTS_CHANGEID(
    CLIENTID INTEGER,
    TOCLIENTID INTEGER)
AS
begin
  update IT set OwnerID = :ToClientID where OwnerID = :CLIENTID;
  update IT set ProviderID = :ToClientID where ProviderID = :CLIENTID;
  update ExportActs set OwnerID = :ToClientID where OwnerID = :CLIENTID;
  update ExportActs set ProviderID = :ToClientID where ProviderID = :CLIENTID;
  update StorageTickets set OwnerID = :ToClientID where OwnerID = :CLIENTID;
  update invoices set ForwarderID = :ToClientID where ForwarderID = :CLIENTID;
  update invoices set SenderID = :ToClientID where SenderID = :CLIENTID;
  update orderload set ProviderID = :ToClientID where ProviderID = :CLIENTID;
  update orderload set OwnerID = :ToClientID where OwnerID = :CLIENTID;
  delete from clients where ClientID = :ClientID;
end

 

     Previous topic Chapter index Next topic