text: 
      
  --DROP PROCEDURE GPSQLWEB.procCreateEmbargos
      
  CREATE PROCEDURE GPSQLWEB.procCreateEmbargos
  (
     IN P_EEMPRE VARCHAR(2),
   IN P_EDELEG VARCHAR(2),
   IN P_EMOVNI VARCHAR(12),
   IN P_EMONTO DOUBLE,
   IN P_EMONTT DOUBLE,
   IN P_EFECHA BIGINT,
   IN P_EFECHF BIGINT,
   IN P_EUSUAR VARCHAR(10),
   IN P_EPANTA VARCHAR(10),
   IN P_EFECMO BIGINT,
  
    IN P_USERNAME VARCHAR(50),
    IN P_IPADDRESS VARCHAR(255),
    IN P_USERAGENT VARCHAR(500),
    
    OUT P_MSGCODE INTEGER
  )
  LANGUAGE SQL
  BEGIN
    Declare StringSQL Varchar(32000) Default '';
    SET P_MSGCODE = 9999;
    
          INSERT INTO GPDATWEB.EMBARGOS (EEMPRE ,EDELEG ,EMOVNI ,EMONTO ,EMONTT ,EFECHA ,EFECHF ,EUSUAR ,EPANTA ,EFECMO ) VALUES ( P_EEMPRE , P_EDELEG , P_EMOVNI , P_EMONTO , P_EMONTT , P_EFECHA , P_EFECHF , P_EUSUAR , P_EPANTA , P_EFECMO );
  
    Set StringSQL = 'INSERT INTO GPDATWEB.EMBARGOS (EEMPRE ,EDELEG ,EMOVNI ,EMONTO ,EMONTT ,EFECHA ,EFECHF ,EUSUAR ,EPANTA ,EFECMO ) VALUES ( '''|| P_EEMPRE || ''' , '''|| P_EDELEG || ''' , '''|| P_EMOVNI || ''' , '''|| P_EMONTO || ''' , '''|| P_EMONTT || ''' , '''|| P_EFECHA || ''' , '''|| P_EFECHF || ''' , '''|| P_EUSUAR || ''' , '''|| P_EPANTA || ''' , '''|| P_EFECMO || ''' )'; 
    CALL GPSQLWEB.procCreateWebAudit (P_IPADDRESS, P_USERAGENT, P_USERNAME, 'Crear', 'procCreateEmbargos', StringSQL);
    SET P_MSGCODE = 0;
  END
  GO
  
  
  