Count Rows within unions

2004-10-15 Thread Martin Rytz
Hi SQL-Cracks How can I count the rows within a select with multiple unions? Count rows with one select is easy: select count(*) from table Count rows over multiple tables is complicated: select name from table1 union select name from table2 union select name from table3 order by name

4.1-Schema won't assign, snaps back

2004-10-15 Thread Anders Green
This is a 4.1 installation over a 4.0 installation. I created a db under 4.0, and it's working under 4.1. Queries, admin tool, query browser, all connect and run. My problem is security and schema privileges. When I MySqlAdministrator-User Administration-click on root-click schema privileges

Re: Delete data from more than one table

2004-10-15 Thread Philippe Poelvoorde
Jerry Swanson wrote: I can delete data for one table with no problem: delete from table; I need to delete data for more than one table. I tried to run this query: delete from account, survey; //But the query crashes. Any ideas how to delete data for more than one query. TH multi-table delete

RE: Select Binary Field when UTF8 and Collate

2004-10-15 Thread Kevin Cowley
Don't worry about the SET syntax we have that sorted. The problem is MySQL is not treating the comparison in the where clause as a binary comparison. It appears to be encoding either the fields or the comparator value and therefore getting an incorrect result, it either returns the wrong row or

Re: How can I turn this into an update query?

2004-10-15 Thread Philippe Poelvoorde
Ed Lazor wrote: Is there a way for me to change this select query into an update query? select t1.ID, t1.Title, t2.Title from products t1, systems t2 where t1.Title like CONCAT(t2.Title, %) A lot of products have the system title as the first part of the product title. I'm trying to update the

hotcopy - segfault

2004-10-15 Thread James Green
Hi Trying to run mysqlhotcopy on multiple Debian stable systems, am getting segfaults on some of them. We're using mysql-4.0.20 from the binary release off mysql.com. strace says: open(/var/lib/misc/services.db, O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory)

create table....select * from table anomaly..

