MySQL Forums
Forum List  »  Stored Procedures

Re: DATETIME help
Posted by: Andrew Gilfrin
Date: April 14, 2005 02:21AM

Shawn,

May be worth asking this in another area of the forum as it's not really related to Stored Procedures.

Anyway, I don't have a MySQL DB handy so I can't test and I don't know the exact syntax but something like the following should do the trick.

select time(last_mod_tmstmp) as mod_time, count(*)
from pim_pim2ssb_trans
group by proc_status, mod_time

I think the problem with your version is that your grouping by the actual column rather than the converted one. Not sure of the exact syntax in MySQL so if the above doesn't work try


select time(last_mod_tmstmp), count(*)
from pim_pim2ssb_trans
group by proc_status, time(last_mod_tmstmp)

Andrew Gilfrin
------------------
http://gilfster.blogspot.com
My MySQL related Blog

http://www.mysqldevelopment.com
MySQL Stored Procedure,Trigger, View.... (Just about most things these days) Information

Options: ReplyQuote


Subject
Views
Written By
Posted
3193
April 13, 2005 04:25PM
Re: DATETIME help
2203
April 14, 2005 02:21AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.