Re: Update one field with more fields from another table

2004-03-13 Thread Nitin Mehta
UPDATE `Table A`,`Table B` SET `Table A`.`text`=concat_ws('', `Table B`.`B-num`, from ,`Table B`.`date`) WHERE `Table A`.`A-num` = `Table B`.`A-num` Hope it works Nitin - Original Message - From: Wouter Coppieters [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 13, 2004

Re: Update one field with more fields from another table

2004-03-13 Thread Nitin Mehta
UPDATE `Table A`,`Table B` SET `Table A`.`text`=concat_ws('', `Table B`.`B-num`, from ,`Table B`.`date`) WHERE `Table A`.`A-num` = `Table B`.`A-num` Hope it works Nitin - Original Message - From: Wouter Coppieters [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 13, 2004

re: Union Query Sorting

2004-03-13 Thread Ed Reed
Thanks Jeremy, That was easy. - Ed Jeremy March [EMAIL PROTECTED] 3/12/04 7:42:12 PM Can anyone tell me how to sort the combined results of a Union query? (Select Name From Employee Group By Name Order By Name) Union (Select Name From Consultant Group By Name Order By Name); Just

Enabling Logging

2004-03-13 Thread Jai Jones
Hi, I am a little confused on how to get logging working, perhaps some advanced users can help :) Here's what I'm trying to do, I am backing up my MySQL data using a shell script and mysqldump. I would like to be able to send an email notification to myself to know that the dump worked. I

Query Optimization

2004-03-13 Thread Kris Burford
Hi, I'm trying to sort out a query that identifies images that are not in the story table (structures below). Peter Brawley has kindly pointed me in the right direction with the sql structure (which does work), but I'm getting benchmarks of 5+ seconds on the test data, whereas the live site

Re: utf8 - left function

2004-03-13 Thread silk
Problem tested using both version 4.0.18 and 4.1.1 This query gets first byte of utf8 character, not two bytes If I use SELECT LEFT(FieldName, 2) AS FirstLetter, COUNT(*) FROM TableName GROUP BY FirstLetter gets right utf8 characters but others wrong for example; ++---+ | Ai

Re: PgSQL vs MySQL

2004-03-13 Thread Kaarel
Jeremy Smith wrote: I have an extrememly query heavy site that I tried to switch from MySQL to PgSQL. And after spending literally a week reconfiguring thousands of queries and rewriting code, I finally had the pgSQL version of the site live, but when I had even a trickle of users on the site it

MySQL takes 8Sek, MySQLcc takes 0.1Sek to run the same query. WHY???

2004-03-13 Thread Fredrik Högberg
Hi! I'm trying to run the following query. (SELECT Priority, OnDateExt, OnTime, OnMilli, OffDateExt, OffTime, Name, Native_SumDesc, Comment FROM history.alarm_summary WHERE OnDateExt DATE_SUB(CURDATE(), INTERVAL 14 DAY) ) UNION (SELECT Priority, OnDateExt, OnTime, OnMilli, OffDateExt,

Newbie - Please help with createing database

2004-03-13 Thread ryan
. Hi, After 4 hours I am finally seeing a bit of results...am a newbie in MySql and have just been able to setup PHPMyAdmin, after loggin in I see the database MySql and 6 tables: columns_priv db func host tables_priv user I then tried to create a database and it gives me this error Error

Re: Newbie - Please help with createing database

2004-03-13 Thread ryan
Hey, Thanks for replying. I login with username root and a password I set in the ensim control panel, it works perfectly. I dont really know if I am in the mysql database...but there are a couple of tables or dbs there... What id are you using to create the table? I guess root, coz thats

Re: Newbie - Please help with createing database

2004-03-13 Thread ryan
Hey, Thanks for replying. I login with username root and a password I set in the ensim control panel, it works perfectly. I dont really know if I am in the mysql database...but there are a couple of tables or dbs there... What id are you using to create the table? I guess root, coz thats

Re: Newbie - Please help with createing database

2004-03-13 Thread ryan
Hey, Thanks for replying. I login with username root and a password I set in the ensim control panel, it works perfectly. I dont really know if I am in the mysql database...but there are a couple of tables or dbs there... What id are you using to create the table? I guess root, coz thats

Re: Newbie - Please help with createing database

2004-03-13 Thread ryan
Hey, Thanks for replying. I login with username root and a password I set in the ensim control panel, it works perfectly. I dont really know if I am in the mysql database...but there are a couple of tables or dbs there... What id are you using to create the table? I guess root, coz thats

Re: Newbie - Please help with createing database

2004-03-13 Thread ryan
Hey James, Thanks for replying. How do you like ensim? Pretty good, quite easy to use...Got it free with my hosting so no complaints. BTW - I use the CLI(command line interface) and connect using the mysql CLI: Ok, tried it via CLI and heres the output # mysql -u root -p Enter password:

Re: Newbie - Please help with createing database

2004-03-13 Thread Egor Egorov
[EMAIL PROTECTED] wrote: . Hi, After 4 hours I am finally seeing a bit of results...am a newbie in MySql and have just been able to setup PHPMyAdmin, after loggin in I see the database MySql and 6 tables: columns_priv db func host tables_priv user I then tried to create a database

query question...

2004-03-13 Thread Manuele
This might sound silly to many... so sorry in advance... in mysql4 Suppose I have 2 tables: tableA has 3 columns, 2 of them reference the same column of tableB Example: TableA (Items) Id - FirstType - SecondType 0 - 1 - NULL 1 - 2 - 3 TableB (Types) Id

Re: Query Optimization [sorted]

2004-03-13 Thread kris burford
I'm trying to sort out a query that identifies images that are not in the story table (structures below). Peter Brawley has kindly pointed me in the right direction with the sql structure (which does work), but I'm getting benchmarks of 5+ seconds on the test data, whereas the live site has

Re: Newbie - Please help with createing database

2004-03-13 Thread Hassan Schroeder
[EMAIL PROTECTED] wrote: mysql create database test1; ERROR 1006: Can't create database 'test1'. (errno: 13) In the bin directory of your installation, you should have a program named 'perror' that will interpret MySQL error messages, as in: prompt$ perror 13 Error code 13: Permission denied

BETWEEN

2004-03-13 Thread Keith
g'day, i'm looking for a way to do two BETWEEN ranges. Currently I have sys.sectorID BETWEEN 1 AND 20 but I want it so that I can search between 1 and 20 and also between 30 and 42 but all my efforts net an error and the manual doesn't go into a lot of detail. If there's a faster way than

Re: Union Query Sorting

2004-03-13 Thread Michael Stassen
And if you're sorting by Name in the end, you don't really need to sort by Name in each SELECT: (SELECT Name FROM Employee Group By Name) UNION (SELECT Name FROM Consultant Group By Name) ORDER BY Name; Do you expect the same Name in multiple rows in these tables? If not, you can drop

Re: mysql error grant tables, help

2004-03-13 Thread Victor Medina
Hi! try to look at your my.cnf you haven't config it correctly! At 05:54 p.m. 12/03/2004, Chris Sanchez wrote: get this when i run scripts/mysql_install_db. also tried mysqld --skip-grant and got the same thing. how do i fix? mysql-standard-4.0.18-sun-solaris2.8-sparc binary on SunOS ipdev1 5.8

Re: Union Query Sorting

2004-03-13 Thread Egor Egorov
Ed Reed [EMAIL PROTECTED] wrote: Can anyone tell me how to sort the combined results of a Union query? Right now I have a Group By and Order By in both of my queries that make up my Union but the results are grouped and sorted within the two queries but not between the two queries. The example

Re: BETWEEN

2004-03-13 Thread Michael Stassen
Keith wrote: g'day, i'm looking for a way to do two BETWEEN ranges. Currently I have sys.sectorID BETWEEN 1 AND 20 but I want it so that I can search between 1 and 20 and also between 30 and 42 but all my efforts net an error and the manual doesn't go into a lot of detail. If there's a faster

Re: utf8 - left function

2004-03-13 Thread Jeremy March
Problem tested using both version 4.0.18 and 4.1.1 This query gets first byte of utf8 character, not two bytes If I use SELECT LEFT(FieldName, 2) AS FirstLetter, COUNT(*) FROM TableName GROUP BY FirstLetter gets right utf8 characters but others wrong for example;

Re: BETWEEN

2004-03-13 Thread Rhino
Have you tried connecting the 'between' clauses with 'OR'? Like this: select * from table where sector_id between 1 and 20 or sector_id between 30 and 42 This approach works in my 4.0.15 MySQL database. Rhino - Original Message - From: Keith [EMAIL PROTECTED] To: mysql [EMAIL

Re: Enabling Logging

2004-03-13 Thread Ken Menzel
Hi JJ, Not really a MySQL question but more a UNIX/Linux question. UNIX 101 If mysqldump encounters an error it will like all well behaved programs write an error message to stderr. You can also from your script check the error return from the command and perform additional actions. I would

Re: BETWEEN

2004-03-13 Thread Jochem van Dieten
Michael Stassen wrote: SELECT * FROM sys WHERE sectorID BETWEEN 1 AND 20 OR sectorID BETWEEN 30 AND 42; If that's slow (the optimizer doesn't like ORs) and you are using at least mysql 4.0.0, you can change this to SELECT * FROM sys WHERE sectorID BETWEEN 1 AND 20 UNION SELECT * FROM sys

AW: Problem selecting from 3 tables

2004-03-13 Thread B. Fongo
This query work ok. Any suggestion on how to further optimize it? SELECT PictureName, ProdName, Description, SalesPrice FROM Products INNER JOIN ProdCategory ON Products.CategoryNr INNER JOIN ProductsPics on Products.ProdNr WHERE Products.CategoryNr = ProdCategory.CategoryNr AND

Re: Newbie - Please help with createing database

2004-03-13 Thread Hassan Schroeder
Ryan A wrote: prompt$ perror 13 Error code 13: Permission denied Can you give me directions or a URL which will explain how to fix this please...am a newbie remember :-) Assuming you're on some sort of *nix system, `man chmod` will show you how to change permissions of files and directories.

