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 -> Re: Select between range, not in...

Re: Select between range, not in...

From: Brian Peasland <dba_at_remove_spam.peasland.com>
Date: Mon, 15 Dec 2003 15:16:24 GMT
Message-ID: <3FDDD048.E9B18C4C@remove_spam.peasland.com>


Just because you do not have the ability to create a stored procedure or function does not mean that you can't use PL/SQL. You can still write an anonymous PL/SQL block and run it.

HTH,
Brian

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

-- 
===================================================================

Brian Peasland
dba_at_remove_spam.peasland.com

Remove the "remove_spam." from the email address to email me.


"I can give it to you cheap, quick, and good. Now pick two out of
 the three"
Received on Mon Dec 15 2003 - 09:16:24 CST

Original text of this message

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