2004-10-15 Thread Karam Chand
Hello, I have three databases 3.23.54 (production) 4.0.18 and 4.1.3 as test servers. I execute the following sqls: create database testdb; use testdb; CREATE TABLE `test` ( `example_col` varchar(100) default NULL

MySQL 4.1.6 has been released

2004-10-15 Thread Matt Wagner
Hi, MySQL 4.1.6, a new version of the popular Open Source/Free Software Database Management System has been released. It is now available in source and binary form for a number of platforms from our download pages at http://dev.mysql.com/downloads/ and mirror sites. Note that not all mirror

strange user permissions error

2004-10-15 Thread Crouch, Luke H.
we had a power outtage and for some reason our user permissions didn't seem to come back? we had a record of granting a 'cfmysql'@'%.ourdomain.com' and it didn't seem to work at all until I did a flush privileges...and even after that, I had to go in and set up some explicit domains in addition

Re: Ask for help on a mysql problem

2004-10-15 Thread Diona Kidd
Teng, how is this different than a foreign key? On Oct 14, 2004, at 11:27 PM, Teng Wang wrote: I wanna setup a tree structure. Each node in this tree is a table. Each table has a link field. For each record, the data in this field is a pointer to another table or null. I read mysql manual but

Re: is 'start' a keyword?

2004-10-15 Thread rik onckelinx
Hi, Had a similar error last night: My hosting provider offered my to upgrade to mambo 4.5.1 cms. While it ruined the whole site, I've tried to restore the backup. When using the backup.sql file (generated through phpmyadmin) using this syntax: CREATE TABLE mos_components ( ... option

INSERT SELECT in older version of MySQL

2004-10-15 Thread Jay Blanchard
mysql INSERT INTO Employee.tblNiiEmployee (empEmail) - SELECT b.Email_Address - FROM Employee.tblNiiEmployee a LEFT OUTER JOIN UserDB.Corporate b - ON(a.empUsrName = b.Unix_Username) - WHERE b.Email_Address IS NOT NULL; Since versions prior to 4.0.14 do not support using the same

Re: strange user permissions error

2004-10-15 Thread Anders Green
At 09:52 AM 10/15/2004, Crouch, Luke H. wrote: user permission trouble MySQL version? I've been having some trouble with 4.1.5. Anders +===+ |Anders Green Email: [EMAIL PROTECTED] | | Home:

Re: simple but frustrating query

2004-10-15 Thread Jeff Mathis
i don't think i missed any points raised by anyone in this discussion. email is often a difficult medium for technical issues. for most of our purposes, we run multiple queries in order to make sure we are actually getting the data we want. it makes the code simpler, easier to understand and

RE: INSERT SELECT in older version of MySQL SOLVED

2004-10-15 Thread Jay Blanchard
[snip] mysql INSERT INTO Employee.tblNiiEmployee (empEmail) - SELECT b.Email_Address - FROM Employee.tblNiiEmployee a LEFT OUTER JOIN UserDB.Corporate b - ON(a.empUsrName = b.Unix_Username) - WHERE b.Email_Address IS NOT NULL; Since versions prior to 4.0.14 do not support using

Re: Adding DSN into Coldfusion Admin?

2004-10-15 Thread Steve Grosz
Ok, with leaving the : off the end, and just typing telnet web-server2 3306 I get some jibberish on the screen, and a 'connection lost' message after a few seconds. That's coming from a machine on the same side of the firewall as the Sql server. For the other IIS server and Coldfusion server

Re: Adding DSN into Coldfusion Admin?

2004-10-15 Thread Jochem van Dieten
On Fri, 15 Oct 2004 10:26:22 -0600, Steve Grosz wrote: Ok, with leaving the : off the end, and just typing telnet web-server2 3306 I get some jibberish on the screen, and a 'connection lost' message after a few seconds. That's coming from a machine on the same side of the firewall as the Sql

MySQL 4.1.x and Oracle 9 query compatibility

2004-10-15 Thread Steve Wardell
I'm looking as trying to use the same queries for an application to run on both Oracle 9 (which has fair ANSI compatibility) and MySQL 4.1.x. Most areas have been addressed, but the dates are where I'm having issues. SYSDATE and NOW() don't appear to be equal as well as doing date math.

INSERT .. ON DUPLICATE KEY UPDATE behaviour

2004-10-15 Thread Jason McManus
Good afternoon, I have had reason to use the new (as of 4.1.1) INSERT .. ON DUPLICATE KEY UPDATE syntax in MySQL. However, I am a bit confused as to the return value. Issuing the INSERT .. ON DUP KEY UP statement, upon finding a duplicate key and updating that record, mysql-client returns 2

ODBC connection issues

2004-10-15 Thread Steve Grosz
I am trying to set up a ODBC connection from a Coldfusion server to a MySql server, both running on Windows2003 Servers. I installed the ODBC 3.51 driver on the Coldfusion server, and am trying to make the connection. When I go to set up the ODBC link and say 'test data source' I get a

Re: Adding DSN into Coldfusion Admin?

2004-10-15 Thread Steve Grosz
I also get the jibberish, and a connection lost error message. Is it something in MySql server that I'm not setting up correctly? Jochem van Dieten wrote: On Fri, 15 Oct 2004 10:26:22 -0600, Steve Grosz wrote: Ok, with leaving the : off the end, and just typing telnet web-server2 3306 I get

Re: ODBC connection issues

2004-10-15 Thread Michael Stassen
See the manual http://dev.mysql.com/doc/mysql/en/Password_hashing.html. Michael Steve Grosz wrote: I am trying to set up a ODBC connection from a Coldfusion server to a MySql server, both running on Windows2003 Servers. I installed the ODBC 3.51 driver on the Coldfusion server, and am trying to

Re: ODBC connection issues

2004-10-15 Thread Steve Grosz
So, you're saying its a problem with the password on the root account? This was a brand new install. I'm a little confused here. Steve Michael Stassen wrote: See the manual http://dev.mysql.com/doc/mysql/en/Password_hashing.html. Michael Steve Grosz wrote: I am trying to set up a ODBC connection

Transactions dilemma

2004-10-15 Thread Stuart Felenstein
I have a slight dilemma. I am using transactions to insert data into multiple tables. All but one table is Innodb. That one is Myisam and it's left as such because its one text column, so I want the benefits of full text search. Still I need this transaction to somehow include this entry. Two

MySQL implementation of Oracle sequences

2004-10-15 Thread Kenneth Lim
Hello - I was wondering if others have had to deal with an Oracle to MySQL migration and how you handled the implementation equivalent of Oracle sequences in MySQL. Our application uses a bunch of Oracle sequences to keep ID uniqueness for each sequence type. For example, we have:

Re: MySQL implementation of Oracle sequences

2004-10-15 Thread David Griffiths
Having done one of these conversions in the past, I can say that auto-incremented columns work just fine. You insert the row, and then make a SELECT last_insert_id() call - this returns the value of the last auto-increment generated via an insert for the connection (so some other database

Command that I believe should work...

2004-10-15 Thread Robert Adkins
...but doesn't. I am attempting to create a table using the following... CREATE TABLE INVOICE ( INV_NUMBER INTPRIMARY KEY, CUS_CODEINT NOT NULL REFERENCES CUSTOMER(CUS_CODE), INV_DATE DATETIME DEFAULT NOW() NOT NULL, );

RE: Command that I believe should work...

2004-10-15 Thread Chris W. Parker
Robert Adkins mailto:[EMAIL PROTECTED] on Friday, October 15, 2004 12:23 PM said: INV_DATE DATETIME DEFAULT NOW() NOT NULL, ); I receive an error message stating that there is an error with 'NOW()' [snip] Is there a very different method of doing this

Re: Command that I believe should work...

2004-10-15 Thread V. M. Brasseur
If you make that column a TIMESTAMP data type and leave the default as NULL, it will automatically use the current date/time if no value is entered. Please note, this will only work this way for the first TIMESTAMP column in the table. Also, if ever you update a row containing TIMESTAMP

Re: ODBC connection issues

2004-10-15 Thread Michael Stassen
No, I'm saying that your client (ODBC from Coldfusion) was built against an earlier version of the mysql client library, so it doesn't understand the new, more secure, authentication protocol introduced in mysql 4.1. Did you read the manual section I suggested? It contains an explanation of

RE: Command that I believe should work...

2004-10-15 Thread Peter Lovatt
hi you might want to look at TIMESTAMP which does it all for you. Peter -Original Message- From: Robert Adkins [mailto:[EMAIL PROTECTED] Sent: 15 October 2004 20:23 To: MySQL General List Subject: Command that I believe should work... ...but doesn't. I am attempting to

Re: Command that I believe should work...

2004-10-15 Thread Michael Stassen
Defaults must be constants, not functions. If you want a DATETIME which defaults to NOW(), then you probably really need a TIMESTAMP http://dev.mysql.com/doc/mysql/en/DATETIME.html. Michael Chris W. Parker wrote: Robert Adkins mailto:[EMAIL PROTECTED] on Friday, October 15, 2004 12:23 PM

Re: Command that I believe should work...

2004-10-15 Thread David Griffiths
Only static data is allowed as default-values; functions, derived data etc, are not allowed. An unfortunate shortcoming. On the flipside, there is some weird rule that the first timestamp in a table will be set with the current date/time during an insert if the column is left out of the insert

Connector/J Null pointer in initializePropsFromServer

2004-10-15 Thread V. M. Brasseur
I am passing on this question from a coworker: Hello -- This has been posted on the forums.mysql.com for a week with no replies. We have been using Connector J 3.0.6 for more than a year at hundreds of customer sites and on our in house servers. When I updated the jar to 3.0.15-ga we can still

Re: Command that I believe should work...

2004-10-15 Thread Robert Adkins
TIMESTAMP, at least by the book in front of me, is only valid from January 1, 1970 to December 31, 2037. I want to avoid using something that could create a Y2037 issue, if whatever I build ends up lasting that long. To me, that is a potential hazard and thus would be a bad habit to get

Re: Adding DSN into Coldfusion Admin?

2004-10-15 Thread Michael Stassen
Did the gibberish look something like this? Trying web-server2... Connected to web-server2. Escape character is '^]'. : 4.1.4a-gamma P--=)TK],rFDbDid:5:di Bad handshakeConnection closed by foreign host. If so, you got through to the mysql server. (See the version number?)

