title: How to import Date from .CSV to Teradata tables using Bteq?
body: <p>I am trying to import the data which is exported by using Bteq script but not able to load into another table.</p>
  
  <pre><code>.EXPORT report file=E:\t\tgt\report_excel_092702.csv;
  .set width 200;
  .SET TITLEDASHES OFF;
  .SET SEPARATOR ','; 
  select  empno,coalesce(ename,'no_name') as ename,coalesce(job,'no_job') as job ,coalesce(hiredate, date) as hiredate,COALESCE(mgr,0) as mgr,COALESCE(sal, 0) as sal,COALESCE(comm, 0) as comm,deptno from emps;
  --.EXPORT reset
  .LOGOFF
  .EXIT
  </code></pre>
  
  <p>Database teradata1</p>
  
  <p>report_excel_092702.csv(Exported .csv)</p>
  
  <pre><code> EMPNO  ename       job     hiredate     mgr     sal    comm DEPTNO
  7698    BLAKE   MANAGER     81/11/17    7839    2850       0    30
  7839    KING    PRESIDENT   81/11/17       0    50000      0    10
  7654    MARTIN  SALESMAN    81/09/28    7698    1250    1400    30
  </code></pre>
  
  <p>Bteq script....</p>
  
  <pre><code>.import vartext ',' file='E:\t\tgt\report_excel_092702.csv',skip=1;
  
   DATABASE tetra;
   delete from emp_csv;
  .QUIET ON 
  .REPEAT * 
   USING 
          empno    (varchar(100))
          ,ename   (varchar(100))
          ,hiredate (varchar(100))
  
   INSERT INTO emp_csv(empno,ename,hiredate)
          VALUES (
          :empno,
          :ename,
          Cast((:hiredate (Date,Format 'dd.mm.yyyy')) As Date) 
          --cast(hiredate 'yy/mm/dd') as :hiredate
          --CAST( CAST( :hiredate AS DATE FORMAT 'mm/dd/yyyy') AS DATE FORMAT 'mm/dd/yyyy')
          );
  .QUIT
  .LOGOFF
  </code></pre>