Re: INTO OUTFILE ERROR...

2014-09-22 Thread Reindl Harald
LEGES" why in the world did i post the link to the answer last friday if people are too lazy to read.... GRANT FILE ON *.* TO 'asdfsdf'@'localhost'; is a global setting because you access *the hosts FILESYSTEM* with it http://lmgtfy.com/?q=mysql+permissions+into+outfile http://stackoverflow.com/questions/6091427/mysql-into-outfile-access-denied-but-my-user-has-all-access-and-the-fold signature.asc Description: OpenPGP digital signature

Re: INTO OUTFILE ERROR...

2014-09-22 Thread william drescher
On 9/19/2014 10:59 AM, Don Wieland wrote: On Sep 19, 2014, at 7:50 AM, Reindl Harald wrote: the target folder don't matter that is clearly a *MySQL error* that your *MYSQL user* lack the needed permissions Yes i figured that - so the question is, how do I give full permissions to that user?

Re: INTO OUTFILE ERROR...

2014-09-21 Thread Divesh Kamra
room_id > JOIN tl_users u on u.user_id = apt.user_id > > WHERE > > apt.time_start between '1388552400' and '1420088399' > and r.location_id = '1' > > GROUP BY u.user_id, c.client_id > having count(*) > 1 > > ORDER BY u.first_nam

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Mogens Melander
Maybe you need to grant access from localhost to the user? On Fri, September 19, 2014 16:59, Don Wieland wrote: > On Sep 19, 2014, at 7:50 AM, Reindl Harald wrote: > >> the target folder don't matter >> that is clearly a *MySQL error* that your *MYSQL user* lack the needed >> permissions > > Yes i

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Don Wieland
On Sep 19, 2014, at 9:11 AM, Christophe wrote: > Don't you have root access to MySQL instance ? I guess not, I am using a managed server VPSLatch. I chatted with them and they are going to GRANT the permissions I need…at least that is what the tech said. I waiting with baited breath ;oP Thanks

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Christophe
Le 19/09/2014 18:00, Christophe a écrit : Hi there, Le 19/09/2014 17:19, Don Wieland a écrit : grant all privileges on teal1dwd_teal.* to 'teal1dwd_teal'@'localhost' identified by 'my_user_pw'; I get this error: #1044 - Access denied for user 'teal1dwd'@'localhost' to database 'teal

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Christophe
Hi there, Le 19/09/2014 17:19, Don Wieland a écrit : grant all privileges on teal1dwd_teal.* to 'teal1dwd_teal'@'localhost' identified by 'my_user_pw'; I get this error: #1044 - Access denied for user 'teal1dwd'@'localhost' to database 'teal1dwd_teal' I think you are trying to ac

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Don Wieland
@'localhost' to database 'teal1dwd_teal' Do I need to perform this query in a different place? Sigh… Don On Sep 19, 2014, at 8:03 AM, Reindl Harald wrote: > "into outfile" is *not* a db-specific permission > > http://lmgtfy.com/?q=mysql+permissions+into

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Reindl Harald
the question is, how do I give full permissions to > that user? > > I did go to my cPanel and delete the user and recreated the user adding them > to the DB with ALL PRIVILEGES. > Obviously this is not enough. "into outfile" is *not* a db-specific permission http://lmgtfy.co

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Don Wieland
On Sep 19, 2014, at 7:50 AM, Reindl Harald wrote: > the target folder don't matter > that is clearly a *MySQL error* that your *MYSQL user* lack the needed > permissions Yes i figured that - so the question is, how do I give full permissions to that user? I did go to my cPanel and delete the u

Re: INTO OUTFILE ERROR...

2014-09-19 Thread Reindl Harald
room_id = apt.room_id > JOIN tl_users u on u.user_id = apt.user_id > > WHERE > > apt.time_start between '1388552400' and '1420088399' > and r.location_id = '1' > > GROUP BY u.user_id, c.client_id > having count(*) > 1 > > ORDER BY u.fi

INTO OUTFILE ERROR...

2014-09-19 Thread Don Wieland
oom_id = apt.room_id JOIN tl_users u on u.user_id = apt.user_id WHERE apt.time_start between '1388552400' and '1420088399' and r.location_id = '1' GROUP BY u.user_id, c.client_id having count(*) > 1 ORDER BY u.first_name, u.last_name, c.last_name, c.fi

Re: Mysql into outfile problem

