I try to output everything from temp table to csv on local drive in SQL Workbench (Redshift Amazon Server)
SELECT *
FROM #IDTable
INTO OUTFILE 'C:\\Users\\MYAN\\Documents\\out.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n';
Then I run into error message as follows:
Amazon Invalid operation: syntax error at or near "INTO" Position: 24;
Could anyone help with it? Thank you!!