Richard Broersma Jr wrote:
--- Ron St-Pierre <[EMAIL PROTECTED]> wrote:

I'm sure that others have solved this but I can't find anything with my
(google and archive) searches. I need to retrieve data where the text
field is within a certain range e.g.
A-An
Am-Bc
Bc-Eg
....

Regular expressions would work, but a between statement should work also.

SELECT *
  FROM Your_table AS YT
 WHERE YT.text_field BETWEEN 'Aa' AND 'An';

Ron, in case it's not clear, if an index on text_field exists, the planner can use it to make such queries run relatively fast.

- John D. Burger
  MITRE



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to