Translate to your Language

Wednesday, December 11, 2013

Netezza Importing Data from File to a Table

by Unknown  |  in DB at  8:58 AM



 The following method will allow you to import data from a file(any delimited file) into a table

 The sample file is a tab delimited file with two column in it, one as char and other as integer, first row has column name

here is the query to read data from the file and dump into a table called TEMP_TABLE
 insert into TEMP_TABLE
SELECT
 COL1,
 COL2
FROM EXTERNAL 'C:\Sample.txt'
(
COL1 varchar(255),COL2 integer)
USING (
  remotesource 'ODBC' delimiter '\t'
  skiprows 1);



0 comments:

© Copyright © 2015Big Data - DW & BI. by