Re: Insert Delayed

2004-10-15 Thread Paul DuBois
At 12:22 -0700 10/13/04, John McCaskey wrote: I verified the same error for myself, and then found: http://bugs.mysql.com/bug.php?id=5777 Sounds like the documentation is just wrong, and it is not supported for innodb period. John On Wed, 2004-10-13 at 11:53 -0700, Daniel Cummings wrote: Does

MySQL valid characters for passwords

2004-10-15 Thread Charlene Wroblewski
I haven't been using MySQL very long, but I have managed to secure the users in my database. My problem is what are valid characters for a password. I've tried using valid unix passwords and I can't log in. I'm trying a password like 'ab#CD*12'. -- MySQL General Mailing List For list

Copy table?

2004-10-15 Thread John Mistler
Is there a way to make an exact copy of a table and give the copy a new name? Thanks, John -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: MySQL valid characters for passwords

2004-10-15 Thread Michael J. Pawlowsky
I'm not really sure what is invalid. I did not think anything was. But are you adding them as with the PASSWORD function. Take a look at: http://dev.mysql.com/doc/mysql/en/Passwords.html Mike Charlene Wroblewski wrote: I haven't been using MySQL very long, but I have managed to secure the users

Re: ODBC connection issues

2004-10-15 Thread Steve Grosz
I noticed at the bottom of that page there are some user comments about recompiling and ODBC not working. Any concerns regarding those comments and the issues I'm having? Steve Michael Stassen wrote: No, I'm saying that your client (ODBC from Coldfusion) was built against an earlier version

