MySQL Forums
Forum List  »  Newbie

Re: Searching for shortcuts, can anyone help!!
Posted by: Felix Geerinckx
Date: July 06, 2005 05:15AM

Deon Starkey wrote:

> Is there any way of running this query and getting
> all the results back at once? Instead of my
> current method of running one line at a time.
>
> I'm using MySql 3x.
>
> select * from table_1
> where timestamp >= '2005-06-01 00:00:00' and
> timestamp <= '2005-06-30 23:59:59'
>
>
> and message_len between 1 and 160
> -- and message_len between 161 and 320
> -- and message_len between 321 and 480
> -- and message_len between 481 and 640
> -- and message_len between 641 and 800
> -- and message_len between 801 and 960
> -- and message_len between 961 and 1000
>
> order by timestamp desc


The simple answer is: if you want *all* records, just specify

message_len BETWEEN 1 AND 1000.

Please be more specific about what it is *exactly* that you want.

--
felix
Please use BBCode to format your messages in this forum.

Options: ReplyQuote


Subject
Written By
Posted
Re: Searching for shortcuts, can anyone help!!
July 06, 2005 05:15AM


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.