bruce wrote:
hi...
i have the following select...
SELECT itemID, process, status, tblType, MAX(date)
FROM historyTBL
WHERE (tblType = '3' or tblType = '2')
GROUP BY tblType;
it seems to work, in that it gives me the rows for the two types that i'm
grouping by.
the problem is that i want the row tha
Have you tried this:
select ..., max(date) as mdate from ... where ... group by ... order
by mdate desc ?
I haven't tested it, but it should order the results by max date
descending, giving you the greatest date first.
On Fri, 10 Sep 2004 18:16:00 -0700, bruce <[EMAIL PROTECTED]> wrote:
> hi...
hi...
i have the following select...
select
itemID,
process,
status,
tblType,
max(date)
from historyTBL
where (tblType = '3' or tblType = '2')
group by tblType;
it seems to work, in that it gives me the rows for the two types that i'm
grouping by.
the problem is that i want the row that conta
k'; [EMAIL PROTECTED]
Subject: Re: date question..
The manual describes 3 solutions to this problem
<http://dev.mysql.com/doc/mysql/en/example-Maximum-column-group-row.html>.
Michael
bruce wrote:
> the earlier suggestion didn't work, as it only returned a single value...
>
--+---
--+
i was thinking that a subselect might work, but couldn't get it to work...
thanks for any pointers/comments
regards,
-bruce
-Original Message-
From: gerald_clark [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 11:12 AM
To: [EMAIL PROTECTED]
Cc: [
s
regards,
-bruce
-Original Message-
From: gerald_clark [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 11:12 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: date question..
bruce wrote:
>i have a tbl with the following...
>
> foo date1
> foo2 date2
&
bruce wrote:
i have a tbl with the following...
foo date1
foo2 date2
etc...
how can i do a select to get the last or 1st row based on the
(latest/earliest) date?
SELECT * FROM tbl order by datecolumn DESC LIMIT 1;
SELECT * FROM tbl order by datecolumn ASC LIMIT 1;
can't seem to get it to work..
i have a tbl with the following...
foo date1
foo2 date2
etc...
how can i do a select to get the last or 1st row based on the
(latest/earliest) date?
can't seem to get it to work..
thanks
-bruce
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe
lt;[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 10, 2004 1:56 PM
Subject: Date Question 2
> Hi again,
>
> I got the MONTH() selection thing working now, but it seems like
I'm not
> getting the hang of the concept with the sql date..
>
> With PHP and
Hi again,
I got the MONTH() selection thing working now, but it seems like I'm not
getting the hang of the concept with the sql date..
With PHP and a UNIX timestamp I would just insert a timestamp, the
select it and after selection, go ahead and manipulate it to fit my
needs, like extracting day
In the last episode (Feb 24), Vivian Wang said:
> mysql,
> The question is:
>
> If I use unix date Command like: date -date=20030220 +%j
> I will get 051 which is Julian date.
>
> I like to know how I can get Julian date if I use mysql or Python.
Mysql's date_format function supports the same es
mysql,
The question is:
If I use unix date Command like: date -date=20030220 +%j
I will get 051 which is Julian date.
I like to know how I can get Julian date if I use mysql or Python.
Thanks.
-
Before posting, please check:
ht
Ed,
Wednesday, May 29, 2002, 2:24:40 AM, you wrote:
EL> I'm not sure how to phrase this. Please excuse the crudeness of my description.
EL> I'm storing calendar data in a MySQL database and I'm wondering, is there a
EL> way to specify a day, such as the 28th, and "fourth" "Tuesday" as search
E
I'm not sure how to phrase this. Please excuse the crudeness of my description.
I'm storing calendar data in a MySQL database and I'm wondering, is there a
way to specify a day, such as the 28th, and "fourth" "Tuesday" as search
criteria when selecting rows from a table with a field of type dat
for mysql, if I have a text file that has the date as 5/17/2002, is there a way I can
translate that to mysql's version of the date, i.e. 2002-05-17?
With Load Data as well?
Thanks,
Taylor
Taylor Lewick
Unix System Administrator
Fortis Benefits
816 881 6073
"Help Wanted. Seeking Telepath..."
Hi,
1. date_format(datecolumn,'%b');
2. date_format(datecolumn,'%d)+0; or
if you want a string result
trim(leading '0' from date_format(datecolumn,'%d));
The manual has very clear description of date functions.
Anvar.
At 01:47 AM 05/04/2002 +, you wrote:
>hi,
>
>I have some more
hi,
I have some more problem with date query.
1.how to return month from numeric to aalpabet.04->Apr.
2.how to return day or month without 0 in front.
i mean if day is 01->1,same also month if 02-2.
Is it possible.please help me.
Thanks in advance.
At 18:49 +0100 2/8/02, Jim Hatridge wrote:
>Hi all...
>
>This is my first post to the list. I've been working on MySQL now for about a
>week and really like it. I have a question that I can't find in any of the
>books or how-tos.
>
>When I add a line to my customer's table I need it to put today's
See the manual reference to the 'timestamp' type.
-Original Message-
From: Jim Hatridge [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 5:50 PM
To: [EMAIL PROTECTED]
Subject: Hello! Date question
Hi all...
This is my first post to the list. I've been w
Hi Jim,
Welcome to our relatively?relationally happy band.
> This is my first post to the list. I've been working on MySQL now for about a
> week and really like it. I have a question that I can't find in any of the
> books or how-tos.
A whole week and no post...
> When I add a line to my custo
inal Message-
> From: Jim Hatridge [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 08, 2002 9:50 AM
> To: [EMAIL PROTECTED]
> Subject: Hello! Date question
>=20
> Hi all...
>=20
> This is my first post to the list. I've been working on MySQL=20
> now for abo
Hi all...
This is my first post to the list. I've been working on MySQL now for about a
week and really like it. I have a question that I can't find in any of the
books or how-tos.
When I add a line to my customer's table I need it to put today's date in the
"indate" column. Is there anyway
On Friday 08 February 2002 19:28, Eric Mayers wrote:
> Jim,
>
> What you're asking about is the "timestamp" data type.
>
> Look at : http://www.mysql.com/doc/D/A/DATETIME.html
>
> In a nutshell, if you assign 'null' to a timestamp column it will put in
> value of 'NOW()'.
>
> Eric Mayers
> Softwar
Hi Jim,
Welcome to our relatively?relationally happy band.
> This is my first post to the list. I've been working on MySQL now for about a
> week and really like it. I have a question that I can't find in any of the
> books or how-tos.
A whole week and no post...
> When I add a line to my custo
inal Message-
> From: Jim Hatridge [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 08, 2002 9:50 AM
> To: [EMAIL PROTECTED]
> Subject: Hello! Date question
>
> Hi all...
>
> This is my first post to the list. I've been working on MySQL
> now for about a
&g
At 18:49 +0100 2/8/02, Jim Hatridge wrote:
>Hi all...
>
>This is my first post to the list. I've been working on MySQL now for about a
>week and really like it. I have a question that I can't find in any of the
>books or how-tos.
>
>When I add a line to my customer's table I need it to put today's
Hi all...
This is my first post to the list. I've been working on MySQL now for about a
week and really like it. I have a question that I can't find in any of the
books or how-tos.
When I add a line to my customer's table I need it to put today's date in the
"indate" column. Is there anyway
27 matches
Mail list logo