Unstable Database Connection

2004-03-13 Thread Nawal Lodha
Hi all, I am using MyODBC-3.51.06 and mysql-4.1.1-alpha. I connect to the database using a COM C++ Object and query through ADO recordsets. But the database connection changes inconsistently. I checked the MySQL logs and discovered that Init DB mysql call is made which connects my application

problem with sql as a service

2004-03-13 Thread Charles Fletcher
i put mysql on my pc, after unzipping the files in a folder and running it as a service, i went to my administration tools and to services to turn it on manuely and te exacution path is wrong, how do i change this, i tryed reinstalling it but it will not change the path in services, is there a

Re: problem with sql as a service

2004-03-13 Thread Ken Menzel
Hi Charles! Great, a little extra info is needed. Is it windows XP or 2000? My guess would be not the server version? What do you mean running as a server? Did you tpe something like cd c:\mysql mysqld --install or mysqld --install-manual ?? Also what version of mysql?! The

query question using REGEXP

2004-03-13 Thread award
Hi, I'm storing in a database numbers separated by comma if more than one number i.e Record # Column 112 21,2,5,6 31,12,24,45 4

Re: InnoDB tables using 90% cpu

2004-03-13 Thread Cliff
Well I recompiled with Linuxthreads with the same result. I ran explain on both queries and the only difference is innodb looks at 31 rows where myisam looked at 23. Both are of type range. Is there anything else I can do before giving up on innodb? - Original Message - From: Chris

