set time on;
set echo on;

set feedback 1;

spool /aplic/q02b/scripts/000alt_q022gt00_75216.lst;

SELECT TO_CHAR(SYSDATE,'DD-MM-YYYY:HH24:MI:SS') || 'INI Q02B' from dual;
 
WHENEVER SQLERROR EXIT SQL.SQLCODE;

DROP TABLE Q022GT00 CASCADE CONSTRAINTS ; 

CREATE TABLE Q022GT00 ( 
  Q022GT00_ID_CUES          NUMBER (8)    NOT NULL, 
  Q022GT00_ANO              NUMBER (4)    NOT NULL, 
  Q022GT00_CONCEDIDO_LICEN  NUMBER (1)    DEFAULT 1 NOT NULL, 
  Q022GT00_MUN_PROV         VARCHAR2 (2), 
  Q022GT00_MUN_MUNI         VARCHAR2 (3), 
  Q022GT00_PRV1A            VARCHAR2 (1), 
  Q022GT00_ADQVI1           VARCHAR2 (1), 
  Q022GT00_NADQ1            NUMBER (4), 
  Q022GT00_PROVI1           VARCHAR2 (1), 
  Q022GT00_NPRO1            NUMBER (4), 
  Q022GT00_OTRVI1           VARCHAR2 (1), 
  Q022GT00_OTRLT1           VARCHAR2 (50), 
  Q022GT00_NOTR1            NUMBER (4), 
  Q022GT00_NTOT1            NUMBER (6), 
  Q022GT00_PRV4A            VARCHAR2 (1), 
  Q022GT00_ADQVI4           VARCHAR2 (1), 
  Q022GT00_NADQ4            NUMBER (4), 
  Q022GT00_PROVI4           VARCHAR2 (1), 
  Q022GT00_NPRO4            NUMBER (4), 
  Q022GT00_OTRVI4           VARCHAR2 (1), 
  Q022GT00_OTRLT4           VARCHAR2 (50), 
  Q022GT00_NOTR4            NUMBER (4), 
  Q022GT00_NTOT4            NUMBER (6), 
  Q022GT00_TALQ             VARCHAR2 (1), 
  Q022GT00_NALQ             NUMBER (4), 
  Q022GT00_NSP45            NUMBER (4), 
  Q022GT00_NSP75            NUMBER (4), 
  Q022GT00_NSP90            NUMBER (4), 
  Q022GT00_NSP90M           NUMBER (4), 
  Q022GT00_NSPT             NUMBER (10,4), 
  Q022GT00_NRSP45           NUMBER (4), 
  Q022GT00_NRSP75           NUMBER (4), 
  Q022GT00_NRSP90           NUMBER (4), 
  Q022GT00_NRSP90M          NUMBER (4), 
  Q022GT00_NRSPT            NUMBER (10,4), 
  Q022GT00_NOCUP            NUMBER (4), 
  Q022GT00_NDESA            NUMBER (4), 
  Q022GT00_NDESO            NUMBER (4), 
  Q022GT00_NDESOT           NUMBER (4), 
  Q022GT00_DESOTR           VARCHAR2 (50), 
  Q022GT00_NOCUT            NUMBER (6), 
  Q022GT00_NVPOG            NUMBER (4), 
  Q022GT00_NVPOE            NUMBER (4), 
  Q022GT00_NVPOT            NUMBER (4), 
  Q022GT00_NALOD            NUMBER (4), 
  Q022GT00_NREAL            NUMBER (4), 
  Q022GT00_NLIBRE           NUMBER (4), 
  Q022GT00_NVTMG            NUMBER (4), 
  Q022GT00_NVTME            NUMBER (4), 
  Q022GT00_NVTOT            NUMBER (6), 
  Q022GT00_NANT60M          NUMBER (4), 
  Q022GT00_NANT30           NUMBER (4), 
  Q022GT00_NANT10           NUMBER (4), 
  Q022GT00_NANT10M          NUMBER (4), 
  Q022GT00_NANTT            NUMBER (6), 
  Q022GT00_OBSAL            VARCHAR2 (250), 
  Q022GT00_OBSSU            VARCHAR2 (250), 
  Q022GT00_FEC_ALTA         DATE, 
  Q022GT00_FEC_MOD          DATE, 
  Q022GT00_FUERA_PLAZO      VARCHAR2 (1), 
  Q022GT00_USU_ALTA         VARCHAR2 (10)  DEFAULT -1 NOT NULL, 
  Q022GT00_USU_MODIF        VARCHAR2 (10)  DEFAULT -1, 
  CONSTRAINT PK_Q022GT00
  PRIMARY KEY ( Q022GT00_ID_CUES ) )
    USING INDEX 
     TABLESPACE Q0202E00 PCTFREE 10
     STORAGE ( INITIAL 131072 NEXT 131072 PCTINCREASE 0 ))
   TABLESPACE Q0201E00
   PCTFREE 10
   PCTUSED 40
   INITRANS 1
   MAXTRANS 255
  STORAGE ( 
   INITIAL 131072
   NEXT 131072
   PCTINCREASE 0
   MINEXTENTS 1
   MAXEXTENTS 2147483645
   FREELISTS 1 FREELIST GROUPS 1 )
   NOCACHE; 


COMMIT;
 
SELECT TO_CHAR(SYSDATE,'DD-MM-YYYY:HH24:MI:SS')  ||  'FIN Q02B' from dual;
 
SPOOL OFF;
EXIT;