I was creating table name "tripsdata" in SQL query tool, which is done successfully. Now I have to insert values into the table and I used the below syntax :
LOAD data INFILE 'tripsdata.csv'
INTO TABLE tripsdata
FIELDS TERMINATED BY ','
ENCLOSED BY '"' LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
It keeps giving me error - "ERROR: syntax error at or near "data" LINE 2: LOAD data INFILE 'tripsdata.csv' "
Can you share the error and rectification?
tried what I mentioned above. I want to create this table using SQL query:
IGNORE N ROWSoption. Is the actual problem how to ignore the header row? In that case you need to useHEADER ON. If you want to match header and column names,HEADER MATCH