I want to create a SELECT statement using BETWEEN like:
SELECT * FROM mytable WHERE myfield BETWEEN value_1 AND value_2.  The field 
I'm applying my BETWEEN clause is a varchar.

Now, if value_1 and value_2 are numbers the select statement works as is. If 
value_1 and value_2 are characters I need to enclose them with apostrophes 
like: SELECT * FROM mytable WHERE myfield BETWEEN 'value_1' AND 'value_2'.

If the appropriate format (enclosing or not enclosing with apostrophes) is 
not followed the query fails.

Is there a way to generalize my SELECT statement so value_1 and value_2 can 
be numbers or characters?

Thanks
cw 



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to