Obiajulu,

Please refer to previous response and the as yet unanswered question within.

>   I have  the following values in my db table:
> Id.  ....  regdate
> 00        1040-1467
> 01        1910-2002
> 02        1700-1789
> 03        1550-2002
> 04        1600-1700
> 05        1900-2000
> .......
> How can I use  mysql RegEx to the query parameter: 1445-1600: That is to
> extract those values that fall between 1445 to 1600:
>
> This example result will be
> Id.  ....  regdate
> 00        1040-1467
> 03        1550-2002
> 04        1600-1700


Because there is no longer reference to "tallet", life is considerably
easier.
There is no need to use RegEx.
Use LEFT() and RIGHT() to extract the range-dates from regdate
The selection condition then becomes an OR:

...
WHERE
  LEFT( regdate, 4 ) IS BETWEEN LowQueryDate and HighQueryDate
OR
  RIGHT( regdate, 4 ) IS BETWEEN LowQueryDate and HighQueryDate
...

Again: the design of the data structure seems to be causing fundamental
problems, so perhaps that's where the 'real issue' lies!?

=dn



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to