Last active
March 13, 2017 21:00
-
-
Save weeksdev/a520fd1c0260875f75a0 to your computer and use it in GitHub Desktop.
Netezza Generate External Command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE EXTERNAL TABLE 'path/to/flat/file.dat' | |
USING ( delim ',' datestyle 'YMD' datedelim '-' REMOTESOURCE 'ODBC' requireQuotes true quotedvalue 'yes' LOGDIR 'path/to/log/directory/' nullvalue '') AS | |
SELECT * | |
FROM MonkeyPants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO target_table SELECT * FROM EXTERNAL 'C:\FileName.txt' | |
using( delim '|' datestyle 'MDY' datedelim '/' REMOTESOURCE 'ODBC' MAXERRORS 50 | |
LOGDIR 'C:\'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment