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
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
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
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
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
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)
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
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
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
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
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
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
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:
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
[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
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
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
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.
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
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
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
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
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
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
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:
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
...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,
);
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
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
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
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
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
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
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
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
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?)
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
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
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]
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
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
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
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
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
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]
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
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
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.
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':
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
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' |
51 matches
Mail list logo