Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 03 Sep 2004 @ 16:28:51 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Doing Concatenation/Substring in Fastload
 
From:   Coffing Christopher L

Al

Not sure if this is an option but I use this macro and process to build my FastExport / Multiload scripts. It is quick and you can edit from there...

You will need to the SQL, table and macro. Here they are...

     Select * From "coffingc"."export_build_tbl" Order By 1,2,3;

     CREATE SET TABLE coffingc.export_build_tbl ,NO FALLBACK ,
          NO BEFORE JOURNAL,
          NO AFTER JOURNAL
          (
           databasename CHAR(30) CHARACTER SET LATIN NOT CASESPECIFIC,
           tablename CHAR(30) CHARACTER SET LATIN NOT CASESPECIFIC,
           sekwense CHAR(5) CHARACTER SET LATIN NOT CASESPECIFIC,
           commandline VARCHAR(250) CHARACTER SET LATIN NOT CASESPECIFIC)
     PRIMARY INDEX ( databasename ,tablename ,sekwense );

Example Macro Execution:

     Exec COFFINGC.FastExport_Mload_InS_gen_db ('Databasename', 'My_ID',
     'My_Password', 'From_TDP', 'Mload_DBName', 'Mload_ID', 'Mload_Password',
     'Mload_TDP', 'D:\FastExportFiles')


     REPLACE MACRO "COFFINGC"."FastExport_Mload_InS_gen_db" (
           "DBe" (CHAR(30), CHARACTER SET LATIN, NOT CASESPECIFIC, FORMAT 'X(30)', NULL),
           "IDe" (CHAR(30), CHARACTER SET LATIN, NOT CASESPECIFIC, FORMAT 'X(30)', NULL),
      "PWe" (CHAR(30), CHARACTER SET LATIN, NOT CASESPECIFIC, FORMAT 'X(30)', NULL),
      "TDPe" (CHAR(30), CHARACTER SET LATIN, NOT CASESPECIFIC, FORMAT 'X(30)', NULL),
      "DBm" (CHAR(30), CHARACTER SET LATIN, NOT CASESPECIFIC, FORMAT 'X(30)', NULL),
      "IDm" (CHAR(30), CHARACTER SET LATIN, NOT CASESPECIFIC, FORMAT 'X(30)', NULL),
      "PWm" (CHAR(30), CHARACTER SET LATIN, NOT CASESPECIFIC, FORMAT 'X(30)', NULL),
      "TDPm" (CHAR(30), CHARACTER SET LATIN, NOT CASESPECIFIC, FORMAT 'X(30)', NULL),
      "FEDIR" (CHAR(30), CHARACTER SET LATIN, NOT CASESPECIFIC, FORMAT
     'X(30)', NULL)) AS (INSERT INTO "COFFINGC"."export_build_tbl" SELECT
     DISTINCT "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'00100',('**'|| (TRIM(BOTH  FROM "dbc"."tables"."TableName" )))||
     '.fexp'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'00105',(((('.LOGTABLE '|| (TRIM(BOTH  FROM :"DBe" )))|| '.')||
     (TRIM(BOTH  FROM SUBSTR("dbc"."tables"."TableName" ,1 ,26 ))))||
     '_log')|| '  ;'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'00110','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'00115',((((('.LOGON '|| (TRIM(BOTH  FROM :"TDPe" )))|| '/')||
     (TRIM(BOTH  FROM :"IDe" )))|| ',')|| (TRIM(BOTH  FROM :"PWe" )))|| '
     ;'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'00120','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'00125','.BEGIN EXPORT 'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'00130','SESSIONS 20  ;'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'00135','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'00140',(('.EXPORT OUTFILE '|| (TRIM(BOTH  FROM :"FEDIR" )))||
     (TRIM(BOTH  FROM "dbc"."tables"."TableName" )))|| '.dat  'FROM
     "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'00142','mode
     record format fastload ; 'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'00145','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT "dbc"."c"."DatabaseName"
     ,"dbc"."c"."TableName" ,'01'|| (SUBSTR(CAST(("dbc"."c"."ColumnId" ) AS
     CHAR(6) CHARACTER SET LATIN),3 ,4 )),(( CASE WHEN "dbc"."c"."ColumnId" =
     "m"."columnid" THEN (((('LOCKING TABLE '|| (TRIM(BOTH  FROM
     "dbc"."C"."DatabaseName" )))|| '.')|| (TRIM(BOTH  FROM
     "dbc"."C"."TableName" )))|| ' FOR ACCESS SELECT ') ELSE ('
     ,') END ))|| (TRIM(BOTH  FROM "dbc"."c"."ColumnName" ))FROM
     "dbc"."COLUMNS"  "c" ,
      (SELECT "dbc"."columns"."TableName" (NAMED "tablename"
     ),MIN("dbc"."columns"."ColumnId" )(NAMED "columnid" )FROM
     "dbc"."columns"
     WHERE "dbc"."columns"."DatabaseName" =  :"DBe"
     GROUP BY 1 ) "m"
     WHERE ("dbc"."c"."DatabaseName" =  :"DBe" ) AND  ("dbc"."c"."TableName"
     =  "m"."tablename" );INSERT INTO "COFFINGC"."export_build_tbl" SELECT
     DISTINCT "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'01500',((('FROM '|| (TRIM(BOTH  FROM "dbc"."tables"."DatabaseName"
     )))|| '.')|| (TRIM(BOTH  FROM "dbc"."tables"."TableName" )))|| '  ;'FROM
     "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'01505','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'01510','.END
     EXPORT   ;'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'01515','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'01520','.LOGOFF  ;'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'01530',('**'|| (TRIM(BOTH  FROM "dbc"."tables"."TableName" )))||
     '.mld'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'01535','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'02000',((('.logtable  '|| (TRIM(BOTH  FROM :"DBm" )))|| '.')||
     (TRIM(BOTH  FROM SUBSTR("dbc"."tables"."TableName" ,1 ,26 ))))||
     '_log;'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'02500',((((('.logon '|| (TRIM(BOTH  FROM :"TDPm" )))|| '/')||
     (TRIM(BOTH  FROM :"IDm" )))|| ',')|| (TRIM(BOTH  FROM :"PWm" )))||
     ';'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'02750','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'03000',('database  '|| (TRIM(BOTH  FROM :"DBm" )))|| ';'FROM
     "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'03250','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'03500',((('DROP TABLE '|| (TRIM(BOTH  FROM :"DBm" )))|| '.ET_')||
     (TRIM(BOTH  FROM SUBSTR("dbc"."tables"."TableName" ,1 ,27 ))))|| ';'FROM
     "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'04000',((('DROP TABLE '|| (TRIM(BOTH  FROM :"DBm" )))|| '.UV_')||
     (TRIM(BOTH  FROM SUBSTR("dbc"."tables"."TableName" ,1 ,27 ))))|| ';'FROM
     "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'04500',((('DROP TABLE '|| (TRIM(BOTH  FROM :"DBm" )))|| '.WT_')||
     (TRIM(BOTH  FROM SUBSTR("dbc"."tables"."TableName" ,1 ,27 ))))|| ';'FROM
     "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'04750','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'05000','.BEGIN IMPORT MLOAD TABLES 'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'05500',(('
     '|| (TRIM(BOTH  FROM :"DBm" )))|| '.')|| (TRIM(BOTH  FROM
     "dbc"."tables"."TableName" ))FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'06000',(('
     WORKTABLES '|| (TRIM(BOTH  FROM :"DBm" )))|| '.WT_')|| (TRIM(BOTH  FROM
     "dbc"."tables"."TableName" ))FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'06500',(('
     ERRORTABLES '|| (TRIM(BOTH  FROM :"DBm" )))|| '.ET_')|| (TRIM(BOTH  FROM
     "dbc"."tables"."TableName" ))FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'07000',(('
     '|| (TRIM(BOTH  FROM :"DBm" )))|| '.UV_')|| (TRIM(BOTH  FROM
     "dbc"."tables"."TableName" ))FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'07250','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'07500','
     SESSIONS 8  ERRLIMIT 50  AMPCHECK NONE;'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'07750','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'08000','.layout InputLayout;'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."columns"."DatabaseName" ,"dbc"."columns"."TableName" ,'10'||
     (SUBSTR(CAST(("dbc"."columns"."ColumnId" ) AS CHAR(6) CHARACTER SET
     LATIN),3 ,4 )),(('.FIELD     '|| "dbc"."columns"."ColumnName" )|| '
     *  ')|| (( CASE WHEN "dbc"."columns"."ColumnType" =  'I1'THEN ('BYTEINT;
     ') WHEN "dbc"."columns"."ColumnType" =  'I2'THEN ('SMALLINT; ') WHEN
     "dbc"."columns"."ColumnType" =  'I'THEN ('INTEGER; ') WHEN
     "dbc"."columns"."ColumnType" =  'DA'THEN ('INTEGER; ') WHEN
     "dbc"."columns"."ColumnType" =  'AT'THEN (('VARCHAR('|| (TRIM(BOTH  FROM
     "dbc"."columns"."ColumnLength" )))|| ');') WHEN
     "dbc"."columns"."ColumnType" =  'TS'THEN (('CHAR('|| (TRIM(BOTH  FROM
     "dbc"."columns"."ColumnLength" )))|| ');') WHEN
     "dbc"."columns"."ColumnType" =  'D'THEN (((('DECIMAL('|| (TRIM(BOTH
     FROM "dbc"."columns"."DecimalTotalDigits" )))|| ',')|| (TRIM(BOTH  FROM
     "dbc"."columns"."DecimalFractional!
      Digits" )))|| '); ') WHEN "dbc"."columns"."ColumnType" =  'CF'THEN
     (('CHAR('|| (TRIM(BOTH  FROM "dbc"."columns"."ColumnLength" )))|| ');')
     WHEN "dbc"."columns"."ColumnType" =  'CV'THEN (('VARCHAR('|| (TRIM(BOTH
     FROM "dbc"."columns"."ColumnLength" )))|| ');') ELSE (NULL ) END ))FROM
     "dbc"."columns" ,
      (SELECT "dbc"."columns"."TableName" (NAMED "tablenm"
     ),MIN("dbc"."columns"."ColumnId" )(NAMED "mincolid" )FROM
     "dbc"."columns"
     WHERE "dbc"."columns"."DatabaseName" =  :"DBe"
     GROUP BY 1 ) "temp1"
     WHERE ("dbc"."columns"."DatabaseName" =  :"DBe" ) AND
     ("dbc"."columns"."TableName" =  "temp1"."tablenm" );INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'20250','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'20500','.dml
     label Insertit ; 'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'21000',('insert into '|| (TRIM(BOTH  FROM "dbc"."tables"."TableName"
     )))|| '('FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."columns"."DatabaseName" ,"dbc"."columns"."TableName" ,'3'||
     (SUBSTR(CAST(("dbc"."columns"."ColumnId" ) AS CHAR(6) CHARACTER SET
     LATIN),3 ,4 )),(((((( CASE WHEN "temp4"."mincolid" =
     "dbc"."columns"."ColumnId" THEN ('   ') ELSE ('  ,') END ))|| (TRIM(BOTH
     FROM "dbc"."columns"."ColumnName" )))|| '= ')|| (( CASE WHEN
     "dbc"."columns"."ColumnType"  IN ('DA',
     'AT','TS')THEN ('CAST(:') ELSE (':') END )))|| (TRIM(BOTH  FROM
     "dbc"."columns"."ColumnName" )))|| (( CASE WHEN
     "dbc"."columns"."ColumnType" =  'DA'THEN (' AS DATE)') WHEN
     "dbc"."columns"."ColumnType" =  'TS'THEN ((' AS TimeStamp('|| (TRIM(BOTH
     FROM "dbc"."columns"."DecimalFractionalDigits" )))|| '))') WHEN
     "dbc"."columns"."ColumnType" =  'AT'THEN ((' AS Time('|| (TRIM(BOTH
     FROM "dbc"."columns"."DecimalFractionalDigits" )))|| '))') ELSE (' ')
     END ))FROM "dbc"."columns" ,
      (SELECT "dbc"."columns"."TableName" (NAMED "tablenm"
     ),MIN("dbc"."columns"."ColumnId" )(NAMED "mincolid" )FROM
     "dbc"."columns"
     WHERE "dbc"."columns"."DatabaseName" =  :"DBe"
     GROUP BY 1 ) "temp4"
     WHERE ("dbc"."columns"."DatabaseName" =  :"DBe" ) AND
     ("dbc"."columns"."TableName" =  "temp4"."tablenm" );INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'40250','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'60500','
     ); 'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'60750','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'61000',(('.import infile '|| (TRIM(BOTH  FROM :"FEDIR" )))||
     (TRIM(BOTH  FROM "dbc"."tables"."TableName" )))|| '.dat  'FROM
     "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'61500','
     format FASTLOAD 'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'62000','
     layout InputLayout'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'62500','
     apply Insertit; 'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'62750','
     'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName" ,'63000','.end
     mload; 'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,"dbc"."tables"."TableName"
     ,'63500','.logoff; 'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,'00000','70000',('**'|| (TRIM(BOTH  FROM
     :"DBm" )))|| '_mload.bat'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,'00001','71000',((('mload < '||
     (TRIM(BOTH  FROM "dbc"."tables"."TableName" )))|| '.mld > ')||
     (TRIM(BOTH  FROM SUBSTR("dbc"."tables"."TableName" ,1 ,26 ))))||
     '_mld.log'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,'00002','70000',('**'|| (TRIM(BOTH  FROM
     :"DBe" )))|| '_fexp.bat'FROM "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;INSERT INTO
     "COFFINGC"."export_build_tbl" SELECT DISTINCT
     "dbc"."tables"."DatabaseName" ,'00003','71000',((('fexp < '|| (TRIM(BOTH
     FROM "dbc"."tables"."TableName" )))|| '.fexp > ')|| (TRIM(BOTH  FROM
     SUBSTR("dbc"."tables"."TableName" ,1 ,26 ))))|| '_fex.log'FROM
     "dbc"."tables"
     WHERE "dbc"."tables"."DatabaseName" =  :"DBe" ;);

Best Regards

Chris Coffing
AFKS O&M Lead Teradata DBA
Certified Teradata Master



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023