sunnylion810
Technical User
I am working with a table that contains 4 fields: NPA(Area code), NXX(phone # exchange), Low Range and High Range (last 4 digits of the phone number. The table is designed with range fields due to the fact that in the telecommunications field most of the numbers that we provide to customers are DIDs in sequential ranges. But, occassionally we need to verify which customer a number belongs to. How do I write a query, preferably via SQL statements that will allow me to query who this number: 323-795-1407, for example belongs to without manually scrolling through the table to find the range? I'd like a validation statement to generate that, "323-795-1407 is currently assigned to XCustomer within the range of X (beginning and end of range)".