CSV import

2007-05-28 Thread Sharique uddin Ahmed Farooqui
I want to import data from a CSV file in a table. MySql admin doesn't support import from CSV files. Format of data is different from structure of table. Is there any app/snippet written for this task in .net , which I can modify according to my need. -- Sharique uddin Ahmed Farooqui (C++/C#

Re: Table compression with write (append) support

2007-05-28 Thread Kevin Hunter
At 12:31a -0400 on 28 May 2007, Dan Nelson wrote: In the last episode (May 27), Yves Goergen said: I'm thinking about using a MySQL table to store an Apache access log and do statistics on it. Currently all access log files are stored as files and compressed by day. Older log files are

Re: restore one database.

2007-05-28 Thread Ananda Kumar
Hi Geoffroy, Very true, restore depends on the kind of backup we do. I was just wondering if mysql has any option to restore just one database from the mysqldump having all the database. So, as of now mysql does not provided option to just restore just one database from dump having all

row lock

2007-05-28 Thread C K
My client got a strange problem today. Mysql returned err no 1205. lock wait timeout exceeded. why? this error occured while updating the record. This error isproduced for a single record. I have checked if that record is in use while updating etc., but this record is not in use. I wait for some

RE: CSV import

2007-05-28 Thread Sandesh Nair
Try SQLYOG software Thanks Regards, Sandesh Nair -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sharique uddin Ahmed Farooqui Sent: Monday, May 28, 2007 11:56 AM To: mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: CSV import I want to import

RE: restore one database.

2007-05-28 Thread Geoffroy Cogniaux
Yes it is. This is why I suggest dumping db per db. Bye. -Message d'origine- De : Ananda Kumar [mailto:[EMAIL PROTECTED] Envoyé : lundi 28 mai 2007 10:41 À : Geoffroy Cogniaux Cc : John Meyer; MySQL General Objet : Re: restore one database. Hi Geoffroy, Very true, restore depends on

Re: Table compression with write (append) support

2007-05-28 Thread Yves Goergen
On 28.05.2007 09:06 CE(S)T, Kevin Hunter wrote: At 12:31a -0400 on 28 May 2007, Dan Nelson wrote: You want the ARCHIVE storage engine. http://dev.mysql.com/doc/refman/5.0/en/archive-storage-engine.html Hm, it doesn't support deleting rows and it cannot use indexes. So doing statistics on them

Re: CSV import

2007-05-28 Thread Geoffroy Cogniaux
Hi, It can be done easily with PhpMyAdmin, but it is not in .net 2007/5/28, Sharique uddin Ahmed Farooqui [EMAIL PROTECTED]: I want to import data from a CSV file in a table. MySql admin doesn't support import from CSV files. Format of data is different from structure of table. Is there any

Re: Database design

2007-05-28 Thread Officelink
Thanks for the reply. I've spent some time considering your suggestions and have tried to normalise the data further. I'm not sure whether I've gone from one extreme to the other though - instead of 2 tables, I've now got 17 tables!! I've included the code I used after the following info (see

Re: Table compression with write (append) support

2007-05-28 Thread Baron Schwartz
Yves Goergen wrote: On 28.05.2007 09:06 CE(S)T, Kevin Hunter wrote: At 12:31a -0400 on 28 May 2007, Dan Nelson wrote: You want the ARCHIVE storage engine. http://dev.mysql.com/doc/refman/5.0/en/archive-storage-engine.html Hm, it doesn't support deleting rows and it cannot use indexes. So

Re: row lock

2007-05-28 Thread Baron Schwartz
Hi, C K wrote: My client got a strange problem today. Mysql returned err no 1205. lock wait timeout exceeded. why? this error occured while updating the record. This error isproduced for a single record. I have checked if that record is in use while updating etc., but this record is not in use.

Re: CSV import

2007-05-28 Thread Sharique uddin Ahmed Farooqui
Both PhpMyAdmin and SQLYOG doesn't support customised mapping. My cvs data structure is diff from mysql table. I just want to import values for one field only. Previously I was using Mysql Front but it crashes. Also this s/w very old and discontinued. Why mysql doesn't implement it in

Re: CSV import

2007-05-28 Thread Baron Schwartz
Sharique uddin Ahmed Farooqui wrote: Both PhpMyAdmin and SQLYOG doesn't support customised mapping. My cvs data structure is diff from mysql table. I just want to import values for one field only. Previously I was using Mysql Front but it crashes. Also this s/w very old and discontinued. Why

Re: Tellico and MySQL

2007-05-28 Thread Baron Schwartz
John Meyer wrote: I'm still searching online, but does anybody know of a script that will input a tellico database into MySQL? I had to look up what tellico is. Given that it uses XML, it should not be too hard to write such a script. I did something similar for GnuCash. It's ironic that

Re: General Questions About Indexes

2007-05-28 Thread Baron Schwartz
Hi John, John Kebbel wrote: INDEXES - A Science AND an Art I've been continuing to look for answers to my own questions. I've found a few ... I meant to write back and try to help, but got busy with other things. You have found some good answers for yourself. Q1. What good does it do to