2014-02-19 Thread Carsten Pedersen
I don't know what you mean by "straight" mysql connection. At any rate, the idea is to use --quick or otherwise using a connection which uses mysql_use_result over mysql_store_result. http://dev.mysql.com/doc/refman/5.6/en/mysql.html Best, / Carsten On 19-02-2014 12:02, Machiel Richards wrot

Re: Mysql into outfile problem

2014-02-19 Thread Johan De Meersman
- Original Message - > From: "Machiel Richards" > Subject: Re: Mysql into outfile problem > > I have checked now and there is nothing in the Slow logs. It may be turned off, then. Depending on your version you can change the settings without having to restart th

Re: Mysql into outfile problem

2014-02-19 Thread Machiel Richards
I have checked now and there is nothing in the Slow logs. On 19/02/2014 15:33, Johan De Meersman wrote: - Original Message - From: "Machiel Richards" Subject: Mysql into outfile problem - when we run an explain on the query it shows that it is using index

Re: Mysql into outfile problem

2014-02-19 Thread Johan De Meersman
- Original Message - > From: "Machiel Richards" > Subject: Mysql into outfile problem > > - when we run an explain on the query it shows that it is > using indexes and the amount of rows it accesses is about 165000 rows > out of a 90mil+ rows t

Re: Mysql into outfile problem

2014-02-19 Thread Machiel Richards
Hi, the queries are done by connecting to the database using mysql workbench or otherwise after ssh to server by using straight mysql connection. regards On 19/02/2014 12:51, Carsten Pedersen wrote: If you're doing this from the cmd-line client, try running it using --quick. th Best,

Re: Mysql into outfile problem

2014-02-19 Thread Carsten Pedersen
If you're doing this from the cmd-line client, try running it using --quick. Best, / Carsten On 19-02-2014 09:03, Machiel Richards wrote: Hi guys I am hoping that someone might have experienced this before or might know why we are getting this. We regularly need to run some quer

Mysql into outfile problem

2014-02-19 Thread Machiel Richards
Hi guys I am hoping that someone might have experienced this before or might know why we are getting this. We regularly need to run some queries and export the results to a csv file. However we seem to be experiencing the following issues: - when we run an exp

Re: How do I use a dynamic filename for an into outfile statement

2012-03-01 Thread Paul DuBois
s missing software) > > select last_logon.host_name_short > from last_logon > left join mcafee on last_logon.host_name_short = last_logon.host_name_short > where mcafee.host_name_short is null > and last_logon.host_name_short like 'w%' > -- the above works > into out

Re: How do I use a dynamic filename for an into outfile statement

2012-03-01 Thread Johan De Meersman
By using your shell's variable substitution, I'm afraid. export outfile='/path/to/file' mysql -e "select blah into outfile '$outfile'" You'll have to build a shell script or something that generates your filename, and then do an interactive ca

Re: How do I use a dynamic filename for an into outfile statement

2012-03-01 Thread Hal�sz S�ndor
2012/02/29 11:43 -0500, Ed Patterson The select concat() works from the command line I can manually add the file name but would like to automate the process Lastly, if it makes a difference, I don't use any graphical tools for DB stuff. Look up the command! http://dev.mysql.com/

How do I use a dynamic filename for an into outfile statement

