Path: newssvr20.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!prodigy.com!in.100proofnews.com!in.100proofnews.com!news-out.visi.com!petbe.visi.com!news.state.mn.us!not-for-mail
From: Turkbear <john.g@dot.spamfree.com>
Newsgroups: comp.databases.oracle.server
Subject: Re: Select between range, not in...
Date: Fri, 12 Dec 2003 11:59:59 -0600
Organization: Minnesota Governmental/Educational Agencies
Lines: 26
Message-ID: <ef0ktv0g0jmnn5he0ft8fdq4p8eqr37rn2@4ax.com>
References: <9849ae9d.0312120948.36f1c223@posting.google.com>
Reply-To: johng@mm.nospam.com
NNTP-Posting-Host: gateway.dot.state.mn.us
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.state.mn.us 1071251999 9959 156.98.4.11 (12 Dec 2003 17:59:59 GMT)
X-Complaints-To: news@news.state.mn.us
NNTP-Posting-Date: Fri, 12 Dec 2003 17:59:59 +0000 (UTC)
X-Newsreader: Forte Agent 1.93/32.576 English (American)
Xref: newssvr20.news.prodigy.com comp.databases.oracle.server:249999

pretorianboy@yahoo.com (Pret Orian) wrote:

>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
What determines if an address is free...

