Fw: Query Help plss

2006-10-09 Thread Renish
- Original Message - From: Renish To: Visolve DB Team ; mysql@lists.mysql.com Sent: Tuesday, October 10, 2006 12:35 PM Subject: Fw: Query Help plss - Original Message - From: Renish To: mysql@lists.mysql.com ; Visolve DB Team Sent: Tuesday, October 10, 2006 12:34 PM

Fw: query help

2005-10-18 Thread grKumaran
- Original Message - From: grKumaran [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, October 18, 2005 16:08 Subject: query help : Hello, : : CREATE TABLE t ( : dt datetime : ) : : Please assume this is the table structure and contains thousands of records. : And I want to list

Re: Fw: query help

2005-10-18 Thread SGreen
[EMAIL PROTECTED] wrote on 10/18/2005 12:01:50 PM: - Original Message - From: grKumaran [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, October 18, 2005 16:08 Subject: query help : Hello, : : CREATE TABLE t ( : dt datetime : ) : : Please assume this is the table

Re: Fw: query help

2005-10-18 Thread Dobromir Velev
Hi, The following query will probably work but I think it will be easier to pass the minimum date from your application. SELECT * FROM t WHERE (year(dt)=year(Now()) and dtNow()) or (year(dt)=year(Now())-1 and month(dt)month(Now())) Also you might want to check the other Date and Time functions

Re: Fw: query help

2005-10-18 Thread grKumaran
: : Hello, : : : : CREATE TABLE t ( : : dt datetime : : ) : : : : Please assume this is the table structure and contains thousands of : records. : : And I want to list them only last 12 months (that mean last 1 year) : records : : exactly. : : : : For that I tried using the following

Re: Fw: query help

2005-10-18 Thread Michael Stassen
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote on 10/18/2005 12:01:50 PM: - Original Message - From: grKumaran [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Tuesday, October 18, 2005 16:08 Subject: query help : Hello, : : CREATE TABLE t ( : dt datetime : ) : : Please assume

Re: Fw: query help

2005-10-18 Thread Michael Stassen
Dobromir Velev wrote: Hi, The following query will probably work but I think it will be easier to pass the minimum date from your application. SELECT * FROM t WHERE (year(dt)=year(Now()) and dtNow()) or (year(dt)=year(Now())-1 and month(dt)month(Now())) Also you might want to check the

Re: Fw: query help

2005-10-18 Thread Michael Stassen
grKumaran wrote: Hello Folks, It is great help. Thank you all and specially for Michael and Shawn. It does work properly in 4.1.9-max. But I think, LAST_DAY function does not availble in old MySQL version 4.0.??, so there I have problem, actually our webserver is still in that version. So