Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 966685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:11:57+00:00 2026-05-16T02:11:57+00:00

I’m looking for a better way of searching through numeric ranges in Oracle Text.

  • 0

I’m looking for a better way of searching through numeric ranges in Oracle Text. I have a DB app that does a lot of GIS-type things, but we now want to add street range searching to it.

So I’d like to store the min and max values in a column, and search for a number within those values. I’m happy to go explore options, but I’d like some pointers on where to head. Does anyone have any suggestions for me?

EDIT: we’re just trying to make address lookups easier. Text on the address parts has been a huge success, but we want to store street ranges instead of every individual house number.
So, if I searched for “11 high street”, I’d expect a match if high street had a range of 1 to 1000. I’d also like some options that I can use if I searched for “flat 1 11 high street” too though. I expect that I will have to do some jiggery with the input in these cases, I just want to know what kind of tools there are that I could try working with.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T02:11:57+00:00Added an answer on May 16, 2026 at 2:11 am

    My suggestion is to make standard length string field for storing building numbers, create index on this field and then use between for search.

    Something like this format:

    NNNNNNCCCCBBBB
    

    where:

    NNNNNN – left-padded house number;
    CCCC – left-padded character (like ‘A’ in ’11A’);
    BBBB – left-padded building number

    Under ‘left-padded’ I mean “filled with some symbol to standard length at left side”, see for example result of select lpad('11',5,'X') from dual; query.

    E.g. suppose, you have “11A high street building 5” address and choose ‘%’ as filling symbol. When converted to proposed format it looks like '%%%11%%%A%%%' and ‘high street’ stored at separated field(s).
    Next is query example for selecting all houses between 1 and 1000:

    with address_list as (
      select '%%%11%%%A%%%%' bnum from dual union all
      select '%1001%%%A%%%%' bnum from dual union all
      select '%%%%1%%%A%%%%' bnum from dual union all
      select '%%%%1%%%%%%%%' bnum from dual union all
      select '%%321%%%A%%%%' bnum from dual union all
      select '%1000%%%A%%%%' bnum from dual union all
      select '%1000%%QQ%%12' bnum from dual 
    )
    select * from address_list
    where 
      -- from '1 high street'
      bnum >= '%%%%1%%%%%%%%' 
      and                    
      -- less then '1001 high street'            
      bnum < '%1001%%%%%%%%' 
    order by 
      bnum
    

    In real case is better to use chr(1) or any other unprintable symbol as symbol for padding.

    Another thing is to build only function-based index for search without real field storage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I know there's a lot of other questions out there that deal with this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a reasonable size flat file database of text documents mostly saved in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.