About union sql Mysql 4.x

2005-12-05 Thread HALIL DEMIREZEN
Hi, I am trying to run an sql query such as below to list items=x randomly and then items != x randomly.. mysql (select * from tablea where item=1 order by rand()) union all (select * from tablea where item != 1 order by rand()); but the result is not as expected. rand() seems not to be

Re: sporadic batch update problem

2005-12-05 Thread Joerg Bruehe
Hi Jeff, all! Jeff Drew wrote: Sporadically, the last few entries of a batch are not written. I'm writing to a mysql database using JDBC. Here's a short version of my code. Does anyone have suggestions on possible causes or other diagnostics? I do not claim any JBDC knowledge, so I have

Re: Moving databases from backups not working . . .

2005-12-05 Thread Gleb Paharenko
Hello. 3.23 to 4.0 and then upgrading from 4.0 to 4.1. Does that mean that I can't just move databases from a machine that was 3.23 to a machine that is 4.1? You can, however usually it won't work as supposed without additional actions (like index repairing). Curious George

Re: what happened to error log in MySQL 4.1x/Windows XP

2005-12-05 Thread Gleb Paharenko
Hello. Please, CC your answers to the list as well. Put log_error=path_to_error_log in your configuration file (my.ini usually). See: http://dev.mysql.com/doc/refman/5.0/en/error-log.html http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html I'm sorry, but I see no

Re: About union sql Mysql 4.x

2005-12-05 Thread Gleb Paharenko
Hello. From http://dev.mysql.com/doc/refman/5.0/en/union.html: ORDER BY for individual SELECT statements within parentheses has an effect only when combined with LIMIT. Otherwise, the ORDER BY is optimized away. Therefore you're getting the same results, because ORDER BY doen't work

Re: About union sql Mysql 4.x

2005-12-05 Thread HALIL DEMIREZEN
What if i want to list all the records not limiting them to a constant? Halil Demirezen System Support Engineer/ Sistem Destek Muhendisi Mobile Tel/Cep Tel: +90(543) 502 04 42 E-Mail/E-Posta: [EMAIL PROTECTED]

Re: Problem installing MySQL on Mac OSX 10.4.3

2005-12-05 Thread Brent Baisley
Those message are kind of odd, even on a messed up system. I would first run the repair privileges in the disk utility for good measure, then delete all traces of MySQL and just start over. MySQL should be in /usr/local/mysql. To remove it just type: sudo rm -R /usr/local/mysql Then try

Re: About union sql Mysql 4.x

2005-12-05 Thread Michael Stassen
HALIL DEMIREZEN wrote: Hi, I am trying to run an sql query such as below to list items=x randomly and then items != x randomly.. mysql (select * from tablea where item=1 order by rand()) union all (select * from tablea where item != 1 order by rand()); but the result is not as

Re: About union sql Mysql 4.x

2005-12-05 Thread HALIL DEMIREZEN
Michael, Thank you and all for effort to help.. I solved the problem by giving high limit numbers such as; (select * from tablea where item=1 order by rand() limit 0, 1) union all (select * from tablea where item != 1 order by rand() limit 0, 1);

Re: About union sql Mysql 4.x

2005-12-05 Thread Gleb Paharenko
Hello. If you want all records with item=1 to be at the beginning and sorted in a random order you can use this query: select * from tablea order by if(item=1,0,1), rand(); HALIL DEMIREZEN wrote: What if i want to list all the records not limiting them to a constant?

Re: triggers? when they execute and locking

2005-12-05 Thread Gleb Paharenko
Hello. Please could you provide a repeatable test case, so it will be easier for list members to diagnose this weird behavior? Ben De Luca wrote: Im am trying to implement a task running system with mysql and Im coming across a few problems with what I am trying to do.

Re: MySQL 5 is 25% slower then 4.1

2005-12-05 Thread Gary Richardson
Are you doing single insert statements, multiple insert statements or LOAD DATA INFILE statements? On 12/4/05, Chenzhou Cui [EMAIL PROTECTED] wrote: Dear MySQL fans, I have a 260 GB huge file with 1045175762 rows. Two weeks ago, I wrote a Java program to read the huge plain text file into

Re: Save HTML code

2005-12-05 Thread sheeri kritzer
Except that that page says: A ''' inside a string quoted with '' needs no special treatment and need not be doubled or escaped. In the same way, '' inside a string quoted with ''' needs no special treatment. So the double quotes inside single quotes should work. And indeed, I tested this:

Re: LOAD DATA INFILE (url)

