Home » SQL & PL/SQL » SQL & PL/SQL » how can i select range of numbers between two numbers
how can i select range of numbers between two numbers [message #378959] Sat, 03 January 2009 03:23 Go to next message
balajiags
Messages: 10
Registered: July 2007
Junior Member
MY table is like

TABLE M_CUG_GROUP
--------------
CUG_CODE CHAR(4),
CUG_GROUP_DESC VARCHAR2(20),
NO_OF_DELS NUMBER(4),
FROM_TEL_NO NUMBER(8),
TO_TEL_NO NUMBER(8),
CRTN_BY VARCHAR2(14) NOT NULL,
CRTN_DT DATE NOT NULL,
MDFD_BY VARCHAR2(14),
MDFD_DT DATE
)

----------------
i want to select all numbers between from_tel_no( 22727500) to_tel_no (22727515) where cug_code=&cug_code

answer should be like this

telephone numbers
---------------
22727500
22727501
22727502
.
.
.
.
.
.
22727515

[EDITED by LF: disabled smilies in this message]

[Updated on: Sat, 03 January 2009 03:56] by Moderator

Report message to a moderator

Re: how can i select range of numbers between two numbers [message #378961 is a reply to message #378959] Sat, 03 January 2009 03:47 Go to previous message
Michel Cadot
Messages: 64117
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It is a standard row generator.
Search for this.

Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel

[Updated on: Sat, 03 January 2009 03:48]

Report message to a moderator

Previous Topic: Quit the stored procedure
Next Topic: Need a query...!!!!
Goto Forum:
  


Current Time: Tue Dec 06 04:18:58 CST 2016

Total time taken to generate the page: 0.16988 seconds