Home » SQL & PL/SQL » SQL & PL/SQL » need query from multiple table and adjustcent column
need query from multiple table and adjustcent column [message #226554] Sun, 25 March 2007 00:30 Go to next message
muzahid
Messages: 281
Registered: September 2004
Location: Dhaka, Bangladesh
Senior Member
I need the following result. Please help me

I have 3 tables: tab_country, tab_export, tab_product

Tab_country

Code Name
1 A
2 B

Tab_export

Coun_Code ITEM
1 P
1 Q
2 R
2 S
2 T


Tab_Product

Coun_Code product
1 AA
1 AB
1 AC
2 BA
2 BB

I need output like that
code Name ITEM Product
1 A P AA
1 A Q AB
1 A AC
2 B R BA
2 B S BB
2 B T
Re: need query from multiple table and adjustcent column [message #226562 is a reply to message #226554] Sun, 25 March 2007 02:32 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

You have to tell us why there is "1 A P AA" and not "1 A Q AA", for instance.

Re: need query from multiple table and adjustcent column [message #226765 is a reply to message #226554] Mon, 26 March 2007 08:34 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
muzahidul islam wrote on Sun, 25 March 2007 01:30
I need the following result. Please help me


I need output like that
code Name ITEM Product
1 A P AA
1 A Q AB
1 A AC
2 B R BA
2 B S BB
2 B T



I'd also like to know how you can get output to "look" like that, where they data doesn't line up with the column headings.

Moved to newbies.
Re: need query from multiple table and adjustcent column [message #226787 is a reply to message #226554] Mon, 26 March 2007 09:25 Go to previous message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
Please show us what you have already tried for your homework. We will help you, but will not do your school work for you.
Previous Topic: BLOB column
Next Topic: FATAL ERROR : Inconsistent Database ( urgent)
Goto Forum:
  


Current Time: Sat Dec 07 02:03:32 CST 2024