Home » SQL & PL/SQL » SQL & PL/SQL » complex query (oracle)
complex query [message #657807] Wed, 23 November 2016 06:23 Go to next message
bikashp
Messages: 1
Registered: November 2016
Junior Member
I have a tables
SN Begin_Num End_Num code
1 10 25 A
2 26 36 B
3 37 38 C
4 39 200 A
upto
3 million records

Now I have to find Code from anther table with the list of number

SN FindNumber Code ?
1 22
2 29
3 30
........


Please help. :(





Re: complex query [message #657809 is a reply to message #657807] Wed, 23 November 2016 06:35 Go to previous message
Michel Cadot
Messages: 65849
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Welcome to the forum.
Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.

Align the columns in result.
Also always post your Oracle version, with 4 decimals, as solution depends on it.

With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.


It is not complex just join using BETWEEN condition.

Previous Topic: electronic data sharding
Next Topic: SQL Query Update
Goto Forum:
  


Current Time: Sun Oct 21 22:51:48 CDT 2018