SELECT..INTO OUTFILE - ERROR 1086 (HY000)
Hi,
When I try the following, the query runs for the first time, then in subsequent runs mysql, reports that the file already exists. I check the directory but the file does not exist. What's going on here? THanks in advance for your help.
mysql> SELECT acct,pers,mac,ip,since,last,lobbycount,lobbysecs,gamecount,gamesecs,
-> passivesecs,foreign_uid,hwflag,hwmask
-> INTO OUTFILE '/tmp/ernie_test.out'
-> FIELDS TERMINATED BY ','
-> LINES TERMINATED BY '\n'
-> FROM metrics.TODAYS_SNAPSHOT;
ERROR 1086 (HY000): File '/tmp/ernie_test.out' already exists
mysql> exit
Bye
[mysql@eandba2 dbscripts]$ ls -lrt /tmp/ernie_test.out
ls: /tmp/ernie_test.out: No such file or directory