Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Select between range, not in...

Select between range, not in...

From: Pret Orian <pretorianboy_at_yahoo.com>
Date: 12 Dec 2003 09:48:44 -0800
Message-ID: <9849ae9d.0312120948.36f1c223@posting.google.com>


Hi there!
I have a table with used IP Adresses, and I have a table with subnetworks (with IP range: start/end).
I need to make a select statement which would return the first free IP in range.
The catch is I'd need to find a solution that would use basic SQL query as I have no permission to write SPs or functions.

So this would be the table structures:

Subnet:
sune_id, ipstart, ipend, ...

IPs:
..., sune_id, ipadress

note, ipstart, ipend and ipadress are plain integers (i.e. 4-Byte adresses downcalculated to integers, so you can refer to them acordingly).

TIA
PB Received on Fri Dec 12 2003 - 11:48:44 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US