Re: NewBie how to create store procedure

2005-04-11 Thread ManojW
MySQL supports Stored procedures from version 5.0 onwards...for more information see http://dev.mysql.com/doc/mysql/en/stored-procedures.html Rgds Manoj - Original Message - From: "Winanjaya" <[EMAIL PROTECTED]> To: Sent: Tuesday, April 12, 2005 2:23 PM Subject: NewBie how to create s

Re: VB.NET how to connect to MySQL 4.1 DB

2005-04-11 Thread Homam S.A.
Download the .NET connector for MySQL: http://dev.mysql.com/downloads/connector/net/1.0.html Reference it in your project and you're ready to go. It comes with plenty of code examples on how to use it. --- Winanjaya <[EMAIL PROTECTED]> wrote: > Dear All, > > Any body has experience to connec

NewBie how to create store procedure

2005-04-11 Thread Winanjaya
Dear All, I am very new to MySQL, I am using MySQL 4.1 Adminstrator, my question is very simple: how to create store procedure? ..I saw the "Create New Procedure/Function" menu but it disabled? .. please advise .. thanks Regards Winanjaya -- MySQL General Mailing List For list archives: http:/

Re: data export

2005-04-11 Thread Jarle Aase
tir, 12,.04.2005 kl. 01.04 -0400, skrev kalin mintchev: > > hi all... > > > is there a simple way to export data from mysql tables? like the opposite > of 'load data infile'? i was looking around in the manual but without > success... SELECT * from table_name into outfile '/tmp/whatever'; Jarl

data export

2005-04-11 Thread kalin mintchev
hi all... is there a simple way to export data from mysql tables? like the opposite of 'load data infile'? i was looking around in the manual but without success... thanks. -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists

VB.NET how to connect to MySQL 4.1 DB

2005-04-11 Thread Winanjaya
Dear All, Any body has experience to connect MySQL 4.1 DB from VB.NET application? please advise .. how to deal with this? thanks a lot in advance -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: How to call mysql_insert_id

2005-04-11 Thread Jan Pieter Kunst
On Apr 12, 2005 1:37 AM, Siegfried Heintze <[EMAIL PROTECTED]> wrote: > Thanks, JP. > And will this work for multi-threaded, multi-user applications? > Siegfried Yes: "The last ID that was generated is maintained in the server on a per-connection basis. This means the value the function returns t

Re: How to retain "Key" order when Deleting a Row

2005-04-11 Thread Jason Martin
On Tue, Apr 12, 2005 at 02:38:12AM +, B Wiley Snyder wrote: > I just need someone to please point me in the right direction on retaining > my "key" or id order in my table when I delete a row. So for example I have > 10 rows Id 1-10 that are created automatically when the record is inserted.

RE: How to retain "Key" order when Deleting a Row

2005-04-11 Thread John Schmidt
Hi, If I understand your question correctly, your remaining keys after the delete will be '1,2,3,4,6...'. The keys will not reorder, so five should be gone, and the next record inserted will be 11. //jjs -Original Message- From: B Wiley Snyder [mailto:[EMAIL PROTECTED] Sent: Mon 4/11/2

Group By - Is there a way to set which rows values are used for the fields not in the Group By clause?

2005-04-11 Thread Rich Carr
Is there a way to set which rows values are used by the GROUP BY clause for the fields that are not in the GROUP BY clause? In this following select statement the group by and order work but the value of the lastviewtime field is not the value of the most recent datetime row. Is there any way

How to retain "Key" order when Deleting a Row

2005-04-11 Thread B Wiley Snyder
Hello experts, I just need someone to please point me in the right direction on retaining my "key" or id order in my table when I delete a row. So for example I have 10 rows Id 1-10 that are created automatically when the record is inserted. So if I delete record with id 5 my id's are not 1,2,3,

Re: slave out of sync

2005-04-11 Thread Local
Gleb Paharenko wrote: > But if you had an updates and deletes after crashing the master your task became difficult. But the easiest way, as for me, > > is to clear the slave and setup replication again. You may use think this is what i am going to have to do as i found more errors this morning wit

RE: How to call mysql_insert_id

