Unix Technical Forum

Select Problem

This is a discussion on Select Problem within the MySQL forums, part of the Database Server Software category; --> Hi All, I have a column in my table with values like this: CBMON3.03122005 WESAT1.04262006 TRSAT3.01282006 .. .. .. ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 07:19 AM
amerar@iwc.net
 
Posts: n/a
Default Select Problem


Hi All,

I have a column in my table with values like this:

CBMON3.03122005
WESAT1.04262006
TRSAT3.01282006
..
..
..

I want to create a select statement that will allow me to retreive
records within a range of dates.

Basically the user will enter a date range from the form. I will take
that date, and try to do a range select against the right half of the
column:

select * from t1 where substring(c1,8) > '2006-01-05' AND
substring(c1,8) < '2006-01-31';

However, that returns the entire database.........

Any suggestions?

Thanks.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:29 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com