Re: Mysql permissions

Jeff Vian <[email protected]> Wed, 27 Aug 2003 15:06:50 -0500
Newsgroups gmane.org.user-groups.aclug.linux-help
Message-ID <[email protected]>

bruce bales wrote:

>Jeff Vian wrote:
>
>  
>
>>the use of the word "outfile" followed by the actual filename is not 
>>legal.  It is used in the documentation to represent the filename being 
>>saved to and MUST be replaced by the actual filename in the command.
>> 
>>
>>    
>>
>I'm afraid you're wrong here, Jeff.  The examples in the book all show:
>
>SELECT * INTO OUTFILE 'books.dat'  FROM BOOK
>
>If I leave out the word 'outfile', I get sql error.
>
>Likewise, to input data from a table it's
>
>mysql> LOAD DATA LOCAL INFILE "event.txt" INTO TABLE event;
>
>bruce
>  
>
OOPS:

I was going from memory and did not test it before I opened mouth and 
inserted foot.
:-(

 From the documentation the syntax should be:

SELECT a,b,a+b INTO OUTFILE "/tmp/result.text"
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY "\n"
FROM test_table;

Thank you for pointing that out:
:-)



-- This is the [email protected] list.  To unsubscribe,
visit http://www.complete.org/cgi-bin/listargate-aclug.cgi