2012-02-29 Thread Ed Patterson
mcafee on last_logon.host_name_short = last_logon.host_name_short where mcafee.host_name_short is null and last_logon.host_name_short like 'w%' -- the above works into outfile (select concat('Missing-',date_format(now(),'%Y%m%d%H%i'),'txt'); -- this line break

Re: Permissions and Into Outfile

2010-07-09 Thread Tong Anh Quan
Hi all, >From the manual: *Any file created by INTO OUTFILE or INTO DUMPFILE is writable by all users on the server host. The reason for this is that the MySQL server cannot create a file that is owned by anyone other than the user under whose account it is running. (You should never run mys

Re: Select Into OUTFILE problem

2009-05-14 Thread Bruce Ferrell
Thanks all who replied. After I posted I kept looking and found it... Also had folks point it out to me. Your suggestion is what I ended up doing. Bruce Gavin Towey wrote: > Hi Bruce, > > > > SELECT … INTO OUTFILE always creates the file local to the database > serve

RE: Select Into OUTFILE problem

2009-05-14 Thread Gavin Towey
Hi Bruce, SELECT ... INTO OUTFILE always creates the file local to the database server. If you want to dump results where your perl script is running you'll have to use another method such as receiving the results of the query normally and writing the file in the perl script. Re

Select Into OUTFILE problem

2009-05-13 Thread Bruce Ferrell
I have a bit of perl code that ends with an error: $sql="SELECT convert_tz( a.stamp,'GMT','$tz' ) as ts, a.status, a.reason, a.tl INTO OUTFILE '/application/result.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '\&qu

select into outfile php problem

2008-10-20 Thread kalin m
hi all... i have a strange problem with a simple script that is doing select into outfile... the thing just does that. it does a select into an outfile. if i print the query that's passed to mysql_result in the script and then copy it and paste it z`into the mysql client it works fin

Re: select ... into outfile=stdout ?

2008-10-20 Thread Moon's Father
e same meaning as > the corresponding clauses for LOAD DATA INFILE. See Section 12.2.6, "LOAD > DATA INFILE Syntax". > >> > >> By default, its output to stdout. > >> > >> Give it a try !!! > >> > >> -Original Message- > &

Re: select ... into outfile=stdout ?

2008-10-19 Thread walter harms
> >> -Original Message----- >> From: walter harms [mailto:[EMAIL PROTECTED] >> Sent: Thursday, October 16, 2008 5:06 AM >> To: 'mysql' >> Subject: select ... into outfile=stdout ? >> >> hi list, >> i need some options from outfile (exspec

Re: select ... into outfile=stdout ?

2008-10-19 Thread walter harms
By default, its output to stdout. > > Give it a try !!! > > -Original Message- > From: walter harms [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 16, 2008 5:06 AM > To: 'mysql' > Subject: select ... into outfile=stdout ? > > hi list, > i need some options

RE: select ... into outfile=stdout ?

2008-10-16 Thread Rolando Edwards
x27; Subject: select ... into outfile=stdout ? hi list, i need some options from outfile (exspecialy:FIELDS TERMINATED BY) and would like to send the output to stdout to further processing. unfortunately i found no proper way to force the output to stdout. for now i use the redirection of the &q

select ... into outfile=stdout ?

2008-10-16 Thread walter harms
lacks the options of into outfile. (It is easy to fix using tr but not what was intended). i tried /dev/stdout but this does not work either. any ideas ? re, wh -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: how to escape new lines using select * into outfile

2008-05-13 Thread Saravanan
pe new lines using select * into outfile > To: [EMAIL PROTECTED] > Cc: mysql@lists.mysql.com > Date: Wednesday, May 14, 2008, 1:35 AM > Try using: > > select * into outfile 'filename.csv' fields > enclosed by '"' terminated by > ',' lines

Re: how to escape new lines using select * into outfile

2008-05-13 Thread Velen
Try using: select * into outfile 'filename.csv' fields enclosed by '"' terminated by ',' lines terminated by '\n' from table Regards, Velen - Original Message - From: "Saravanan" <[EMAIL PROTECTED]> To: "mysql"

RE: how to escape new lines using select * into outfile

2008-05-13 Thread Jerry Schwartz
mysql >Subject: how to escape new lines using select * into outfile > >Hi all, > >I want to export the values based on the condition. I export them as >csv. > >select * into outfile 'filename.csv' from table; > >the problem is one field in table has many lines, m

how to escape new lines using select * into outfile

2008-05-13 Thread Saravanan
Hi all, I want to export the values based on the condition. I export them as csv. select * into outfile 'filename.csv' from table; the problem is one field in table has many lines, means with \n. I couldn't import the values into the xls sheet. any ideas how to escape the new

Re: mysqldump: Got error: 1: Can't create/write to file 'dumpdir/tablename.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'

2008-02-22 Thread Jed Reynolds
: mysqldump: Got error: 1: Can't create/write to file '/dump1/red1_p2.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE' I'm reading thru http://dev.mysql.com/doc/refman/5.0/en/select.html and it says that it will not write to an already existing file (so

Re: mysqldump: Got error: 1: Can't create/write to file 'dumpdir/tablename.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'

2008-02-22 Thread Mike Spreitzer
te to file '/dump1/red1_p2.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE' [EMAIL PROTECTED] /]# ls -l dump1 total 8 -rw-r--r-- 1 root root 742 Feb 22 20:46 red1_p2.sql [EMAIL PROTECTED] /]# ps axlw | grep mysqld 0 0 8494 1 25 0 3408 944 wait Spts/

Re: mysqldump: Got error: 1: Can't create/write to file 'dumpdir/tablename.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'

2008-02-22 Thread Jed Reynolds
what happens when you delete the files that are already in there? Looks like you're dumping to a file owned by root. Jed -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: mysqldump: Got error: 1: Can't create/write to file 'dumpdir/tablename.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'

2008-02-22 Thread Mike Spreitzer
ed1_p2.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE' [EMAIL PROTECTED] /]# ls -ld /dump1 drwxrwxrwx 2 mysql mysql 4096 Feb 22 19:11 /dump1 [EMAIL PROTECTED] /]# ls -l /dump1 total 16 -rw-r--r-- 1 mysql mysql 29 Feb 22 18:38 foo.bar -rw-r--r-- 1 root root 742 Feb 22

Re: mysqldump: Got error: 1: Can't create/write to file 'dumpdir/tablename.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'

2008-02-22 Thread Jed Reynolds
Mike Spreitzer wrote: So I am trying to use mysqldump --tab for the first time. I am running into the same problem everybody does on their first try --- Errcode: 13. I have set the permissions on the target directory to be completely liberal --- anybody can do anything with it --- and I still

mysqldump: Got error: 1: Can't create/write to file 'dumpdir/tablename.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'

2008-02-22 Thread Mike Spreitzer
So I am trying to use mysqldump --tab for the first time. I am running into the same problem everybody does on their first try --- Errcode: 13. I have set the permissions on the target directory to be completely liberal --- anybody can do anything with it --- and I still get Errcode: 13. I ca

RE: Permissions and Into Outfile

2007-04-28 Thread John Kebbel
Thank you. It's working now. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Permissions and Into Outfile

2007-04-28 Thread Mogens Melander
Ok, on my linux (slackware 10) /var/www is owner by root.root with permissions rwxr-xr-x (755). Say you want mysql to put your data in a subdirectory under /var/www named data. As root, do: mkdir /var/www/data chgrp mysql /var/www/data chmod 775 /var/www/data Now mysql has write permissions to /

RE: Permissions and Into Outfile

2007-04-27 Thread John Kebbel
I experimented with a local /var/www folder. I assumed setting 2, 6, or 7 for the Other value would give mysql write privileges, but mysql would not settle for anything less than a 7 in that last slot. What was really curious to me was that the User and Group settings were inconsequential. I even s

RE: Permissions and Into Outfile

2007-04-27 Thread Mogens Melander
ctory to some other folder? > >> -- >> From:Gerald L. Clark >> Sent:Friday, April 27, 2007 10:09 AM >> To: Kebbel, John >> Cc: mysql@lists.mysql.com >> Subject: Re: Permissions and Into Outfile >> >> Kebbel, John wrote: >> >

Re: Permissions and Into Outfile

2007-04-27 Thread Gerald L. Clark
Kebbel, John wrote: cat /etc/passwd on my Macintosh 10.3 at work (I'm using Linux at home) shows me this for mysql ... mysql:*:74:74:MySQL Server:/var/empty:/usr/bin/false The home directory for mysql is /var/empty, which does exist. Should I write ~into file~ output to this folder or should

RE: Permissions and Into Outfile

2007-04-27 Thread Kebbel, John
mysql home directory to some other folder? > -- > From: Gerald L. Clark > Sent: Friday, April 27, 2007 10:09 AM > To: Kebbel, John > Cc: mysql@lists.mysql.com > Subject: Re: Permissions and Into Outfile > > Kebbel, John wrote: > > I

Re: Permissions and Into Outfile

2007-04-27 Thread Gerald L. Clark
sketball, 9SDrama, 9SDriverEd1, 9SDriverEd2, 9SRecreation, 9STeamSports1, 9STeamSports2, 9SWeights into outfile '/tmp/srhs9.txt' from sched_students, SCHED_COURSES where (sched_students.id = SCHED_COURSES.id) and (grade = 8) order by lastname, firstname; The user 'mysql'

Permissions and Into Outfile

2007-04-27 Thread Kebbel, John
sketball, 9SDrama, 9SDriverEd1, 9SDriverEd2, 9SRecreation, 9STeamSports1, 9STeamSports2, 9SWeights into outfile '/tmp/srhs9.txt' from sched_students, SCHED_COURSES where (sched_students.id = SCHED_COURSES.id) and (grade = 8) order by lastname, firstname; -- MyS

RE: Select into outfile on nfs mount point

2007-03-26 Thread David Ruggles
ginal Message- From: Jerry Schwartz [mailto:[EMAIL PROTECTED] Sent: Monday, March 26, 2007 12:06 PM To: 'David Ruggles'; mysql@lists.mysql.com Subject: RE: Select into outfile on nfs mount point Can you "touch" the file name? It might be a permission issue at the dire

RE: Select into outfile on nfs mount point

2007-03-26 Thread David Ruggles
, March 26, 2007 12:37 PM To: David Ruggles Subject: RE: Select into outfile on nfs mount point >>> Date: Monday, March 26, 2007 11:50:59 AM -0400 >>> From: David Ruggles <[EMAIL PROTECTED]> >>> To: mysql@lists.mysql.com >>> Subject: Select into outfile

RE: Select into outfile on nfs mount point

2007-03-26 Thread David Ruggles
ECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 26, 2007 12:01 PM To: David Ruggles Subject: Re: Select into outfile on nfs mount point the file on the mount point has to be able to be created, and read/write by the user that is invoking the mysql call. e.g., if this is begin done at the comman

RE: Select into outfile on nfs mount point

2007-03-26 Thread Jerry Schwartz
m: David Ruggles [mailto:[EMAIL PROTECTED] > Sent: Monday, March 26, 2007 11:51 AM > To: mysql@lists.mysql.com > Subject: Select into outfile on nfs mount point > > I'm unable to select into an outfile, the path is in an nfs > mount point. I'm > sure it's some s

Select into outfile on nfs mount point

2007-03-26 Thread David Ruggles
I'm unable to select into an outfile, the path is in an nfs mount point. I'm sure it's some sort of permissions issue or something, but I can't figure it out. I've googled everything I can think of and haven't found anything. Any help or suggestions would be greatly appreciated. The error I'm gett

Re: SELECT data FROM two tables into outfile

2007-02-05 Thread Rolando Edwards
SELECT header.date_in,header.pid,header.status,body.body_data into outfile '/tmp/mysql/117070515226878' from header,body where header.date_in='1170705152' and body.date_in=header.date_in and header.pid='26878' and body.pid=header.pid ; - Original Message -

SELECT data FROM two tables into outfile

2007-02-05 Thread List User
Hello list: Need some help with the following query: mysql> SELECT header.date_in,header.pid,header.status,body.body_data from header,body where header.date_in='1170705152' and body.date_in=header.date_in and header.pid='26878' and body.pid=header.pid into outfile '/t

Re: Charset for SELECT ... INTO OUTFILE

2006-10-09 Thread Visolve DB Team
er 09, 2006 2:23 PM Subject: Charset for SELECT ... INTO OUTFILE > Hi, > > I have a database where the database character set is utf-8 and some rows > are ascii. > > I want to save the results of some queries, and SELECT ... INTO OUTFILE > looks like an easy way to do it. But I n

Charset for SELECT ... INTO OUTFILE

2006-10-09 Thread imre
Hi, I have a database where the database character set is utf-8 and some rows are ascii. I want to save the results of some queries, and SELECT ... INTO OUTFILE looks like an easy way to do it. But I need the output in ucs-2. Is there any way to specify the charset for SELECT ... INTO OUTFILE

RE: ~problem with select into outfile~

2006-04-13 Thread Addison, Mark
From: Mohammed Abdul Azeem Sent: 13 April 2006 07:29 > > Hi > > Iam having a problem using "select into outfile" command, iam getting > the following error. can anyone help me trace the problem. > > mysql> SELECT * INTO OUTFILE'/home/public1/data.txt&#x

~problem with select into outfile~

2006-04-12 Thread Mohammed Abdul Azeem
Hi Iam having a problem using "select into outfile" command, iam getting the following error. can anyone help me trace the problem. mysql> SELECT * INTO OUTFILE'/home/public1/data.txt' FROM temp_table WHERE last_time_update = "2006-04-01"; ERROR 1 (HY000):

Re: how to suppress NULL values in SELECT ... INTO OUTFILE ?

2006-04-02 Thread C.R.Vegelin
Thanks Jorrit, Yes, it is a combi of Paul's suggestion to use IFNULL() with the ENCLOSED BY '' option. So when using: Select IFNULL(Jan,''), IFNULL(Feb,''), ... Into Outfile ... Fields Terminated By ';' Enclosed By '' Escaped By ''

Re: how to suppress NULL values in SELECT ... INTO OUTFILE ?

2006-04-02 Thread Jorrit Kronjee
;[EMAIL PROTECTED]> To: "C.R.Vegelin" <[EMAIL PROTECTED]>; Sent: Saturday, April 01, 2006 6:11 PM Subject: Re: how to suppress NULL values in SELECT ... INTO OUTFILE ? At 13:29 +0100 4/1/06, C.R.Vegelin wrote: Hi everyone, I am struggling to make a CSV file, with rows like:

Re: how to suppress NULL values in SELECT ... INTO OUTFILE ?

2006-04-01 Thread C.R.Vegelin
o extend the FIELDS options to enable this ... Regards, Cor - Original Message - From: "Paul DuBois" <[EMAIL PROTECTED]> To: "C.R.Vegelin" <[EMAIL PROTECTED]>; Sent: Saturday, April 01, 2006 6:11 PM Subject: Re: how to suppress NULL values in SELECT ... IN

Re: how to suppress NULL values in SELECT ... INTO OUTFILE ?

2006-04-01 Thread Paul DuBois
At 13:29 +0100 4/1/06, C.R.Vegelin wrote: Hi everyone, I am struggling to make a CSV file, with rows like: 1;2;;4;;2;9 where NULL values are suppressed in the CSV file. I tried the following alternatives: a) Select ... Into Outfile ... Fields Terminated By ';' Escaped By ''

how to suppress NULL values in SELECT ... INTO OUTFILE ?

2006-04-01 Thread C.R.Vegelin
Hi everyone, I am struggling to make a CSV file, with rows like: 1;2;;4;;2;9 where NULL values are suppressed in the CSV file. I tried the following alternatives: a) Select ... Into Outfile ... Fields Terminated By ';' Escaped By '' Lines Terminated By '\r\n&#x

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-14 Thread Jake Peavy
EMAIL PROTECTED]> wrote: > > > > > > > Hi Ariel, > > > > > > > > Maybe this example helps you to create CSV output from MySQL. > > > > The first SELECT generates the headerline; the second the data. > > > > ( SELECT 'Fi

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-14 Thread SGreen
is example helps you to create CSV output from MySQL. > > > The first SELECT generates the headerline; the second the data. > > > ( SELECT 'FieldA','FieldB','FieldC', ... ) > > > UNION > > > ( SELECT `FieldA`, `FieldB`, `FieldC`, ... >

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-14 Thread Jake Peavy
data. > > ( SELECT 'FieldA','FieldB','FieldC', ... ) > > UNION > > ( SELECT `FieldA`, `FieldB`, `FieldC`, ... > > INTO OUTFILE 'D:/MySQL Datafiles/myFile.csv' > > FIELDS TERMINATED BY ',' > > LINES TERMINATED BY

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-10 Thread Jake Peavy
.. ) > UNION > ( SELECT `FieldA`, `FieldB`, `FieldC`, ... > INTO OUTFILE 'D:/MySQL Datafiles/myFile.csv' > FIELDS TERMINATED BY ',' > LINES TERMINATED BY '\r\n' > FROM ... ... > GROUP BY `FieldA`, `FieldB`, `FieldC`, ... > ); > > Don't forget the

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread C.R.Vegelin
Hi Ariel, Maybe this example helps you to create CSV output from MySQL. The first SELECT generates the headerline; the second the data. ( SELECT 'FieldA','FieldB','FieldC', ... ) UNION ( SELECT `FieldA`, `FieldB`, `FieldC`, ... INTO OUTFILE 'D:/MySQL Datafile

RE: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread Marciano [Intercol]
, 2006 5:12 PM To: mysql@lists.mysql.com Subject: 'Into outfile' doesn't include the column names. How can it be done? When using select into outfile, I can only get the table data, but I can't find how to include the column names. I haven't been able to include the column names in

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread Paul DuBois
At 14:12 -0600 3/6/06, Ariel Sánchez Mora wrote: When using select into outfile, I can only get the table data, but I can't find how to include the column names. I haven't been able to include the column names into the actual return of the query, and they don't get stored in th

Re: 'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread SGreen
Ariel Sánchez Mora <[EMAIL PROTECTED]> wrote on 03/06/2006 03:12:20 PM: > When using select into outfile, I can only get the table data, but I > can't find how to include the column names. I haven't been able to > include the column names into the actual return of the

'Into outfile' doesn't include the column names. How can it be done?

2006-03-06 Thread Ariel Sánchez Mora
When using select into outfile, I can only get the table data, but I can't find how to include the column names. I haven't been able to include the column names into the actual return of the query, and they don't get stored in the .csv Anyone know how to include the column na

Re: BLOCK SELECT INTO OUTFILE ?

2005-08-24 Thread Pat Adams
On Wed, 2005-08-24 at 10:11 -0300, Alejandro Gad wrote: > Hi, > > I am going to implement a mysql hosting, and I would to make a question, > if a mysql-user with only a "SELECT" privilege make this query: > > SELECT * FROM table1 INTO OUTFILE '/mysqldb/data/tes

Re: BLOCK SELECT INTO OUTFILE ?

2005-08-24 Thread averyanov
Wednesday, August 24, 2005, 5:11:14 PM, you wrote: > Hi, > I am going to implement a mysql hosting, and I would to make a question, > if a mysql-user with only a "SELECT" privilege make this query: > SELECT * FROM table1 INTO OUTFILE '/mysqldb/data/test.sql';

BLOCK SELECT INTO OUTFILE ?

2005-08-24 Thread Alejandro Gad
Hi, I am going to implement a mysql hosting, and I would to make a question, if a mysql-user with only a "SELECT" privilege make this query: SELECT * FROM table1 INTO OUTFILE '/mysqldb/data/test.sql'; the result is a file in this path with the content of the table.

Re: SELECT ... INTO OUTFILE ... and LOAD DATA INFILE ... with a key

2005-08-19 Thread Michael Stassen
Thomas Spahni wrote: Hi suomi, it can be done with a temporary table. See the following example. Regards, Thomas Spahni CREATE TEMPORARY TABLE duptemp SELECT * FROM duprows WHERE id = 2; ALTER TABLE duptemp CHANGE id id INT NULL; UPDATE duptemp SET id = NULL; INSERT INTO duprows SELECT * F

Re: SELECT ... INTO OUTFILE ... and LOAD DATA INFILE ... with a key

2005-08-19 Thread Thomas Spahni
in the > same table. I got no answer, so there is no such syntax. > > now i meant to have found a work-around using (see subject). > > problem is, that when i do a SELECT * ... INTO OUTFILE .. i will also > catch the PRIMARY KEY column if there is one and the LOAD DATA INFILE >

RE: SELECT ... INTO OUTFILE ... and LOAD DATA INFILE ... with a key

2005-08-19 Thread Gordon Bruce
your PRIMARY KEY is an auto_increment field, just omit foo_ID from the columns list in both the INSERT and SELECT. -Original Message- From: suomi [mailto:[EMAIL PROTECTED] Sent: Friday, August 19, 2005 7:08 AM To: mysql@lists.mysql.com Subject: SELECT ... INTO OUTFILE ... and LOAD DATA

SELECT ... INTO OUTFILE ... and LOAD DATA INFILE ... with a key

2005-08-19 Thread suomi
Hi listers I once asked if there is an SQL syntax permitting to copy a row in the same table. I got no answer, so there is no such syntax. now i meant to have found a work-around using (see subject). problem is, that when i do a SELECT * ... INTO OUTFILE .. i will also catch the PRIMARY KEY

SELECT INTO OUTFILE with UNION

2004-12-23 Thread Lynn Bender
Greetings from Austin, TX: What is the proper syntax for SELECT INTO OUTFILE in a statement with a UNION keyword, like the following: SELECT Addresses FROM editors UNION SELECT Addresses FROM authors Thanks, Lynn Bender UnsubCentral Secure Email List

Space in SELECT â INTO OUTFILE

2004-11-22 Thread regis
Please, MySQL doesn´t understands the following special escape sequence: ' \s' ? I want spaces in the export. How to do? Greetings. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: SELECT... INTO OUTFILE problem

2004-10-22 Thread Egor Egorov
"Jay Blanchard" <[EMAIL PROTECTED]> wrote: > [snip] > Exception occured in Microsoft OLE DB Provider for ODBC Drivers, > [MySQL][ODBC 3.51 Driver][mysqld-4.0.20a-nt]Can't create/write to file > 'C:\data_out\day234\data_out.txt' (Errcode: 2) [EMAIL PROTECTED] egor]$ perror 2 System error: 2 = No

RE: SELECT... INTO OUTFILE problem

2004-10-21 Thread Damon Card
As Jay said, it's either a permission issue or the file already exists. MySQL will not overwrite a file that already exists. -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Thursday, October 21, 2004 3:35 PM To: Mysql General (E-mail) Subject: RE: SELECT...

Re: SELECT... INTO OUTFILE problem

2004-10-21 Thread Ferhat BINGOL
- From: "Jay Blanchard" <[EMAIL PROTECTED]> To: "Mysql General (E-mail)" <[EMAIL PROTECTED]> Sent: Thursday, October 21, 2004 10:35 PM Subject: RE: SELECT... INTO OUTFILE problem [snip] Exception occured in Microsoft OLE DB Provider for ODBC Drivers, [MySQL][ODB

RE: SELECT... INTO OUTFILE problem

2004-10-21 Thread Jay Blanchard
[snip] Exception occured in Microsoft OLE DB Provider for ODBC Drivers, [MySQL][ODBC 3.51 Driver][mysqld-4.0.20a-nt]Can't create/write to file 'C:\data_out\day234\data_out.txt' (Errcode: 2) So I copy the query statement and send via PhpMyAdmin, it ended up as below #1 - Can't create/write to file

SELECT... INTO OUTFILE problem

2004-10-21 Thread Ferhat BINGOL
Hi, I am sending a query to a MySQL server on a network via LabView EXEC QUERY VI. It looks like that SELECT `data1` , `data2` INTO OUTFILE 'C:\\data_out\\day234\\data_out.txt' FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED B

RE: into outfile

2004-08-23 Thread mos
At 12:59 PM 8/23/2004, you wrote: If you wanted html output you could do this mysql -u -p -H -e"query_to_run" > webFile.html ... The -H switch produces HTML output. It would be real nice if they added this feature to the Select statement. :-) Mike -- MySQL General Mailing List For list archives: ht

RE: into outfile

2004-08-23 Thread Victor Pendleton
If you wanted html output you could do this mysql -u -p -H -e"query_to_run" > webFile.html ... The -H switch produces HTML output. -Original Message- From: mos To: [EMAIL PROTECTED] Sent: 8/23/04 12:11 PM Subject: Re: into outfile Scott, At 11:58 AM 8/23/2004, you w

Re: into outfile

2004-08-23 Thread mos
Scott, At 11:58 AM 8/23/2004, you wrote: SELECT foo INTO OUTFILE '\\l030k12\qcda\2004-08-03.html' WHATEVER foo; Is that possible? I seem to be doing it wrong. select * into outfile 'p:\win2ktmp\mytest.txt' from mytable where order by

into outfile

2004-08-23 Thread Scott Hamm
SELECT foo INTO OUTFILE '\\l030k12\qcda\2004-08-03.html' WHATEVER foo; Is that possible? I seem to be doing it wrong. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Into outfile

2004-07-13 Thread Jeff McKeon
Is there a way to get the output of a "select into outfile" statement to have the column headers in it and not just the data? Thanks, Jeff -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

UNION with INTO OUTFILE and ORDER BY

2004-06-28 Thread Josh Trutwin
Noticed something interesting about UNION and INTO OUTFILE If I do this: (SELECT a FROM b) UNION (SELECT a INTO OUTFILE 'out.txt' FROM c); The query executes - no results printed to the screen but rather saved to the out.txt file, as intended. But if I do: (SELECT a FROM b) UNION

Re: INTO OUTFILE error

2004-06-02 Thread Michael Stassen
Paul DuBois wrote: At 5:18 -0500 6/2/04, [EMAIL PROTECTED] wrote: There's got to be something else wrong. I've got the exact same problem and I have done a chmod 666 on the directory I am trying to write to with no luck. I am running v4.0.15 Mode is not enough, you must consider ownership. Huh?

Re: INTO OUTFILE error

2004-06-02 Thread Paul DuBois
Egorov at [EMAIL PROTECTED] wrote: John Mistler <[EMAIL PROTECTED]> wrote: Can anyone guess why I am getting this error: "ERROR 1: Can't create/write to file '/Users/johnmistler/Desktop/TestFile.txt' (ERRCODE 13)" when using this statement: mysql> SELECT * I

Re: INTO OUTFILE error

2004-06-02 Thread [EMAIL PROTECTED]
lt). > >> >> on 6/1/04 12:49 AM, Egor Egorov at [EMAIL PROTECTED] wrote: >> >>> John Mistler <[EMAIL PROTECTED]> wrote: >>>> Can anyone guess why I am getting this error: >>>> >>>> "ERROR 1: Can't create/write to file

Re: INTO OUTFILE error

2004-06-01 Thread Egor Egorov
; '/Users/johnmistler/Desktop/TestFile.txt' (ERRCODE 13)" >>> >>> when using this statement: >>> >>> mysql> SELECT * INTO OUTFILE '/Users/johnmistler/Desktop/TestFile.txt' FROM >>> theTable WHERE column1 !=

  1   2   >