2005-04-11 Thread Siegfried Heintze
Thanks, JP. And will this work for multi-threaded, multi-user applications? Siegfried -Original Message- From: Jan Pieter Kunst [mailto:[EMAIL PROTECTED] Sent: Monday, April 11, 2005 3:05 PM To: mysql@lists.mysql.com Subject: Re: How to call mysql_insert_id On Apr 11, 2005 10:50 PM, Sieg

Re: How to call mysql_insert_id

2005-04-11 Thread Jan Pieter Kunst
On Apr 11, 2005 10:50 PM, Siegfried Heintze <[EMAIL PROTECTED]> wrote: > * In MySQL - mysql_insert_id() > > How do I call this function? I was hoping I could use SQL such as "SELECT > mysql_insert_id() FROM XYZ" but I discovered that does not work. I'm using a > mixture of java and perl. I

How to call mysql_insert_id

2005-04-11 Thread Siegfried Heintze
A long time ago, I posted this query: >>If I use the auto-increment feature for a couple of normallized relations, >>how do I insert into them? >>Specifically, when I insert into a relation with the autoincrement feature >>on the primary key, how do I get the value of the index on the newly cre

How many innodb_log_file and how many groups

2005-04-11 Thread Duhaime Johanne
Hello I have Mysql 4.1.7 on Solaris / innodb tables I have 2 innodb_log_files of 100M each. A group of statements (19000 insert) does that both logfiles are stamped with the same time. It might be because one has just finished filled and the other start or it might be because they both rotated

Re: After upgrade to 5.03beta, mysqld won't start

2005-04-11 Thread John Swartzentruber
On 4/10/2005 10:57 AM Gleb Paharenko wrote: Hello. What is in error log? See: http://dev.mysql.com/doc/mysql/en/starting-server.html As I said, I couldn't find any error logs that seemed to relate (i.e, had information newer than the upgrade and start failures). I looked into the /etc/init.d/

xp server problem

2005-04-11 Thread Cupofjava1961
Can someone tell me how to set the server up and running under xp. I keep getting error:0 when I try to configure mysql 4.1. I just want to run mysql on my local machine for practice. Any suggestions would be greatly appreciated. I can't seem to get the service running at all. I understand t

Re: problems with 4.1.11 on Solaris

2005-04-11 Thread Adam Arrowood
On Apr 8, 2005, at 12:21 PM, Adam Arrowood wrote: I just installed the 32-bit SPARC Solaris package (mysql-standard-4.1.11-sun-solaris2.9-sparc.pkg.gz) in made a symbolic link to the install directory as /usr/local/mysql . I am having the following problems: 1) when I start mysql with the inclu

Re: Help with Duplicate Key (32-bit Solaris MySQL 4.1)

2005-04-11 Thread Renato Golin
On Monday 11 April 2005 16:00, mysql helppp wrote: > Error - Duplicate key '444642', -1 > (The syntax of the error message is not exact) probably index error, run myisamchk on the table, or "repair table" inside MySQL command line. Should fix without loose any data. --rengolin -- MySQL Genera

Help with Duplicate Key (32-bit Solaris MySQL 4.1)

2005-04-11 Thread mysql helppp
Folks, I've had a database running for months now and suddenly, when inserting into table 'HEARTBEAT_COUNTS' (desc below), I get an error: Error - Duplicate key '444642', -1 (The syntax of the error message is not exact) My insert statement does not include a value for 'id' which is an auto_incr

Re: SCRAMBLE(A,B) (was UDF:Request).

2005-04-11 Thread SGreen
Dan Bolser <[EMAIL PROTECTED]> wrote on 04/11/2005 11:50:31 AM: > On Mon, 11 Apr 2005, Dan Bolser wrote: > > > > >Requirement: > > > >Given two columns of a table (Column1 and Column2) of length x, return two > >columns (Column1_Scram and Column2_Scram) such that the distributions of > >values

Re: slave out of sync

2005-04-11 Thread Gleb Paharenko
Hello. I think that it is possible using mysqlbinlog with options --stop-position and --start-position to get missed data. But if you had an updates and deletes after crashing the master your task became difficult. But the easiest way, as for me, is to clear the slave and setup replication

