Home » SQL & PL/SQL » SQL & PL/SQL » is there anything like a range function in 8.1.7 or something equivalent
is there anything like a range function in 8.1.7 or something equivalent [message #40281] Mon, 23 September 2002 00:53 Go to next message
ksr
Messages: 112
Registered: January 2002
Senior Member
Hi,

I have a small python code where i have a range function ...

python code..
................

emprange = range(100,150) ..means emp from 100 till 150
deptrange = range(10,50) .. means dept from 10 till 50
sNo = '1234565745667' ..some nos like this...
if int(sN0[[-9:-7]] ) in emprange ...then do something
if int(sNo[[-10:-9]] ) in deptrange ...then do something

How can i achieve the same using the plsql code..

Any ideas...
Re: is there anything like a range function in 8.1.7 or something equivalent [message #40283 is a reply to message #40281] Mon, 23 September 2002 06:05 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
u can try BETWEEN
SQL> ed
Wrote file afiedt.buf

  1* select ename,sal from emp where (sal between 1000 and 3000)
SQL> /

ENAME             SAL
---------- ----------
ALLEN            1600
WARD             1250
JONES            2975
MARTIN           1250
BLAKE            2850
CLARK            2450
SCOTT            3000
TURNER           1500
ADAMS            1100
FORD             3000
MILLER           1300

Re: is there anything like a range function in 8.1.7 or something equivalent [message #41162 is a reply to message #40281] Tue, 03 December 2002 07:58 Go to previous message
Terence Smith
Messages: 1
Registered: December 2002
Junior Member
at$tcreditcard
Previous Topic: Unable to read ma file !!!...
Next Topic: oracle financial question
Goto Forum:
  


Current Time: Tue May 14 21:01:17 CDT 2024