Question
MySQL query question
MySQL version 4.0.25-standard
I've tried to run this query to write the contents of a table to a file:
SELECT * FROM `commingEvents` WHERE 1
select event, location, eventTime, eventDate
into outfile 'wmEvents.csv'
fields terminated by ',' optionally enclosed by '"'
lines terminated by '\n'
But get the following error:
SELECT *
FROM `commingEvents`
WHERE 1
SELECT event, location, eventTime, eventDate
INTO OUTFILE 'wmEvents.csv'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
MySQL said:
#1064 - You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use near
'select event, location, eventTime, eventDate
into outfile 'wmE
Could someone please help me with the correct syntax?
Thank You
Jeff
I've tried to run this query to write the contents of a table to a file:
SELECT * FROM `commingEvents` WHERE 1
select event, location, eventTime, eventDate
into outfile 'wmEvents.csv'
fields terminated by ',' optionally enclosed by '"'
lines terminated by '\n'
But get the following error:
SELECT *
FROM `commingEvents`
WHERE 1
SELECT event, location, eventTime, eventDate
INTO OUTFILE 'wmEvents.csv'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
MySQL said:
#1064 - You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use near
'select event, location, eventTime, eventDate
into outfile 'wmE
Could someone please help me with the correct syntax?
Thank You
Jeff