Re: Error in the binaries installation of mysql-max-4.1.10a-pc-linux-gnu-i686

2005-04-11 Thread Gleb Paharenko
Hello. You have links in MySQL message which you should follow. Resolve the stack trace. I suggest you to switch to 4.1.11. If you are able to make a repeatable test case you may report a bug. Does the problem remain with a debug package? >Hi, >We tried to install mysql-max-4.1.10a-p

Re: changing the datadir on .rpm SuSE install?

2005-04-11 Thread Gleb Paharenko
Hello. Is there an error log in /export? Have you set the correct permissions? See: http://dev.mysql.com/doc/mysql/en/starting-server.html "Jeff Drew" <[EMAIL PROTECTED]> wrote: > [-- text/plain, encoding quoted-printable, charset: iso-8859-1, 31 lines --] > > Can the the datadir

Re: Upgrade to 5.0.3-beta and stored procedures

2005-04-11 Thread Gleb Paharenko
Hello. The problem may in that as of MySQL 5.0.3, it is necessary to have the EXECUTE privilege to be able to execute the routine. I think you should grant an EXECUTE privilege to other users. See: http://dev.mysql.com/doc/mysql/en/create-procedure.html http://dev.mysql.com/doc/mysql

Re: mysqldump, --single-transaction and --flush-logs

