Re: Strange query.

2007-01-11 Thread Paul Halliday
Could you expand a little on how that works? I am starting to think that I wont be able to get the results I need without post processing. Looking at the results: ... | 2007-01-09 20:02:15 | | 2007-01-09 20:02:15 | | 2007-01-09 20:03:20 | | 2007-01-09 20:08:33 | | 2007-01-09 20:08:33 | |

Re: Strange query.

2007-01-11 Thread Felix Geerinckx
[EMAIL PROTECTED] (Paul Halliday) wrote in news:[EMAIL PROTECTED]: Could you expand a little on how that works? USE test; DROP TABLE IF EXISTS event; CREATE TABLE event (timestamp DATETIME NOT NULL); INSERT INTO event (timestamp) VALUES ('2007-01-09 20:02:15'), ('2007-01-09 20:02:15'),

Strange query.

2007-01-10 Thread Paul Halliday
Hi, I am trying to deal with empty values so that I can graph data over a 24 hour period without gaps. I created a table called HOURS which simply has 0-23 and I am trying to do a join on this to produce the desired results. I think that the DATE_FORMAT in the query is screwing things up. The

Re: Strange query.

2007-01-10 Thread Brent Baisley
Sent: Wednesday, January 10, 2007 8:39 AM Subject: Strange query. Hi, I am trying to deal with empty values so that I can graph data over a 24 hour period without gaps. I created a table called HOURS which simply has 0-23 and I am trying to do a join on this to produce the desired results. I think

Re: Strange query.

