Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 09 Apr 2012 @ 20:24:31 GMT


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


Subj:   TPT script: Query ends within a string or comment block
 
From:   JAMES PARK

TD 13 on Windows

A colleague of mine ran this script on SQL Assistant and received a message saying, "Query ends within a string or comment block". I wonder what to fix to make this run. Thank you in advance.

     DEFINE JOB EXTRACT_TABLE_LOAD
     DESCRIPTION "Export rows from a Teradata Table to another Teradata Table'
     (
       DEFINE SCHEMA PRODUCT_SOURCE_SCHEMA
       DESCRIPTION 'PRODUCT INFORMATION SCHEMA'
       (
         Associate_Id     INTEGER,
         Associate_Name   CHAR(25),
         Salary           FLOAT,
         DOJ              INTDATE,
         Designation      VARCHAR(25),
         Loan_Amout       DECIMAL(5,2),
         Martial_Status   CHAR(1),
         No_of_Dependents ByTEINT
         );

         DEFINE OPERATOR DDL_OPERATOR
         TYPE DDL
         ATRIBUTES
         (
           VARCAR PrivateLogName = 'ddl_log',
           VARCAR Tdpid          = @jobvar_tdpid,
           VARCAR UserName       = @jobvar_username,
           VARCAR UserPassword   = @jobvar_password,
           VARCAR ErrorList      = '3807'
         );

         DEFINE OPERATOR EXPORT_OPERATOR
         TYPE EXPORT
         sCHEMA PRODUCT_SOURCE_SCHEMA
         ATTRIBUTES
         (
           VARCAR PrivateLogName = 'exportl_log',
           VARCAR Tdpid          = @jobvar_tdpid,
           VARCAR UserName       = @jobvar_username,
           VARCAR UserPassword   = @jobvar_password,
            VARCAR ErrorList      = 'SELECT * FROM TEMPT18 ORDER BY 1;'
         );

         DEFINE OPERATOR LOAD_OPERATOR
         TYPE LOAD
         sCHEMA *
         ATTRIBUTES
         (
           VARCAR PrivateLogName = 'load_log',
           VARCAR Tdpid          = @jobvar_tdpid,
           VARCAR UserName       = @jobvar_username,
           VARCAR UserPassword   = @jobvar_password,
           VARCAR targetTable    = @jobvar_tgt_dbname || '.Trans',
           VARCAR LogTable       = @jobvar_wrk_dbname || '.LG_Trans',
           VARCAR ErrorTable1   = @Jobvar_wrk_dbname || '.ET_Trans',
           VARCAR ErrorTable2   = @Jobvar_wrk_dbname || '.uT_Trans'
          ):

          STEP Setup_Table
           (
             APPLY
               ('DROP TABLE    '|| @jobvar_wrk_dbname || '.ET_Trans;'),
               ('DROP TABLE    '|| @jobvar_wrk_dbname || '.UV_Trans;'),
               ('DROP TABLE    '|| @jobvar_tgt_dbname || '.Trans;'),
               ('CREATE TABLE  '|| 'Trans (Trans_Number   VARCAR(50),
                                           Trans_Date     VARCAR(50),
                                           0,
                                           Account_number VARCAR(50),
                                           Trans_ID       VARCAR(50),
                                           Trans_Amount   VARCAR(50));')
             TO OPERATOR (DDL_OPERATOR);
            ):

            STEP LOAD_Trans_Table

            (
              APPLY TO OPERATOR (LOAD_OPERATOR(21)
              SELECT * FROM OPERATOR (EXPORT_OPERATOR(21);
            );
           );


     
  <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