Fulltext Search help

2004-10-15 Thread leegold
I'm running into a limitation in the fulltext search though I think by defination a fulltext search will not - or even should not do this, but I'd like to implement this this functionality somehow, given in a text doc. the string: Yesterday I was superduperworkingman at times. I do fulltext

Re: Adding DSN into Coldfusion Admin?

2004-10-15 Thread Jochem van Dieten
On Fri, 15 Oct 2004 11:36:23 -0600, Steve Grosz wrote: I also get the jibberish, and a connection lost error message. Is it something in MySql server that I'm not setting up correctly? That probably means you can reach the MySQL server and the problem is on OSI-layer 5-8 :-) Could you go into

RE: Fulltext Search help

2004-10-15 Thread Chris W. Parker
leegold mailto:[EMAIL PROTECTED] on Friday, October 15, 2004 2:32 PM said: I do fulltext search on work. And AFAIK the search will not find work. For that matter the seach will not find ingm. How do I implement in MYSQL/PHP a search that will have this action? please share the current

LATEST_DATE

2004-10-15 Thread John Mistler
Is there a function that will return the latest date from a datetime column? something like LATEST_DATE(theColumn) -- 2004-10-15 15:17:00 Thanks, John -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: LATEST_DATE

2004-10-15 Thread Chris W. Parker
John Mistler mailto:[EMAIL PROTECTED] on Friday, October 15, 2004 3:17 PM said: Is there a function that will return the latest date from a datetime column? SELECT theColumn FROM theTable ORDER BY theColumn ASC (or is it DESC?) LIMIT 1; something like this? (or maybe this is too simple

Re: LATEST_DATE

2004-10-15 Thread Paul DuBois
At 15:16 -0700 10/15/04, John Mistler wrote: Is there a function that will return the latest date from a datetime column? something like LATEST_DATE(theColumn) -- 2004-10-15 15:17:00 MAX() -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com -- MySQL General

InnoDB?

2004-10-15 Thread Rick Langschultz
Can I safely store multiple customer credit card numbers in a table that is InnoDB, if I use an Encrypt() to encrypt the number and then decrypt the number? The site will have a shared SSL cert on it. Please give me tips.

Re: InnoDB?

2004-10-15 Thread mos
At 09:45 PM 10/15/2004, you wrote: Can I safely store multiple customer credit card numbers in a table that is InnoDB, if I use an Encrypt() to encrypt the number and then decrypt the number? The site will have a shared SSL cert on it. Please give me tips. No. The Encrypt function is too weak.

Run-time Error '430':

2004-10-15 Thread Red Gibbs
Run-time Error '430': Class does not support Automation or does not support expected interface. This is a new install on Windows XP SP2. I had HFNetChk Pro installed and running using MDAC until I installed MySQL. 1. is anyone running MDAC and MySQL on the same system? 2. How do I fix this

Query help

2004-10-15 Thread John Mistler
I need help coming up with the following query: My table: +-+--+ | rowID | dateOfPurchase | +-+--+ | 1 | '2004-1-17 08:00:00' | +-+--+ | 4 | '2004-1-17 08:03:20' |