Re: BETWEEN

2004-03-13 Thread beacker
Keith writes: i'm looking for a way to do two BETWEEN ranges. Currently I have sys.sectorID BETWEEN 1 AND 20 but I want it so that I can search between 1 and 20 and also between 30 and 42 but all my efforts net an error and the manual doesn't go into a lot of detail. If there's a faster way than

Re: BETWEEN

2004-03-13 Thread Matt W
Hi Michael, - Original Message - From: Michael Stassen Sent: Saturday, March 13, 2004 10:48 AM Subject: Re: BETWEEN Keith wrote: g'day, i'm looking for a way to do two BETWEEN ranges. Currently I have sys.sectorID BETWEEN 1 AND 20 but I want it so that I can search between

Re: query question using REGEXP

2004-03-13 Thread Matt W
Hi Anthony, You don't need REGEXP for this; LIKE will do. Try something like this: ... WHERE CONCAT(',', Column, ',') LIKE '%,2,%' to search for rows that contain 2. Hope that helps. Matt - Original Message - From: award Sent: Saturday, March 13, 2004 2:16 PM Subject: query

MySQL, Second Edition, now available in Russian

2004-03-13 Thread Paul DuBois
The book MySQL, Second Edition, is now available in Russian. Information is available at: http://www.kitebird.com/mysql-book/ Check the translations page. -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com MySQL Users Conference: April 14-16, 2004

