Results 1 to 2 of 2

Thread: Regular Expression and BETWEEN in same query

  1. #1
    Join Date
    Jul 2010
    Posts
    2

    Regular Expression and BETWEEN in same query

    Hello,
    Could anyone please tell me if there is a way to write RegularExpressions and Between in the same query?
    I have a table with a column orderNumber.
    The orderNumber has preceeding 0's and .'s something like
    "00000034500.1.2.1.1".
    There are two input textboxes according to whose values search queries should be fired.
    What I would like to do is:
    Lets say there are 3 orders with orderNumber "00000034500" ,"00000034600" and "00000034700".
    1) If 1 textbox is entered with value "345" and the other is blank I would like to search for the order "00000034500.1.2.1.1"
    I am pretty new to DB's, but I suppose I can use a regular expression (REGEX_LIKE) to search this order number(Please correct me if I am wrong).

    2) If both textboxes are entered with values "345" and "347"
    I would like it to search for all 3 orders.
    Is it possible to do this?
    Thanks in advance,
    Cheers

  2. #2
    Join Date
    Jul 2010
    Posts
    2
    Also, the length of the orderNumber is not fixed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •