Re: Union query help

2004-10-22 Thread Rhino
I don't think there's anything conceptually wrong with what you're doing. Most relational databases let you UNION together many more than 3 queries; I assume MySQL also allows this. I don't see any obvious syntax error jumping out at me. What error message are you getting? I suspect that you are

Union query help

2004-10-22 Thread leegold
Is this possible? Is it possible to have three queries in a UNION? Sorry about the PHP in there. I just wanted to know if this is allowed? If only the 1st two queries it works OK, add the 3rd and it breaks. How can I accomplish this? Thanks. Lee G. I'm using 4.1.3beta $result = mysql_query("(SELEC

select from table hangs?

2004-10-22 Thread Kristina Clair
Hello, I am having a problem with a mysql (myisam) table that I've never had before, and I'm completely stumped! I am using mysql version 4.0.13. myisamchk -e table.MYI returns no errors. Yet, when I try to do any kind of select from the mysql prompt, it just hangs and never returns an error co

RE: Determining if query will work

2004-10-22 Thread Eve Atley
>What is the definition of resume_erp (what is the result of: SHOW CREATE TABLE resume_erp) ? What that error is telling you is that you are Glad you added more info, or I would have been asking you, 'what do you mean by definition?' :) CREATE TABLE `resume_erp` ( `Candidate_ID` int(10) NOT

RE: Determining if query will work

2004-10-22 Thread SGreen
What is the definition of resume_erp (what is the result of: SHOW CREATE TABLE resume_erp) ? What that error is telling you is that you are attempting to add a record that matches a set of conditions that you said could only exist once on the entire table (either your primary key or a unique ke

RE: SQL command timeout

2004-10-22 Thread Jay Blanchard
[snip] >Check your mysql system variables for timeout variables (SHOW >VARIABLES;) Thanks Jay. After I do this I see there are a number of timeout values, none which refer to a sql command timeout. Are you able to pinpont which value I need to manipulate? Also, if I increase this value, wha

RE: Determining if query will work

2004-10-22 Thread Eve Atley
I think we're on to something. I've got one table importing data correctly, resume to resume_erp. However, 'candidate' to 'candidate_erp' appears goofy. I get the following error: [mysql.loosefoot.com] ERROR 1062: Duplicate entry '1185' for key 1 With the following queries, query 3 being the pro

RE: SQL command timeout

2004-10-22 Thread Rick Dwyer
Check your mysql system variables for timeout variables (SHOW VARIABLES;) Thanks Jay. After I do this I see there are a number of timeout values, none which refer to a sql command timeout. Are you able to pinpont which value I need to manipulate? Also, if I increase this value, what are the

RE: SQL command timeout

2004-10-22 Thread Jay Blanchard
[snip] I have a lasso page with various Inlines to execute, updates, searches, deletes and SQL commands to summarize data from a database with several tables that have grown large and the query to the database lasts for several minutes during this process. I have just started noticing that it i

SQL command timeout

2004-10-22 Thread Rick Dwyer
Hi all. I have a lasso page with various Inlines to execute, updates, searches, deletes and SQL commands to summarize data from a database with several tables that have grown large and the query to the database lasts for several minutes during this process. I have just started noticing that it

Re: Change master on replication

2004-10-22 Thread Sean Leach
Yeah - sorry, a typo. Master A is down, so I need to repoint Slave 1 and Slave 2 to Master B. Same problem though. I know how to tell it's down, my question is in the best way to sync Slave 1 and Slave 2 with Master B since Master A and Master B weren't completely in sync. Sanjeev Sagar wrot

RE: Change master on replication

2004-10-22 Thread Sanjeev Sagar
Master A has Slave 1 and Slave 2 Master B has Slave 3 and Slave 4 Master A is ahead of Master B, and Master A goes down, we want to repoint Slave 3 and Slave 4 to Master B. Since the data is large, we don't want to do a fresh resync of Slave 3 and 4 from scratch. And A and B may not have be

RE: Determining if query will work

2004-10-22 Thread Eve Atley
Incidentally, we are using a newer 4 version of MySQL now, if there's another way apart from a temp table to do this? Let me try with the temp table meanwhile. Thanks! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, October 22, 2004 1:27 PM To: [EMAI

Re: Sort Problem

2004-10-22 Thread Albert Padley
Juan, Good question. ref_pts are given for completing referee assignments and are tracked throughout the season and can exceed 15 for tracking purposes. However, only a max of 15 total_ref_pts are used in determining the standings. adust_ref_pts (up or down) are given by the Referee Assignor fo

Re: Conditional statement: IF

2004-10-22 Thread Anders Karlsson
That's what I though. In Transact SQL this is valid code to run on the server, and you may optionally choose to put it all into a single stored procedure. In most other databases, a stored procedure has a language that is not executable outside the procedure code itself. With MySQL there will b

Re: **[SPAM]** Conditional statement: IF

2004-10-22 Thread SGreen
T-SQL style procedural scripting will not be initially available outside of stored procedures. Stored procedures are new to 5.0 (still under development) so what you want to code is not available, yet. You will have to make program branch choices in a programming language as the SQL engine cur

Re: **[SPAM]** Conditional statement: IF

2004-10-22 Thread Luke Venediger
Hi, Apologies, yes I have RTFM, and should've clarified my question. I actually need to do something more like this: IF(@SomeValue = 1) BEGIN THEN SELECT "Data" as Column1, "MoreData" as Column2 ELSE SELECT "SomeValue is not = 1" as Error END IF Thanks, Luke Venediger. On

Re: Conditional statement: IF

2004-10-22 Thread Luke Venediger
Hi Anders, Thanks for that. Yes, I have come from an MSSQL environment, and I'm using .Net 1.1 with the MySQL Connector/Net. The idea behind using conditional statements was to assign a query to a business task. For example, I could write a query to handle adding items to a shopping cart. In the

RE: Determining if query will work

2004-10-22 Thread SGreen
I would simplify this search by breaking the query into two steps, just as you described. First locate all of the resumes where section 1 contains the bit of text you are looking for then use those results to get the full resume (all 6 sections) There are 3 ways to do this. One is a single-quer

multiple mysql installations?

2004-10-22 Thread Minuk Choi
I managed to get multiple instances of mysql to install and run(via mysqld_multi), but only by compiling the source. The system I had was Redhat9 and I used the Mysql RPM, but I couldn't get that to work, so I opted to download and compile the source. Is this the ONLY way to get multiple instan

Change master on replication

2004-10-22 Thread Sean Leach
We have an environment where we will have multiple mysql masters, and multiple slaves hanging off each master (the masters are actually slaves from another data store updated by a script). The table we are replicating is about 6GB in size, so somewhat large. If one of the masters goes down, we

Re: Sort Problem SOLVED

2004-10-22 Thread Albert Padley
Jeff and Shawn, Thanks for coming up with similar solutions. Jeff, I have used yours because it was more complete. I wasn't aware of the Case statement in mysql. I guess I still have a lot to learn. Thanks again. Albert On Oct 22, 2004, at 10:10 AM, Jeff Burgoon wrote: This will solve your probl

Re: Conditional statement: IF

2004-10-22 Thread Anders Karlsson
I don't know why you want to do this, but looking at your sybtax, it seems like you come from a Sybase or SQL Server environment. What you are trying to achieve is the way it is done in Transact SQL, where the conditional statements and stuff like that which are typically used in stored procedur

RE: Determining if query will work

2004-10-22 Thread Eve Atley
Sorry for the delay in this. Still having problems with this one. >The second query is going to produce one row for every resume. Based on >your results, I assume you have 1000 resumes that have candidates >associated with them. Let's say I have 256 resulting rows for table 'resume', Section_

Re: optimizing database

2004-10-22 Thread Gary Richardson
Hey, I'm interested. I currently run a few websites with tables of this size and larger. Thanks. On Thu, 21 Oct 2004 15:19:16 -0700 (PDT), Razor Fish <[EMAIL PROTECTED]> wrote: > i need consulting help for optimizing a database with > 1.2 million records to handle 3-4 million hits a day. > > i

Re: Sort Problem

2004-10-22 Thread Jeff Burgoon
This will solve your problem and remove the need for the PHP correction. SELECT lname, teamno, game_pts, sport_pts, ref_pts, adjust_ref_pts, CASE WHEN ref_pts + adjust_ref_pts > 15 THEN game_pts + 15 ELSE game_pts + ref_pts + adjust_ref_pts END AS total_pts, CASE WHEN ref_pts + adjust_ref_pts > 15

Re: Sort Problem

2004-10-22 Thread SGreen
try this. It won't be as fast but it will sort correctly: SELECT lname, teamno, game_pts, sport_pts, ref_pts, adjust_ref_pts, if ((ref_pts+adjust_ref_pts)>15 ,game_pts + 15, game_pts + ref_pts + adjust_ref_pts) AS total_pts, (ref_pts + adjust_ref_pts) AS total_ref_pts FROM points WHERE division

Re: Sort Problem

2004-10-22 Thread Albert Padley
Nothing? Not even a "You're out of luck?" Thanks. Albert On Oct 21, 2004, at 9:48 PM, Albert Padley wrote: I've inherited a problem for a youth soccer league. Their standings are computed by adding 3 columns (game_pts, ref_pts and adjust_ref_pts) together. However, the sum of ref_pts plus adjust

Re: Simple SQL Question

2004-10-22 Thread Jeff Burgoon
Sorry, I forgot to mention I am using version 4.0.20a (no subqueries supported) ""Jeff Burgoon"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a simple problem and I'm just wondering the BEST query to solve it. > I want to return all the rows of a table whose foreign key val

Re: PRODUCT ENQUIRY

2004-10-22 Thread Rhino
Do you suppose these guys bothered to determine that the MySQL mailing list DOESN'T sell ink cartridges or memory before they sent this email? I wonder if they spammed this 'enquiry' to every mailing list in the world in the hope that some of them actually sold ink cartridges or memory? Rhino --

Simple SQL Question

2004-10-22 Thread Jeff Burgoon
I have a simple problem and I'm just wondering the BEST query to solve it. I want to return all the rows of a table whose foreign key value exists more than once in that table. IE... MyTable Region(foreign key)City EastBaltimore EastPhil

Re: Conditional statement: IF

2004-10-22 Thread Rhino
Are you trying to accomplish this in a program, a script or from the command line? If you are using a program, what language are you using? If you are using a script, what platform and shell are you using? (For example, Linux with the bash shell or Windows.) If you are using the command line, I'm

RE: **[SPAM]** Conditional statement: IF

2004-10-22 Thread Jay Blanchard
[snip] I'm trying to write a conditional statement in my query. Is the following possible in MySQL? IF(@SomeValue = 1) THEN SELECT "The value is 1"; ELSE SELECT "The value is not 1"; END IF I've tried different variations and nothing seems to be working (I'm getting syntax errors). I'm using My

Conditional statement: IF

2004-10-22 Thread Luke Venediger
Hi, I'm trying to write a conditional statement in my query. Is the following possible in MySQL? IF(@SomeValue = 1) THEN SELECT "The value is 1"; ELSE SELECT "The value is not 1"; END IF I've tried different variations and nothing seems to be working (I'm getting syntax errors). I'm using MySQ

Re: Index not used for "select distinct"?

2004-10-22 Thread Matthias Urlichs
Hi, gerald_clark: > > KEY `Trap` (`IP`,`Type`,`epoch`), > > KEY `IP` (`IP`) > > > Your second key is redundant. True (there's a UNIQUE missing in there). Deleting the first key, however, doesn't change anything. -- Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [EMAIL PROTECTED] --

Re: Index not used for "select distinct"?

2004-10-22 Thread gerald_clark
Matthias Urlichs wrote: We have a slight opimization problem here. Given this table: CREATE TABLE `test` ( `IP` varchar(15) collate latin1_german1_ci NOT NULL default '', `Type` enum('WARN','ERROR','FATAL','UNKNOWN') collate latin1_german1_ci NOT NULL default 'WARN', `epoch` int(10) unsigned N

PRODUCT ENQUIRY

2004-10-22 Thread kglobal inc.
HELLO SALES, THIS IS KGLOBAL SERVICE INC.I WANT YOUR COMPANY TO QOUTE THE FOLLOWING ITEMS FOR MY COMPANY: 1. 200 PIECES OF C6578DN INKJET CATRIDGES (OEM) 2. 2 PIECES OF HPNX9010 PENTIYM 4 NOTEBOOK. 3. 50 PIECES OF 512MB DDR PC2700 33MHz MEMORY(KINGSTON). AND ALSO I WANT YOU TO C

RE: Index not used for "select distinct"?

2004-10-22 Thread Jay Blanchard
[snip] We have a slight opimization problem here. Given this table: CREATE TABLE `test` ( `IP` varchar(15) collate latin1_german1_ci NOT NULL default '', `Type` enum('WARN','ERROR','FATAL','UNKNOWN') collate latin1_german1_ci NOT NULL default 'WARN', `epoch` int(10) unsigned NOT NULL defaul

Index not used for "select distinct"?

2004-10-22 Thread Matthias Urlichs
We have a slight opimization problem here. Given this table: CREATE TABLE `test` ( `IP` varchar(15) collate latin1_german1_ci NOT NULL default '', `Type` enum('WARN','ERROR','FATAL','UNKNOWN') collate latin1_german1_ci NOT NULL default 'WARN', `epoch` int(10) unsigned NOT NULL default '0',

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: mysql and innoDB

2004-10-22 Thread Egor Egorov
"Stefan Gnann" <[EMAIL PROTECTED]> wrote: > I have a mysql database 4.0.15 on a suse linux 9.x system running. First, upgrade to .20 version officially built by MySQL AB (http://dev.mysql.com/). RPM version is easy to install and run. > Now we have to use the features of InnoDB tables (rollbac

Re: Importing Excel Data in MySql

2004-10-22 Thread Egor Egorov
See http://dev.mysql.com/doc/mysql/en/LOAD_DATA.html Hope that helps. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / //

Re: MySQL server is taking all my hardrive space

2004-10-22 Thread Egor Egorov
Most likely, binary logs are populating the space. Read http://dev.mysql.com/doc/mysql/en/PURGE_MASTER_LOGS.html -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_

Re: Revert a column to its default value

2004-10-22 Thread Egor Egorov
Jonathan Kart <[EMAIL PROTECTED]> wrote: > > Hi all, > > > Is it possible in mysql 3.23 to update a row and revert a column back > to its default value. Not the default value for the type, but the > value defined as the column default. [] > UPDATE pictures SET picture_name=DEFAULT; <-- don'

Re: Error Starting MySQL 4.0.21

2004-10-22 Thread Egor Egorov
"Jason Williard" <[EMAIL PROTECTED]> wrote: > I have a new linux server that I just installed the > mysql-max-4.0.21-pc-linux-i686 binary on. The installation had no errors. > However, it is not starting on startup because of the following error: > > Can't execute ./bin/mysqld_safe from dir /va

Re: Odd MySQL error

2004-10-22 Thread Egor Egorov
Rich West <[EMAIL PROTECTED]> wrote: Check limits for the MySQL user account in Fedora. Check that the init script is original from MySQL, not the Fedora one. Tail the dmesg output and look for suspictious messages. > I have searched the archives (well, the search never came back...), and >

Re: Sharing database files between EMBEDDED MYSQL and MySQL Server

2004-10-22 Thread Egor Egorov
"Valdir Henrique Dias Leite" <[EMAIL PROTECTED]> wrote: > I have an application that uses mysql embedded (performance > issues ...). > > The app itself works fine, but data adminsitration (issuing > DDL, DML statements ) is very complicated using C API... > > So, I created an entry in my.cnf

Re: mysql-administrator

2004-10-22 Thread Egor Egorov
spiv007 <[EMAIL PROTECTED]> wrote: > Has anyone seen this before with mysql-administrator? > > /usr/local/bin/mysql-administrator: line 9: 19856 Segmentation fault > $MYPATH/mysql-administrator-bin > > I get this everytime i go to schema privileges to assian a user rights. Can you create a sim

RE: mysql_config (4.0.21) returning the wrong socket location

2004-10-22 Thread Caron, Christian
> > No it's not a bug. Look up the DBI documentation and change > the mysql_sock= > location in your code OR in /etc/my.cnf define the > mysqld.sock file to be > stored in /tmp. > > Hmmm... It's not a bug but I have to adapt to it? There is something wrong with mysql_config not returning the r

Re: Help with ALTER TABLE error

2004-10-22 Thread Egor Egorov
John Stile <[EMAIL PROTECTED]> wrote: > I have Mysql Cluster (version 4.1.16-gama) running, and now I need to > convert database tables from engine MyISAM to NDBCLUSTER, but ALTER > TABLE fails on some tables. > > Does anyone know what the error means or how to get around it? > > mysql> use data

Re: Commercial Licensing Question

2004-10-22 Thread Egor Egorov
You may direct your question to [EMAIL PROTECTED] -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [E

Re: Partial Row Reads?

2004-10-22 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Ken Gieselman <[EMAIL PROTECTED]> writes: > The second issue is query performance. It seems that regardless of > what fields are selected, it reads the entire row? Since a monthly > table averages 840GB, this takes a while, even on a well-organized > query like 'S

Re: mysql optimizing large table

2004-10-22 Thread Richard Bennett
On Friday 22 October 2004 11:10, Mechain Marc wrote: > If you don't want to have those error messages: > > Increase the value of "Open File" using ulimit shell command. > > Do a ulimit -a to see the current value > Do a ulimit -n newvalue to increase it > > You can also modify the /etc/limits file

RE: mysql optimizing large table

2004-10-22 Thread Mechain Marc
If you don't want to have those error messages: Increase the value of "Open File" using ulimit shell command. Do a ulimit -a to see the current value Do a ulimit -n newvalue to increase it You can also modify the /etc/limits file Marc. -Message d'origine- De : Richard Bennett [mailto:

Re: mysql optimizing large table

2004-10-22 Thread Richard Bennett
Hi, On Thursday 21 October 2004 22:00, Dathan Vance Pattishall wrote: > My.cnf.huge is not good enough for your system specs. Calculate the Key > efficiency from the show status command. I bet the key efficiency is less > then 90% or so. By my count it is 99.88, the status output is: Key_blocks_u