Sir, 99% of the time, if someone can't create a TEMPORARY table, it
means that they're using an earlier version of MySQL that doesn't
support temp tables. The best thing to do is to update to the most
recent version. If you can't update (e.g. if MySQL is being
maintained by a web hosting
ob Hall" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, February 14, 2001 4:46 PM
Subject: Re: Can anyone do this ?
Hi Bob/ All,
I cannot get the creation of the TEMPORARY Table to
work:
The select statement works fine:
mysql SELECT table1_id, Count(d
Hi Bob/ All,
I cannot get the creation of the TEMPORARY Table to
work:
The select statement works fine:
mysql SELECT table1_id, Count(date) as c FROM Table2,
Table1
- WHERE Table2.date BETWEEN "2001-02-02" AND
"2001-02-06"
- AND Table2.table1_id=Table1.id
- GROUP BY Table1.id HAVING
Web Depressed wrote:
Hi Bob,
Many thanks for that. I was hoping (through absolute
naiveity) not to have to go and calculate the number
of days with the specified range. Unless, of course
I could have mysql do this for me.
Question: why are you using reserved words for your column names?
Sir, in the first SQL statement, you could use
HAVING cnt = (DAYOFYEAR(min)-DAYOFYEAR(max)) + 1
Of course, this won't work if min is in the year 2000 and max is in
2001. I think this will actually be easier to work out in your
client, assuming you have a programmable client.
Hi Bob,
Many
explain what difference between dates
2001-02-04 and 2001-02-06 for
item2 and 2001-02-04 and 2001-02-06 for item1?
- Original Message -
From: Web Depressed [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 04, 2001 11:41 PM
Subject: Can anyone do this ?
Hi,
I've
Hi Bob,
Many thanks for that. I was hoping (through absolute
naiveity) not to have to go and calculate the number
of days with the specified range. Unless, of course
I could have mysql do this for me.
Can anyone tell me how I could generate such a list.
(ie something like:
SELECT BETWEEN
6")-DAYOFYEAR("2001-02-04")) GROUP BY t1.id;
- Original Message -
From: Web Depressed [EMAIL PROTECTED]
To: Rus [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, February 05, 2001 12:39 PM
Subject: Re: Can anyone do this ?
Hi Rus,
I'm not sure I follow, but the DATE colu
Ooops, I forgot to notice that you required consequetive days.
This query works for me:
select T1.*, T2.*, count(T2.id) as c, concat(T2.id,T2.d) as x from table1
as T1, table2 as T2, table 2 as T3 where T1.id=T2.id and T2.id=T3.id and
T2.d='2001-02-04' and T2.d='2001-02-06' and
Hi,
I've been trying for a while now and I can't figure
out how to do the following:
In regular English, I wish to show all items for which
I have allocations greater than one for all days
encapsulated between the user input range.
User Input:
---
Date_from (ie. 2001-02-04)
Try: select t1.*, t2* from table1 as t1, table2 as t2 where
t2.date='2001-02-04' and t2.date='2001-02-06' and t1.id=t2.id and
t2.no_of_items=1
Here is where I'm at:
mysql SELECT t1.*, t2.*
- FROM Table1 t1, Table2 t2
- WHERE t2.date BETWEEN "2001-02-04" AND
"2001-02-06"
- AND
Can you explain what difference between dates 2001-02-04 and 2001-02-06 for
item2 and 2001-02-04 and 2001-02-06 for item1?
- Original Message -
From: Web Depressed [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 04, 2001 11:41 PM
Subject: Can anyone do this ?
Hi
Hi,
I've been trying for a while now and I can't figure
out how to do the following:
In regular English, I wish to show all items for which
I have allocations greater than one for all days
encapsulated between the user input range.
User Input:
---
Date_from (ie. 2001-02-04)
Date_to
13 matches
Mail list logo