2007-01-10 Thread Paul Halliday
GROUP BY hour - Original Message - From: Paul Halliday [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Wednesday, January 10, 2007 8:39 AM Subject: Strange query. Hi, I am trying to deal with empty values so that I can graph data over a 24 hour period without gaps. I created a table

Re: Strange query.

2007-01-10 Thread Dan Buettner
Subject: Strange query. Hi, I am trying to deal with empty values so that I can graph data over a 24 hour period without gaps. I created a table called HOURS which simply has 0-23 and I am trying to do a join on this to produce the desired results. I think that the DATE_FORMAT

Re: Strange query.

2007-01-10 Thread Dan Buettner
Ugh. My perl isn't quite right there. Here's a bit better (e.g. working) example: If you create the table, then put this in populate_hours.pl: BEGIN #!/usr/bin/perl $counter = 0; while ($counter 100) { print INSERT INTO all_hours (date_hour) VALUES ( DATE_ADD('2000-01-01 00:00:00',

Re: Strange query.

2007-01-10 Thread ddevaudreuil
group by HOURS.hour Donna Paul Halliday [EMAIL PROTECTED] 01/10/2007 09:48 AM To Brent Baisley [EMAIL PROTECTED] cc mysql@lists.mysql.com Subject Re: Strange query. That query doesn't return empty values. Just to clarify what I want as the result: My initial query was this, mysql

Re: Strange query.

2007-01-10 Thread ddevaudreuil
: Strange query. e.c1? Giving me errors.. On 1/10/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Try something like this: SELECT SUM(CASE when e.c1 is null then 0 else 1 end) as counts, HOURS.hour FROM HOUR LEFT OUTER JOIN (SELET sid, date_format(timestamp, '%H')as hr FROM event

Re: Strange query.

2007-01-10 Thread Felix Geerinckx
[EMAIL PROTECTED] (Paul Halliday) wrote in news:[EMAIL PROTECTED]: I am trying to deal with empty values so that I can graph data over a 24 hour period without gaps. Have a look here: http://forums.mysql.com/read.php?10,133603,133607#msg-133607 -- felix -- MySQL General Mailing List For

Can someone explain???? strange query!!

2005-04-29 Thread nngau
I did two query, can someone explain what happened? First query: mysql select * from customer_billing where first_name=shad; +--+---++-+---+---+- -+---+--+--+--+-

RE: Can someone explain???? strange query!!

2005-04-29 Thread Jay Blanchard
[snip] I did two query, can someone explain what happened? First query: mysql select * from customer_billing where first_name=shad; mysql select first_name, customer_num from customer_billing where first_name=shad; Now these query is the same except for the '*'? [/snip]

Re: Can someone explain???? strange query!!

2005-04-29 Thread Rich Lafferty
On Fri, Apr 29, 2005 at 10:46:16AM -0500, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I did two query, can someone explain what happened? Not with what you included: | customer_num | title | first_name | middle_name | last_name | email | dayphone | evenphone | address1 |

RE: Can someone explain???? strange query!! THANKS!!

2005-04-29 Thread nngau
Ahh okay the column was cut off or something \G shows it! Thanks!! -Original Message- From: Rich Lafferty [mailto:[EMAIL PROTECTED] Sent: Friday, April 29, 2005 10:28 AM To: mysql@lists.mysql.com Subject: Re: Can someone explain strange query!! On Fri, Apr 29, 2005 at 10:46:16AM

Strange query performance problem

2004-10-14 Thread Leszek Gawron
Mysql 4.1.3 Windows XP SP1 All tables are InnoDB The query (1): select Product.id, LongAnswer.value, count(*) from LongAnswer inner join Answer on LongAnswer.answer=Answer.id inner join QuestionDefinition on Answer.question=QuestionDefinition.id inner join Survey on Answer.survey = Survey.id inner

strange query result

2004-06-18 Thread Alex
Hi, ppl! I have a MySQL-server on FreeBSD-5.2.1 computer and a client on another computer under windows xp. I have the following simple query SELECT internal_number,page_no FROM pages WHERE docs=307 ORDER BY page_no that results in 587 lines with two integers only. Simple query with low

RE: strange query result

2004-06-18 Thread Victor Pendleton
Message- From: Alex To: [EMAIL PROTECTED] Sent: 6/18/04 5:07 AM Subject: strange query result Hi, ppl! I have a MySQL-server on FreeBSD-5.2.1 computer and a client on another computer under windows xp. I have the following simple query SELECT internal_number,page_no FROM pages WHERE docs=307

Strange query behavior

2004-02-13 Thread Linus Nikander
Whilst trying to figure out why one of my queries wasn't working I ran into the following phenomenon which I'd be grateful if someone could explain. (I'm running mySQL 4.0.17 on a win2003 server, querying using the 0.9.4 mysql control center) The following query returns the expected result

Re: Strange query behavior

2004-02-13 Thread gerald_clark
Linus Nikander wrote: Whilst trying to figure out why one of my queries wasn't working I ran into the following phenomenon which I'd be grateful if someone could explain. (I'm running mySQL 4.0.17 on a win2003 server, querying using the 0.9.4 mysql control center) The following query returns

Strange Query

2003-03-26 Thread GERST, MICHAEL (SBCSI)
Don't know if this has already come through to everyone, if so I apologize. Ok, here's the deal Table1 is a master list holding ID numbers, and related information sent by clients Table2 is a queue that utilizes Table1.ID numbers, and updates other information on the current state of a job

Strange Query Results

2002-08-14 Thread Sean C. Burbidge
I am encountering some strange behavior with the results returned from a query on a table in MySQL. The query is: select t.lu_cn as cn, sum(if(strcmp(t.work_item_type, 'OPERATIONS'), t.reference_dollars_labor + t.reference_dollars_equip +

Re: Strange Query Results

2002-08-14 Thread Keith C. Ivey
On 14 Aug 2002, at 13:31, Sean C. Burbidge wrote: The query is: select t.lu_cn as cn, sum(if(strcmp(t.work_item_type, 'OPERATIONS'), t.reference_dollars_labor + t.reference_dollars_equip + t.reference_dollars_travel + t.reference_dollars_matl +

Strange query issues

2002-03-25 Thread Gabriel
Hello all. For my first post to the list, I have a very strange problem. (And yes, I have perused the archives. I haven't found anything similar.) Here's the situation: I've got 6 machines that that make requests to a 7th machine, which is running mysql-3.23.47. All the machines are

RE: Strange query issues

2002-03-25 Thread Salada, Duncan
:07 PM To: [EMAIL PROTECTED] Subject: Strange query issues Hello all. For my first post to the list, I have a very strange problem. (And yes, I have perused the archives. I haven't found anything similar.) Here's the situation: I've got 6 machines that that make requests

Re: very strange query behavior

2001-09-25 Thread Gerald Clark
select count(*) from members where country_id = 1 and read_array is NULL ; Daren Cotter wrote: can anybody explain this to me? mysql select count(*) from members where country_id = 1 and read_array not like '%20270%'; +--+ | count(*) | +--+ |34884 | +--+

very strange query behavior

2001-09-24 Thread Daren Cotter
can anybody explain this to me? mysql select count(*) from members where country_id = 1 and read_array not like '%20270%'; +--+ | count(*) | +--+ |34884 | +--+ mysql select count(*) from members where country_id = 1 and read_array like '%20270%'; +--+ |

RE: very strange query behavior

2001-09-24 Thread Bill Blowitz
I would have to guess that you have a broken index. bill -Original Message- From: Daren Cotter [mailto:[EMAIL PROTECTED]] Sent: Monday, September 24, 2001 3:50 PM To: [EMAIL PROTECTED] Subject: very strange query behavior can anybody explain this to me? mysql select count(*) from