DO $$
BEGIN
	alter table fiscal_j1 add (NUMSERIE20	VARCHAR(20),
                           DATAMOV	VARCHAR2(9),
                           FISCALIMPRESSORA_ID	NUMBER(7),
                           PUNTOVENTA_ID	NUMBER(7));


	alter table fiscal_j2 add (CNPJEMISSOR	VARCHAR(14),
						   NUMSERIE20	VARCHAR(20),
						   DATAMOV	VARCHAR(9),
						   FISCALIMPRESSORA_ID	NUMBER(7),
						   PUNTOVENTA_ID	NUMBER(7));
  EXCEPTION WHEN duplicate_column THEN NULL;
END
$$;

declare
    column_exists exception;
    pragma exception_init (column_exists , -01430);
begin
    execute immediate 'alter table fiscal_j1 add (NUMSERIE20	VARCHAR(20),
                           DATAMOV	VARCHAR2(9),
                           FISCALIMPRESSORA_ID	NUMBER(7),
                           PUNTOVENTA_ID	NUMBER(7))';
    exception when column_exists then null;
end;
/
declare
    column_exists exception;
    pragma exception_init (column_exists , -01430);
begin
    execute immediate 'alter table fiscal_j2 add (CNPJEMISSOR	VARCHAR(14),
												  NUMSERIE20	VARCHAR(20),
												  DATAMOV	VARCHAR(9),
												  FISCALIMPRESSORA_ID	NUMBER(7),
												  PUNTOVENTA_ID	NUMBER(7))';
    exception when column_exists then null;
end;