I am having issues with type conversion not working as expected per the
documentation.
I am using in MySQL 5.0.27 for x86/Windows.
The documentation at
http://dev.mysql.com/doc/refman/5.0/en/type-conversion.html states that for
comparison operators If one of the arguments is a TIMESTAMP or
for me if I change the two 2007-3-23
to 2007-03-23.
Fred
-Original Message-
From: Rob Desbois [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 29, 2007 5:02 AM
To: mysql@lists.mysql.com
Subject: datetime type conversion problem
I am having issues with type conversion not working as expected
a note to the type conversion page
to help other distraught users :-)
--rob
On 5/29/07, Rob Desbois [EMAIL PROTECTED] wrote:
Thanks for the replies all (and for the blog link - one to add to my feeds
I think).
Yes I spotted that adding the leading zero to the month yields the correct
result here
Hi all,
I have an extremely strange problem here. A particular part of a project I work
on has two SQL queries -- both selects, both join similar tables, and neither
modifies anything.
Running the first one works until I run the second. After that, running the
first returns no results (it
`keyXX` ON `foo` (`column1`,`column2`);
DROP INDEX `keyX` ON `foo`;
The index having a different name should only be a problem if you've
used optimizer hints in your SQL - some people do, some don't.
Someone else may have a better thought.
Dan
On 10/3/06, Rob Desbois [EMAIL PROTECTED] wrote:
Hi
Yes, ask away :)
Hi,
Is the the right group to post for questions with SQL Queries ?
thx.
yashesh bhatia
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
DELETE does support the offset
(http://dev.mysql.com/doc/refman/5.0/en/delete.html) the problem is you have an
erroneous equals character:
You wrote:
DELETE FROM tablename ORDER BY creation DESC LIMIT=n
You need:
DELETE FROM tablename ORDER BY creation DESC LIMIT offset, count
HTH,
--Rob
Hi all,
Say I have the following MyISAM table (example-ified) in a Windows-hosted DB:
CREATE TABLE foo ( column1 CHAR(1), column2 CHAR(1), UNIQUE KEY
`keyX`(`column1`));
I have to perform an update of the key to extend it to both columns (it's an
example, ignore the content of the key), and
My application contains a table `event` which is essentially a historical log.
Currently it contains a UNIQUE KEY on three fields - the location which
generated the event `location_id`, the timestamp the event was generated
`timestamp`, and the type of event `type`.
I have discovered that this
André,
Your sentence 'I want the count of all sub-entries for a specific entry'
converts straight into SQL:
'I want'
SELECT
the count of all entries
COUNT(*) FROM myTable
with a specific parent
WHERE parent_id = 5
You've missed one of the major benefits of SQL - it's designed to
way to do this is one of the methods you suggested -
recursively adding up, or storing a count which is updated on insert/delete
operations.
--Rob
-Ursprüngliche Nachricht-
Von: Rob Desbois [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 27. September 2006 15:48
An: André Hänsel
Sean,
As http://dev.mysql.com/doc/refman/5.0/en/revoke.html states,
REVOKE ALL ON `database`.`table` FROM 'user'@'hostname';
MySQL - 4.0.18-standard-log
How do you revoke all privileges from a user for one table in a database,
and still maintain the existing privileges for the other tables?
I'd have to agree with Alec here (over Erik's response).
There's no technical reason, surely, to use 'desc' instead of 'description' -
people always seem afraid of using non-abbreviated fieldnames / function names
/ variable names. Whilst it may add a little more to your typing, it adds so
much
Is there somewhere I can find the exact differences between the contents of
the
'essential' and 'complete' Windows MySQL distributions?
I've tried the source code and searched all over the website but can't find
it anywhere.
Ping!
Is there somewhere I can find the exact differences between the contents of the
'essential' and 'complete' Windows MySQL distributions?
I've tried the source code and searched all over the website but can't find it
anywhere.
--Rob
Sorry but you want me to write the whole SQL query?
He has to use his brain.
Grouping and joining the tables.
I'm not here for doing your or his work!
Barry,
I agree that it's often better to point someone in the right direction rather
than just writing the query for them, but in this case
I agree that it's often better to point someone in the right direction
rather than just writing the query for them, but in this case it was a
newbie question.
And therefore it's most important that he tries to learn how to look at
the doc.
Remembering my own troubles learning MySQL, it can
Hi,
I have an application self-installer program which also installs MySQL and sets
it up. This is all on Windows.
I have a problem in that when the installer runs 'net start MySQL', it returns
immediately but the MySQL daemon is not ready for connections immediately.
As the next step in the
z247 schrieb:
Say I have the following tables;
siteID,name
--
site1, XYZ
site2, RSQ
ID,site,data
1, site1, M
2, site2, Q
3, site2, Y
4, site1, P
... etc.
And I want to create a view like this;
siteID,name,data
I have a table `event` with two keys:
`id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,
`location_id` MEDIUMINT(8) UNSIGNED NOT NULL,
`timestamp` DATETIME NOT NULL,
`type` ENUM('0','1','2','3','4','5','6','7','8','9') NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY (`location_id`,`timestamp`,`type`)
I'm still kind of new to this, so I'm looking for suggestions on how
to do this one. I need to recode this site that was designed using
the old WebCatalog program which we will be phasing out soon. Here's
the link to a page I need help
on: http://die-broke.com/books.tpl What's the
I think it's listed by the corresponding SKU numbers - 17 digits. Is
this what you're asking?
Err...no, I meant pretty much what Martijn said in his reply - the question is
very vague.
There are many ways of achieving...whatever it is you want to achieve.
If you need help with it you need to
If you are going to specify values for all columns in your insert, you should
put NULL as the value for an AUTO_INCREMENT column, e.g.
mysql insert into SalesSupData values (NULL,2,2,'test',140);
My preferred way however is to put the column names and just miss out the
auto_increment column:
Douglas,
If you are selling a product which requires your users download MySQL or
requires you distribute it with the product, you need a commercial licence.
$595?! Ouch indeed...it's much cheaper if you're not using InnoDB, although
obviously that's a pretty major trade-off.
--
Mark,
With the CHANGE clause of ALTER TABLE statement, you must provide the column
definition, so something like this is what you need:
ALTER TABLE actors CHANGE director_id actor_id MEDIUMINT UNSIGNED NOT NULL;
or whatever your original definition is.
AFAIK there is no way to rename a column
I need to upgrade a MyISAM DB, one of the tables has the structure:
CREATE TABLE old_event_data (
event_id MEDIUMINT UNSIGNED NOT NULL,
p1 UNSIGNED INT NOT NULL,
...
p30 UNSIGNED INT NOT NULL,
part UNSIGNED TINYINT(1) NOT NULL
);
This is 'event data', each event having 6 entries
Rob, to clarify, your new 'index' column will be based on the value of
the 'part' column and individual column names from the old table?
That is correct.
Perhaps something like this, where [colnum] is derived from column name
like p1? (part+1)*[colnum]
The actual formula I want to use is:
27 matches
Mail list logo