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: SQL command

Re: SQL command

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Thu, 30 Aug 2001 10:55:14 +0100
Message-ID: <3b8e0d84$0$227$ed9e5944@reading.news.pipex.net>


"Ksous Mekki" <ksousm_at_draexlmaier.de> wrote in message news:3b5251eb.0108300019.7b7dcb54_at_posting.google.com...
> What is the SQL command or the solution, to find stations that their
> tcp_ips are between (193.50.130.25 and 193.50.130.100).
> NB: column tcp_ip is type VARCHAR2(15)

THe followings should give you the idea. I have no comment on the efficiency of this code

SQL> select * from tab;

IP_COL


193.50.30.21
193.50.30.26
193.50.30.50
193.254.30.50
193.50.30.50
193.50.30.254

6 rows selected.

SQL> select ip_col from tab
  2 where substr(ip_col,1,9) = '193.50.30'   3 and to_number(substr(ip_col,11,3)) between 25 and 75;

IP_COL


193.50.30.26
193.50.30.50
193.50.30.50

SQL>

--
Niall Litchfield
Oracle DBA
Audit Commission UK
Received on Thu Aug 30 2001 - 04:55:14 CDT

Original text of this message

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