2005-04-11 Thread Gleb Paharenko
Hello. I think you may use a General Query Log to find out a sequence of queries which mysqldump will perform. > Is there some way to determine the binary log position as of the > single transaction for the dump? --master-data might be helpful. "Bill Easton" <[EMAIL PROTECTE

Re: mysqld threads

2005-04-11 Thread Gleb Paharenko
Hello. Use -m command line option for ps to see all threads. >I compiled mySQLd 4.1.10a from Source on Linux 2.6. Although the server >does it's work >well, I wondered why there's only one mysqld thread running. Is that >new/normal for mySQL >4.1? While using mySQL 3.23 I always had sev

Re: Large tables

2005-04-11 Thread Gleb Paharenko
Hello. See also these links: http://dev.mysql.com/doc/mysql/en/table-size.html http://dev.mysql.com/tech-resources/crash-me.php and maybe this one :) http://www.mysql.com/news-and-events/success-stories/ Daniel Kiss <[EMAIL PROTECTED]> wrote: > Hi All, > > I would li

Re: After upgrade to 5.03beta, mysqld won't start

2005-04-11 Thread Gleb Paharenko
Hello. What is in error log? See: http://dev.mysql.com/doc/mysql/en/starting-server.html John Swartzentruber <[EMAIL PROTECTED]> wrote: > I was rash and decided to try to upgrade from 4.1 to 5.03 on my home > server. This isn't a critical system, but I am working on a class > proj

Re: Where is ndb_mgm and ndb_mgmd in the RPM max package on LINUX

2005-04-11 Thread Gleb Paharenko
Hello. See NDB RPM downloads section at: http://dev.mysql.com/downloads/mysql/4.1.html >We installed these rpm packages on linux 2.4.30 with redhat es 3.0 > > MySQL-server-4.1.10a-0 > MySQL-Max-4.1.10a-0 > perl-DBD-MySQL-2.1021-3 > MySQL-shared-compat-4.1.10a-0 > MySQL-clien

Re: Problems upgrading from 4.0 to 4.1

2005-04-11 Thread Sergei Golubchik
Hi! On Apr 11, Christian Hammers wrote: > Hello Sergei > > On Thu, Apr 07, 2005 at 03:14:10PM +0200, Sergei Golubchik wrote: > > > I've just run into deep troubles while upgrading from 4.0.24 to 4.1.10a > > > using precomiled Debian packages on Debian Woody although I read the > > > comments rega

Re: please help : linux version

2005-04-11 Thread Hassan Schroeder
Drew Reid wrote: Hello I need to download a version of mySql v4, but I don't know which one to download. As the server is mySql compatible they must already be running mySql on the system. Uh-oh -- not the perennial faceless "they", again!? Shouldn't you ask "them" what version is on the server

Analyze Table

2005-04-11 Thread Emmett Bishop
Howdy all, Quick question about Analyze table. I just deleted 3+ million records from a table that gets a lot of insert activity throughout the day. It seems like now would be a good time to run optimize table and/or analyze table. I saw in the docs that analyze table puts a read lock on the table

Re: Display 1st row of every group?

2005-04-11 Thread Peter Brawley
Dan, Thanks to Rhino & Dan for the corrections, HAVING in that query makes it return only id values for which there is one row, and the header is wrong since "first row of every group" doesn't mean anything without explicit ordering. >What do you mean? In SELECT foo ... GROUP BY foo ...,

Re: SCRAMBLE(A,B) (was UDF:Request).

2005-04-11 Thread Dan Bolser
On Mon, 11 Apr 2005, Dan Bolser wrote: > >Requirement: > >Given two columns of a table (Column1 and Column2) of length x, return two >columns (Column1_Scram and Column2_Scram) such that the distributions of >values in Column1 and Column2 are preserved in Column1_Scram and >Column2_Scram, but the

Re: Problems upgrading from 4.0 to 4.1

2005-04-11 Thread Christian Hammers
Hello Sergei On Thu, Apr 07, 2005 at 03:14:10PM +0200, Sergei Golubchik wrote: > > I've just run into deep troubles while upgrading from 4.0.24 to 4.1.10a > > using precomiled Debian packages on Debian Woody although I read the > > comments regarding upgrading on dev.mysql.com. > > > After start

please help : linux version

2005-04-11 Thread Drew Reid
Hello I need to download a version of mySql v4, but I don't know which one to download. The Server I'm going to load the built database on to is running: Linux 2.4.19C13_v As the server is mySql compatible they must already be running mySql on the system. So the catch is... My home terminal

Re: Find valid numeric values in a string field?

2005-04-11 Thread Dan Bolser
On Mon, 11 Apr 2005, Eamon Daly wrote: >You were on the right track. Casting a string to a number >results in a 0 if MySQL can't make a proper conversion, >which is slightly counter-intuitive. This might suit your >needs: I see. Cheers. Shame their is no 'IS_VALID_INT()' or 'IS_VALID_FLOAT()'.

Re: Display 1st row of every group?

2005-04-11 Thread Dan Bolser
On Mon, 11 Apr 2005, Peter Brawley wrote: >Thanks to Rhino & Dan for the corrections, HAVING in that query makes it >return only id values for which there is one row, and the header is >wrong since "first row of every group" doesn't mean anything without >explicit ordering. What do you mean?

SCRAMBLE(A,B) (was UDF:Request).

2005-04-11 Thread Dan Bolser
Requirement: Given two columns of a table (Column1 and Column2) of length x, return two columns (Column1_Scram and Column2_Scram) such that the distributions of values in Column1 and Column2 are preserved in Column1_Scram and Column2_Scram, but the pairs of values are randomized. Solution sugg

Re: Find valid numeric values in a string field?

2005-04-11 Thread Eamon Daly
You were on the right track. Casting a string to a number results in a 0 if MySQL can't make a proper conversion, which is slightly counter-intuitive. This might suit your needs: mysql> select * from mixed_num; ++ | my_col | ++ | a | | 0 | | 1 | | abc123 | | 123abc |

Re: Display 1st row of every group?

2005-04-11 Thread Peter Brawley
Thanks to Rhino & Dan for the corrections, HAVING in that query makes it return only id values for which there is one row, and the header is wrong since "first row of every group" doesn't mean anything without explicit ordering. PB - Dan Bolser wrote: On Mon, 11 Apr 2005, Rhino wrote:

Re: results in random order.

2005-04-11 Thread Richard Whitney
Quoting Richard Reina <[EMAIL PROTECTED]>: > I am trying to get this query to randomly pick a > record from a table (trans) but it's not working: > > SELECT ID FROM trans ORDER BY RAND() LIMIT 1; > > Can anyone let me know what I'm doing wrong and/or how > to fix it. > > Thanks, > > Richard > Wha

Re: Recreating primary index on MyIsam table

2005-04-11 Thread Michael Stassen
If the column was full of 0s when you recreated it, that means you forgot to make it AUTO_INCREMENT. Since it didn't complain about duplicate key entries, you also didn't make it a PRIMARY KEY. That is, you must have done something like ALTER TABLE c1 ADD c_serial INT NOT NULL; Peter's solu

Re: Display 1st row of every group?

2005-04-11 Thread Dan Bolser
On Mon, 11 Apr 2005, Peter Brawley wrote: >/>I guess that entry is either wrong or misleading./ > >Ordering by another column which isn't mutually dependent with the >grouping column will have unpredictable results. Is that what you mean >by the example being "wrong or misleading"? No, I mean t

Re: Charset and LOAD DATA INFILE problem - solved

2005-04-11 Thread Dušan Pavlica
Finally I found the solution. Just short note for everybody who has problem with LOAD DATA INFILE and correct charset of the file. Loaded file must have SAME charset as DATABASE which contains target table of LOAD DATA command. Target table charset doesn't matter. I didn't find any note about it

Re: Display 1st row of every group?

2005-04-11 Thread Peter Brawley
>I guess that entry is either wrong or misleading. Ordering by another column which isn't mutually dependent with the grouping column will have unpredictable results. Is that what you mean by the example being "wrong or misleading"? PB - Dan Bolser wrote: I guess that entry is eithe

Re: Display 1st row of every group?

2005-04-11 Thread Dan Bolser
On Mon, 11 Apr 2005, Rhino wrote: > >- Original Message - >From: "Dan Bolser" <[EMAIL PROTECTED]> >To: >Sent: Monday, April 11, 2005 5:58 AM >Subject: Display 1st row of every group? > > >> >> I read with great interest this >> >> http://www.artfulsoftware.com/queries.php#4 >> >> Display

Re: foreign key design stratgies

2005-04-11 Thread Rhino
- Original Message - From: "Steve Lefevre" <[EMAIL PROTECTED]> To: Sent: Monday, April 11, 2005 12:26 AM Subject: foreign key design stratgies > Hey folks - > > I'm having a little problem understanding ON DELETE foreign key > constraints. Here's my options from the manual: > > [ON DEL

Re: Display 1st row of every group?

2005-04-11 Thread Rhino
- Original Message - From: "Dan Bolser" <[EMAIL PROTECTED]> To: Sent: Monday, April 11, 2005 5:58 AM Subject: Display 1st row of every group? > > I read with great interest this > > http://www.artfulsoftware.com/queries.php#4 > > Display 1st row of every group > > SELECT id > FROM tbl

RE: UDF request?

2005-04-11 Thread SGreen
Dan Bolser <[EMAIL PROTECTED]> wrote on 04/08/2005 06:45:42 PM: > On Fri, 8 Apr 2005 [EMAIL PROTECTED] wrote: > > >Dan Bolser <[EMAIL PROTECTED]> wrote on 04/08/2005 12:41:35 PM: > > > >> On Thu, 7 Apr 2005, Sean Nolan wrote: > >> > >> >I think you'll find you can do what you want with a cross j

Re: Where is ndb_mgm and ndb_mgmd in the RPM max package on LINUX

2005-04-11 Thread Joerg Bruehe
Hi David, all! Am Sa, den 09.04.2005 schrieb Marois, David um 23:22: > We installed these rpm packages on linux 2.4.30 with redhat es 3.0 > > MySQL-server-4.1.10a-0 > MySQL-Max-4.1.10a-0 > perl-DBD-MySQL-2.1021-3 > MySQL-shared-compat-4.1.10a-0 > MySQL-client-4.1.10a-0 > > After that, I did n

results in random order.

2005-04-11 Thread Richard Reina
I am trying to get this query to randomly pick a record from a table (trans) but it's not working: SELECT ID FROM trans ORDER BY RAND() LIMIT 1; Can anyone let me know what I'm doing wrong and/or how to fix it. Thanks, Richard -- MySQL General Mailing List For list archives: http://lists.mys

Re: Auto SQL

2005-04-11 Thread Wolfram Kraus
Winanjaya wrote: Dear MySQL Experts, I am using MySQL 4.1, I have a database with more than 100 tables inside, is there any 3rd party tools that can help me to create a SQL statement of "CREATE TABLE blah blah blah" for each table in my DB . please advise Regards Winanjaya mysqldump -d --add-drop-

Re: Auto SQL

2005-04-11 Thread John Doe
Hi Winanjaya Am Montag, 11. April 2005 09.50 schrieb Winanjaya: > I am using MySQL 4.1, I have a database with more than 100 tables inside, > is there any 3rd party tools that can help me to create a SQL statement of > "CREATE TABLE blah blah blah" for each table in my DB . please advise Here's a

mysqldump, --single-transaction and --flush-logs

2005-04-11 Thread Bill Easton
If I use the options --single-transaction and --flush-logs with mysqldump and InnoDB tables, does the new log file start at the same time as the transaction? If not, is it known for sure if the log file is switched before the transaction starts or if it is switched after the transaction starts? I

importing, exporting data in IIF format (for example quickbooks)

2005-04-11 Thread symbulos partners
Dear friends, one of our customer is asking to integrate a mysql application with an application called Quickbooks (accounting package, www.quickbooks.co.uk). Apparrently the application can only import export files in the format IIF. Has anybody any expereince in importing, exporting to this f

Re: Auto SQL

2005-04-11 Thread Martijn Tonies
Hi, > I am using MySQL 4.1, I have a database with more than 100 tables inside, is > there any 3rd party tools that can help me to create a SQL statement of > "CREATE TABLE blah blah blah" for each table in my DB . please advise If you're running Windows, you might want to check out our tool Data

Re: Display 1st row of every group?

2005-04-11 Thread Dan Bolser
I guess that entry is either wrong or misleading. I can get what I want like this SELECT * FROM tbl INNER JOIN ( SELECT id, min(bleah) as bleah FROM tbl GROUP BY id ) USING (id,bleah); Which will work so long as bleah has

Display 1st row of every group?

2005-04-11 Thread Dan Bolser
I read with great interest this http://www.artfulsoftware.com/queries.php#4 Display 1st row of every group SELECT id FROM tbl GROUP BY id HAVING count(*) = 1; I want to use this syntax with an 'order by' like this... SELECT * FROM tbl GROUP BY id HAVING count(*) = 1 ORDER BY bleah;

RE: Auto SQL

2005-04-11 Thread Winanjaya
What tool you're talking now? .. PHPMyAdmin? .. I am using MySQL Administrator .. and I didnot find such feature .. any suggestion? thanks a lot in advance Regards Winanjaya -Original Message- From: Jigal van Hemert [mailto:[EMAIL PROTECTED] Sent: Monday, April 11, 2005 4:36 PM To: mysql

Re: Auto SQL

2005-04-11 Thread Jigal van Hemert
From: "Winanjaya" > I am using MySQL 4.1, I have a database with more than 100 tables inside, is > there any 3rd party tools that can help me to create a SQL statement of > "CREATE TABLE blah blah blah" for each table in my DB . please advise I think many MySQL management tools can help you do thi

Charset and LOAD DATA INFILE problem

2005-04-11 Thread Dušan Pavlica
Hello, I'm trying to convert tables from Paradox DBs to MySQL and I have a big problem with setting correct character set. I created small application which generates csv files which are in cp1250 (I can't change it, it's charset ofmy Paradox DBs). My databases and tables in MySQL are in latin2

Re: UDF Request "AGGLOM()"

2005-04-11 Thread Dan Bolser
On Mon, 11 Apr 2005, Arjen Lentz wrote: >Hi Dan, > >On Sat, 2005-04-09 at 02:59, Dan Bolser wrote: >> Who can I prod about setting up a UDF repo at MySQL. I think 'they' should >> do this ;) > >Yep it's an existing idea, a very good one, and it's on the todo. >Putting such an infrastructure into p

Auto SQL

2005-04-11 Thread Winanjaya
Dear MySQL Experts, I am using MySQL 4.1, I have a database with more than 100 tables inside, is there any 3rd party tools that can help me to create a SQL statement of "CREATE TABLE blah blah blah" for each table in my DB . please advise Regards Winanjaya -- MySQL General Mailing List For li