|  |  | Archives of the TeradataForumMessage Posted: Thu, 07 Oct 2010 @ 11:34:13 GMT
 
 
  
| Subj: |  | Re: Large CREATE TABLE ISSUE... |  |  |  | From: |  | Minakshi Swami |  
 Hi all, The problem is coming because of quotes.string with quotes will not work fro more than 31000 characters so here is a alternative Create a parameterised macro with insert to that table Now with the use of using clause in bteq you can pass the parameter as a file 
     CREATE MULTISET TABLE TS_46986_BAA_LAMPDB.mytable1 ,NO FALLBACK
     ,
          NO BEFORE JOURNAL,
          NO AFTER JOURNAL,
          CHECKSUM = DEFAULT
          (
           name varchar(64000) NOT NULL)
          PRIMARY INDEX (  name )
     CREATE MACRO newemp
        (name   VARCHAR(64000)
       ) AS (
        INSERT INTO TS_46986_BAA_LAMPDB.mytable1
        (name
     )
     VALUES
        (
        :name
        );
     );
     Bteq(your entire create should be single rec in file)
     .import VARTEXT file=/wload/tpmt/home/tpmtbmn/FSCS/newfile.txt ;
      BTEQ -- Enter your DBC/SQL request or BTEQ command:
     USING thekey (VARCHAR(64000))
     exec newemp(:thekey);
 Regards Meenakshi 
 
 |  |