Re: Strange result from multiple JOIN

2007-05-28 Thread Baron Schwartz
Dave Dyer wrote: I'm trying to construct a join, but the effect I want seems to be impossible to achieve. In this schema, the uid field is unique in the players table, but not in the ranking table (one player per uid, multiple rankings per player) I want to select player names and rankings

Re: Table compression with write (append) support

2007-05-28 Thread Kevin Hunter
At 5:45a -0400 on 28 May 2007, Yves Goergen wrote: On 28.05.2007 09:06 CE(S)T, Kevin Hunter wrote: In particular, I imagine a lot of the HTTP requests would be the same, so you could create a table to store the requested URLs, and then have a second table with the timestamp and foreign key

Exporting Data To File and Can't Create/Write to File

2007-05-28 Thread John Kopanas
I am doing the following: echo 'SELECT * FROM jobs WHERE id = 1 INTO OUTFILE /Users/jkopanas/Sites/test_this_out.csv;' | mysql -uroot backlog_development And I get the following error: ERROR 1 (HY000) at line 1: Can't create/write to file '/Users/jkopanas/Sites/test_this_out.csv' (Errcode: 13)

Re: Exporting Data To File and Can't Create/Write to File

2007-05-28 Thread Baron Schwartz
Hi, John Kopanas wrote: I am doing the following: echo 'SELECT * FROM jobs WHERE id = 1 INTO OUTFILE /Users/jkopanas/Sites/test_this_out.csv;' | mysql -uroot backlog_development And I get the following error: ERROR 1 (HY000) at line 1: Can't create/write to file

Re: Table compression with write (append) support

2007-05-28 Thread Yves Goergen
On 28.05.2007 18:34 CE(S)T, Kevin Hunter wrote: At 5:45a -0400 on 28 May 2007, Yves Goergen wrote: Also, URLs sometimes contain things like session IDs. They're probably not of interest for my use but it's not always easy to detect them for removal. Really? Why wouldn't it be easy to

Re: CSV import

2007-05-28 Thread Martijn Tonies
Both PhpMyAdmin and SQLYOG doesn't support customised mapping. My cvs data structure is diff from mysql table. I just want to import values for one field only. Database Workbench does, see www.upscene.com Previously I was using Mysql Front but it crashes. Also this s/w very old and

Re: Exporting Data To File and Can't Create/Write to File

2007-05-28 Thread John Kopanas
Directory existed but I did not have the right permissions on the directory for the mysql user. Thanks my friend. :-) On 5/28/07, Baron Schwartz [EMAIL PROTECTED] wrote: Hi, John Kopanas wrote: I am doing the following: echo 'SELECT * FROM jobs WHERE id = 1 INTO OUTFILE

Re: Strange result from multiple JOIN

2007-05-28 Thread Dave Dyer
Thanks, it turns out you are exactly right. I rewrote the query to keep the on immediately following the left join and it now works as I wish. I'll have to read up on cross join, but if there is a mysql bug here, it is that the parser that what I wrote as left join was turned into a cross

Re: Strange result from multiple JOIN

2007-05-28 Thread Baron Schwartz
Dave Dyer wrote: Thanks, it turns out you are exactly right. I rewrote the query to keep the on immediately following the left join and it now works as I wish. I'll have to read up on cross join, but if there is a mysql bug here, it is that the parser that what I wrote as left join was turned

block privileges

2007-05-28 Thread Ricardo Conrado Serafim
Hi, I need to know if it's possible block things like store procedures, triggers, etc in MySQL 5.0 using grant statement. Some users can't uses this stuff. If someone knows please help me. Regards, -- Ricardo Conrado Serafim DBA Júnior (MySQL) URANET Projetos e Sistemas www.uranet.com.br

selecting the last and second last id's

2007-05-28 Thread ross
My primary id is an auto incrementing table and I want to return the highest and second highest id. Any ideas?

Re: selecting the last and second last id's

2007-05-28 Thread mos
At 04:00 PM 5/28/2007, [EMAIL PROTECTED] wrote: My primary id is an auto incrementing table and I want to return the highest and second highest id. Any ideas? You should of course have an index on Rcd_Id: Select rcd_id from mytable order by rcd_id desc limit 2 mike -- MySQL General

Re: selecting the last and second last id's

2007-05-28 Thread Baron Schwartz
Hi! [EMAIL PROTECTED] wrote: My primary id is an auto incrementing table and I want to return the highest and second highest id. Any ideas? The simplest answer I can think of is SELECT id FROM tbl ORDER BY id DESC LIMIT 2; This general problem, and its variations, has many solutions,

Re: block privileges

2007-05-28 Thread Anoop kumar V
http://dev.mysql.com/doc/refman/5.0/en/revoke.html You can use: REVOKE ALTER ROUTINE, CREATE ROUTINE, EXECUTE ON * TO USER; Anoop On 5/28/07, Ricardo Conrado Serafim [EMAIL PROTECTED] wrote: Hi, I need to know if it's possible block things like store procedures, triggers, etc in MySQL 5.0