Re: Uninstall MySQL for Panther?

2004-03-13 Thread Paul DuBois
At 21:31 -0800 3/12/04, John Mistler wrote: First I want to thank all of you guys for responding. I feel a new sense of confidence that I will be able to get this thing going! However, my problems have compounded. We now have a new problem. I took the advice of one archived postings and dragged

Re: New Prepared Statements !!!!!

2004-03-13 Thread Paul DuBois
At 13:08 + 3/12/04, Arunachalam wrote: Sorry to all, I found that these API are renamed in next release of 4.1.2 (not yet released) from the URL: http://www.mysql.com/doc/en/News-4.1.2.html That's correct. The information is also at:

Re: Can't create thread

2004-03-13 Thread Sasha Pachev
Michael Bacarella wrote: Does Red Hat have some kind of userland address space hack that we're not aware of? Do you have any special kernel config options that you did not use before? the thread stacks are 2MB apiece (bf601000-bf80 is 2093056 bytes, or 2044kB)! Yet: # mysql -e 'show

Re: query question using REGEXP

2004-03-13 Thread Matt W
Hi Anthony, Please reply to the list also (and not just me) so others can follow the discussion. :-) Well, if the commas are sometimes there, sometimes not (*with multiple numbers*), that's a problem. However, if you just mean that the commas aren't there when it's just one number, then the

Re: Random Table Locking in 3.23.58-7 ?

2004-03-13 Thread Sasha Pachev
[EMAIL PROTECTED] wrote: Here is the problem. I am getting random table locks in my databases on a new server running Fedora 0.96 and Mysql 3.23.58-7. It seems that different tables will lock -- what I mean by that is when I try to execute a query on them, mysql just freezes up -- it doesn't

Re: Determining when slave has synchronized.

2004-03-13 Thread Sasha Pachev
Ian van der Neut wrote: Hello all, Is there a scriptable way to determine if a slave in a replication setup has been fully synchronized with its master? Kind of like the following: echo SHOW SLAVE STATUS | mysql -u root | awk -f somescript.awk I'm not asking you to write the awk script for me

Re: Slow query with like clause (repost)

2004-03-13 Thread Sasha Pachev
Bryan Coon wrote: Posted this yesterday, but it never showed up...? Hi, I have the following table (sorry if the formatting gets tweaked) and query. The table is around 36k rows long, and the query returns about 350 rows. The query takes 12.15 seconds. Is there any way I can speed this up?

Is there an update limit

2004-03-13 Thread John Berman
Hi Using MYSql 4.x I'm trying to execute the following in MySQL Control Center INSERT INTO jgsurname_index ( type, surname ) SELECT mc_JewishChronicle.type, mc_JewishChronicle.SURNAME FROM mc_JewishChronicle; It works fine but only does 1000 rows, the mc_JewishChronicle table has 25,000 rows

porting Microsoft SQL into MySql

2004-03-13 Thread Paul Rigor
Hi, Does anyone know how MS_Sql creates tables for users/grants/etc? I'm trying to use a program that uses MSSQL (MSDE, not the full server)... I found one called sql porter http://www.realsoftstudio.com/ ... but it's NOOT free... any other suggestions? Thanks! Paul _ Paul

question: check constraint

2004-03-13 Thread Andrew Zhu
Mysql 4.0.12 on win xp. Question: is the check constraint supported? Example: create table temp ( c1 varchar (50) check (c1 like [EMAIL PROTECTED]) ); insert into temp values (whatever); will succeed. Is my constraint wrong (say to check the email address)? or this is just parsed without

Re: question: check constraint

2004-03-13 Thread Paul DuBois
At 20:10 -0800 3/13/04, Andrew Zhu wrote: Mysql 4.0.12 on win xp. Question: is the check constraint supported? Example: create table temp ( c1 varchar (50) check (c1 like [EMAIL PROTECTED]) ); insert into temp values (whatever); will succeed. Is my constraint wrong (say to check the email

Re: InnoDB tables using 90% cpu

2004-03-13 Thread Heikki Tuuri
Cliff, - Original Message - From: Cliff [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Saturday, March 13, 2004 11:32 PM Subject: Re: InnoDB tables using 90% cpu Well I recompiled with Linuxthreads with the same result. I ran explain on both queries and the only