2005-12-05 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Arno Coetzee wrote: Test USER wrote: Can't get this to work, but i would like to specify LOAD DATA to use an INFILE from an URL. For example LOAD DATA LOCAL INFILE 'http://www.testserver.com/data.csv' But i get an error message saying file

RE: DOT.NET Connector and Stored Procedures: Exception trying to retrieve parameter info

2005-12-05 Thread Reggie Burnett
Jesse is right. You use the ? to start a parameter name. -Original Message- From: Rehcra [mailto:[EMAIL PROTECTED] Sent: Friday, December 02, 2005 2:26 PM To: Jesse Castleberry; mysql@lists.mysql.com Subject: Re: DOT.NET Connector and Stored Procedures: Exception trying to retrieve

RE: .NET Connector Output Values

2005-12-05 Thread Reggie Burnett
This is not going to work. If you are using MySQLCommandBuilder, then the auto-generated ID will be pulled back for you (basically because it does a select last_insert_id() internally). Or you can issue a select last_insert_id() manually to determine the last generated id. -Original

Newbie question to both lists on listing open issues regardless of project

2005-12-05 Thread Kraer, Joseph
I am trying to write a select statement in the MySQL Query Browser (v. 1.1.10) on my Eventum (v. 1.4) database; MySQL version is 4.0.21 (PHP is 4.3.10). My goal is to list certain data from all open issues, across projects, as well as listing some issue details contained in custom fields. I

com_* show status variables broken in MySQL 5

2005-12-05 Thread e1-xdtw-0677-18wp
Hi, I've just upgraded a server from MySQL 4.1.x to 5.0.16-max and have found that show status isn't working like before. I use RRDTOOL to generate graphs of stats like select/insert/deletes per second, but after bringing up the new server these variables (as shown by SHOW STATUS) are all

Newbie Question: listing open issues regardless of project

2005-12-05 Thread Kraer, Joseph
I am sending this message to both Eventum and MySQL support lists. I am trying to write a select statement in the MySQL Query Browser (v. 1.1.10) on my Eventum (v. 1.4) database; MySQL version is 4.0.21 (PHP is 4.3.10). My goal is to list certain data from all open issues, across projects, as

Re: About union sql Mysql 4.x

2005-12-05 Thread Michael Stassen
HALIL DEMIREZEN wrote: Michael, Thank you and all for effort to help.. I solved the problem by giving high limit numbers such as; (select * from tablea where item=1 order by rand() limit 0, 1) union all (select * from tablea where item != 1 order by rand() limit 0, 1);

Killing my curly quotes

2005-12-05 Thread Brian Dunning
OK, I'm bad - I have curly quotes in my db that I failed to eliminate prior to the insert. Now that they're in there, is there a way to replace them with straight quotes? Everything I try fails to find them. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

Re: How to use Logic in View Statment?

2005-12-05 Thread Scott Klarenbach
As an update to my earlier question, is it possible to have logic in select statements including the join? ie, select IF(CHAR_LENGTH(broker)0,broker,vendor) as company from table 1 IF(CHAR_LENGTH(broker)0,INNER JOIN tblBroker,INNER JOIN tblVendor) Thanks. On 11/28/05, [EMAIL PROTECTED]

RE: Killing my curly quotes

2005-12-05 Thread J.R. Bullington
Windows or Linux?? The REPLACE() function would do it if using the Character Mapping in Windows. UPDATE tbl_Name SET col1 = REPLACE(col1,'','') UPDATE tbl_Name SET col1 = REPLACE(col1,'','') They are ALT+0147 and ALT+0148 in Windows Character Map (charmap.exe) J.R. -Original Message-

Re: How to use Logic in View Statment?

2005-12-05 Thread SGreen
Yes, but not quite as you imagined doing it. SELECT tbl1.*, coalesce(broker, vendor) as company from table1 tbl1 LEFT JOIN tblBroker b on tbl1.broker_id = b.id LEFT JOIN tblVendor v ON tbl1.vendor_id = v.id; The left joins indicates that the tables on right side of the join

Select questions

2005-12-05 Thread Kevin Fricke
Hello allnew to the list...having a bit of an issue here. I have a reservations table that is linked to three separate tables, food, packages and options. A reservation can have multiple food options, packages and options attached to it. I am trying to run a query that will pull all of

defined with default NULL, but missing ...

2005-12-05 Thread C.R.Vegelin
Hi everybody, I defined a field Date_End with default NULL, but am missing it. CREATE TABLE Regions ( Country CHAR(4) NOT NULL, Date_Start CHAR(4) NOT NULL, Date_End CHAR(4) default NULL, # this one ... Description CHAR(50) ) Engine = MyISAM; Regions table is filled with a tab-delimited

Re: defined with default NULL, but missing ...

2005-12-05 Thread Michael Stassen
C.R.Vegelin wrote: Hi everybody, I defined a field Date_End with default NULL, but am missing it. CREATE TABLE Regions ( Country CHAR(4) NOT NULL, Date_Start CHAR(4) NOT NULL, Date_End CHAR(4) default NULL, # this one ... Description CHAR(50) ) Engine = MyISAM; Regions table is filled

Re: Select questions

2005-12-05 Thread Michael Stassen
Kevin Fricke wrote: Hello allnew to the list...having a bit of an issue here. I have a reservations table that is linked to three separate tables, food, packages and options. A reservation can have multiple food options, packages and options attached to it. I am trying to run a query that

max_connections in 3.23.49

2005-12-05 Thread Douglas B. Jones
How do you up max_connections on 3.23.29 mysql? I have tried in the my.cnf file, command line and in mysql (set @max_connections=200). Thanks for any help! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: triggers? when they execute and locking

2005-12-05 Thread Ben De Luca
Ill try? and make some thing more simple thats what I have actually running, Can some one clarify that what I am doing should work though? On 05/12/2005, at 9:54 PM, Gleb Paharenko wrote: Hello. Please could you provide a repeatable test case, so it will be easier for list members to

Character set issue ( maybe )

2005-12-05 Thread Daniel Kasak
Greetings. I'm trying to copy paste some data from a web page into MySQL ( and yes it's our data ). I'm getting problems with characters such as quotes, dollar / euro signs, etc, that won't import - I get symbols and stuff instead. If I right-click on the web page and select 'View Page

Re: Select questions

2005-12-05 Thread Rhino
- Original Message - From: Kevin Fricke [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Monday, December 05, 2005 3:14 PM Subject: Select questions Hello allnew to the list...having a bit of an issue here. I have a reservations table that is linked to three separate tables,

Re: Character set issue ( maybe )

2005-12-05 Thread BÁRTHÁZI András
Hi Daniel, I'm trying to copy paste some data from a web page into MySQL ( and How do you mean pasting into MySQL? Which program do you use on the destination side? You can use clipboard to copy into mysql (the console application), phpMyAdmin, some visual program, etc. Anyway, if your

Re: Character set issue ( maybe )

2005-12-05 Thread Daniel Kasak
BÁRTHÁZI András wrote: Hi Daniel, I'm trying to copy paste some data from a web page into MySQL ( and How do you mean pasting into MySQL? Which program do you use on the destination side? Query browser *and* an in-house Perl Gtk2 app both produce the same results. I'm pretty sure I

Re: Select questions

2005-12-05 Thread Rhino
I'm copying the list on this reply so that everyone can benefit from the discussion Thanks for clarifying that you understand joining. The way your question was worded, I thought perhaps you were a newbie who had never heard the concept before; my apologies for misunderstanding. The

Re: Newbie question to both lists on listing open issues regardless of project

2005-12-05 Thread Daniel Kasak
Kraer, Joseph wrote: snipped I thought that IF statements would do the job, but I get a syntax error (1064). Obviously, they are not the way to go. Nevertheless, here's the complete query so you can get an idea of where I want to go: Your if statement is wrong. The syntax is: if (

Re: com_* show status variables broken in MySQL 5

2005-12-05 Thread Daniel Kasak
[EMAIL PROTECTED] wrote: Hi, I've just upgraded a server from MySQL 4.1.x to 5.0.16-max and have found that show status isn't working like before. I use RRDTOOL to generate graphs of stats like select/insert/deletes per second, but after bringing up the new server these variables (as

Re: MySQL 5 is 25% slower then 4.1

2005-12-05 Thread Chenzhou Cui
After 4 days and a half, my program finished last night. The 1045175762 rows costed the Java program 109 hours to load. The speed is about 9.6 million per hour. I didn't use multiple insert statements and LOAD DATA INFILE, but only insert into statement. The Java program reads one line from

Re: MySQL 5 is 25% slower then 4.1

2005-12-05 Thread Daniel Kasak
Chenzhou Cui wrote: I didn't use multiple insert statements and LOAD DATA INFILE, but only insert into statement. The Java program reads one line from the source file, and then execute an insert statement. I can't comment on the speed of 5.0.x vs 4.1.x, but I can suggest that you optimize

Re: MySQL 5 is 25% slower then 4.1

2005-12-05 Thread Gary Richardson
Also, if the file looks anything like a CSV file, I recommend using LOAD DATA INFILE http://dev.mysql.com/doc/refman/4.1/en/load-data.html You'll probably load that data in half to a quarter of the time. On 11/30/05, Daniel Kasak [EMAIL PROTECTED] wrote: Chenzhou Cui wrote: I didn't use

Re: UDF Request AGGLOM()

2005-12-05 Thread Arjen Lentz
Hi Dan, 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 place will take some time though. I can imagine it isn't trivial to set up.

RE: Select questions

2005-12-05 Thread Kevin Fricke
Rhino: Thanks for the help. Here is the story. I won't include all of the information as it doesn't really seem pertinent. I'm using 5.0 for this application. Reservations --- ID(key) | Reservation_Date Food --- ID(key) |

RE: Select questions

2005-12-05 Thread SGreen
Thank you for the table structures (I prefer the output from SHOW CREATE TABLE..) Now, would you mind also posting the actual query you used to produce what you are calling duplicated results? Thanks! Shawn Green Database Administrator Unimin Corporation - Spruce Pine Kevin Fricke [EMAIL

Re: MySQL 5 is 25% slower then 4.1

2005-12-05 Thread Chenzhou Cui
The file is in fix column width format. If it is in CSV format, I don't need a program to read it. The first few lines are as following: --- usnob_read: no zone specified, read from South Pole #USNOB (whole) #USNO-B1.0 Tycho-2RA (J2000) Dec

Re: Select questions

2005-12-05 Thread Michael Stassen
[EMAIL PROTECTED] wrote: Thank you for the table structures (I prefer the output from SHOW CREATE TABLE..) Now, would you mind also posting the actual query you used to produce what you are calling duplicated results? Thanks! Shawn Green Database Administrator Unimin Corporation - Spruce

RE: Select questions

2005-12-05 Thread Kevin Fricke
I am simply trying to build an exportable report of the results. For example, I need to run a monthly report that will pull all of the reservations with food, packages and extras. I suppose that the only way to do this is to run three separate queries and then to run a final query using those

Re: MySQL 5 is 25% slower then 4.1

2005-12-05 Thread Daniel Kasak
Chenzhou Cui wrote: The file is in fix column width format. If it is in CSV format, I don't need a program to read it. 'load data infile' can import from a fixed-width format. Check the documentation. I've set up a number of these imports, and they're a little messy to set up ( you have to

Re: Character set issue ( maybe )

2005-12-05 Thread Daniel Kasak
OK then. Lets re-word the question ... Has anyone been able to successfully enter text of a non-standard character set ( Latin 1, UTF8 ) into Query Browser? How about upload via a Perl script? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW,

RE: Select questions

2005-12-05 Thread SGreen
Kevin Fricke [EMAIL PROTECTED] wrote on 12/05/2005 10:05:36 PM: I am simply trying to build an exportable report of the results. For example, I need to run a monthly report that will pull all of the reservations with food, packages and extras. I suppose that the only way to do this is to

Re: Select questions

2005-12-05 Thread Rhino
Once again, I'm copying the mailing list so that others can contribute to - and benefit from - the discussion. It's past my bedtime so I'm going to leave you in the capable hands of Michael and Shawn :-) Rhino - Original Message - From: Kevin Fricke [EMAIL PROTECTED] To: 'Rhino'

Re: Select questions

2005-12-05 Thread Rhino
- Original Message - From: Michael Stassen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; mysql@lists.mysql.com; 'Rhino' [EMAIL PROTECTED] Sent: Monday, December 05, 2005 10:01 PM Subject: Re: Select questions [EMAIL PROTECTED] wrote: Thank you for the table

Friendster with MySQL

2005-12-05 Thread JM
Hi ALL, We are planning to create a social software similar to friendster and Im working on the requirements... I saw a site: http://philip.greenspun.com/teaching/6171/2003-fall/friendster and for some reasons its telling me not to use MySQL, the initial infrastructure is a

Re: Character set issue ( maybe )

2005-12-05 Thread Octavian Rasnita
From: Daniel Kasak [EMAIL PROTECTED] OK then. Lets re-word the question ... Has anyone been able to successfully enter text of a non-standard character set ( Latin 1, UTF8 ) into Query Browser? How about upload via a Perl script? Yes you can insert those chars in MySQL using a perl

Re: UDF Request AGGLOM()

2005-12-05 Thread dmb
Hi Dan, 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 place will take some time though. I can imagine it isn't trivial to set