Home » SQL & PL/SQL » SQL & PL/SQL » plsql statment with this output
plsql statment with this output [message #614143] Sat, 17 May 2014 07:44 Go to next message
hahaie
Messages: 194
Registered: May 2014
Senior Member
hello
in picture attachment i want with plsql statment table 2
tanks please help me
i Apologies i dont know english
  • Attachment: out.JPG
    (Size: 18.09KB, Downloaded 583 times)
Re: plsql statment with this output [message #614144 is a reply to message #614143] Sat, 17 May 2014 07:56 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

How do you pass from China to Asia?
Or if you prefer what is the result for Cyprus, Micronesia, Saint Pierre and Miquelon, Saint Paul and Amsterdam Islands, Wallis and Futuna, and French Southern Territories?

Re: plsql statment with this output [message #614145 is a reply to message #614143] Sat, 17 May 2014 08:18 Go to previous messageGo to next message
Solomon Yakobson
Messages: 3273
Registered: January 2010
Location: Connecticut, USA
Senior Member
It is not clear what you need. Maybe:

select  country_id,
        country_name,
        mainland
  from  table_1,
        table_2
  where country_id between country_id_from and country_id_to
/

COUNTRY_ID COUNTRY MAINLA
---------- ------- ------
         1 China   Asia
         2 India   Asia
         3 Iran    Asia
         5 Italy   Europe
         6 England Europe

SQL>


SY.
Re: plsql statment with this output [message #614146 is a reply to message #614145] Sat, 17 May 2014 08:33 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/ and please read http://www.orafaq.com/forum/t/174502/102589/
Re: plsql statment with this output [message #614148 is a reply to message #614146] Sat, 17 May 2014 09:13 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I think that TABLE 1 is input, while TABLE 2 is desired output.

If that's so, another column - MAINLAND_ID - is missing in TABLE 1; it would say which country belongs to which mainland. Another table would be fine to normalize it somewhat more (it would contain mainland IDs and names, with ID being a parent for TABLE 1 mainland ID's values, i.e. we'd enforce referential constraint).
Re: plsql statment with this output [message #614156 is a reply to message #614145] Sat, 17 May 2014 23:05 Go to previous messageGo to next message
hahaie
Messages: 194
Registered: May 2014
Senior Member
solomon,this output not table 2
this is wrong,
this attachment is better,Please look
table 2 is output
  • Attachment: out.JPG
    (Size: 25.31KB, Downloaded 558 times)

[Updated on: Sat, 17 May 2014 23:13]

Report message to a moderator

Re: plsql statment with this output [message #614159 is a reply to message #614156] Sun, 18 May 2014 00:27 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

If you post a working Test case: create table and insert statements along with the result you want with these data then we will work with your table and data.

Before, please read How to use [code] tags and make your code easier to read.
Also always post your Oracle version, with 4 decimals.



Re: plsql statment with this output [message #614162 is a reply to message #614159] Sun, 18 May 2014 00:42 Go to previous messageGo to next message
hahaie
Messages: 194
Registered: May 2014
Senior Member
Dear Friend if i have code No questions asked and no help of you
Re: plsql statment with this output [message #614164 is a reply to message #614162] Sun, 18 May 2014 00:52 Go to previous message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You can always write CREATE TABLE and INSERT statements, the thing you need is what you use to post here.
Help us to help you.

Previous Topic: How to view if a table indexs are clustered or non clustered?
Next Topic: Whenever runs server side its run fine but,client side gives error ora- 22288.
Goto Forum:
  


Current Time: Fri Apr 26 16:50:51 CDT 2024