CREATE GLOBAL TEMPORARY TABLE TMP_REGDADOSGIASP
(
   CDFILIAL        VARCHAR2(04)    NOT NULL,
   NRLANCTONF      VARCHAR2(10)    NOT NULL,
   CDFISCOPERNF    VARCHAR2(06)    NULL,
   VRCONTABILNF    FLOAT           NULL,
   VRBASECALCNF    FLOAT           NULL,
   VRIMPOSTONF     FLOAT           NULL,
   VRISENTO        FLOAT           NULL,
   VROUTROS        FLOAT           NULL,
   VRIMPRETST      FLOAT           NULL,
   VRSUBSTITUTO    FLOAT           NULL,
   VRSUBSTITUIDO   FLOAT           NULL,
   VROUTROSIMP     FLOAT           NULL,
   VRIPINCONTR     FLOAT           NULL,
   NRORG             NUMBER 	     DEFAULT         SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
   IDATIVO           VARCHAR2(1)   DEFAULT 'S' NOT NULL
		CONSTRAINT CKC_IDATIVO_TMP_REGDADOSGIASP CHECK (IDATIVO IN ('S','N')),
   DTINCLUSAO        DATE          NULL,
   DTULTATU          DATE          NULL,
   NRORGINCLUSAO     NUMBER        DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NULL,
   CDOPERINCLUSAO    VARCHAR2(12)  DEFAULT '1' 		NULL,
   NRORGULTATU       NUMBER        DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NULL,
   CDOPERULTATU      VARCHAR2(12)  DEFAULT '1',
   CONSTRAINT PK_TMP_REGDADOSGIASP PRIMARY KEY(CDFILIAL, NRLANCTONF, CDFISCOPERNF)) ON COMMIT PRESERVE ROWS
/