Click here to Skip to main content
15,908,901 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi , i want to get result set as given below
SQL
Level_Inspection  Root_Visual  Final_Dpt    Type_Joint  Root_Visual  Final_Dpt  Type_Joint
Level - 02           100          10        Butt Weld    100          10       Nozzlewe        
Level - 05           100          10        Butt Weld    100          10       Nozzle Weld
Level - 03           100          20        Butt Weld    100          20       Nozzle Weld
Level - 1B           10           10        Butt Weld    10           10       Nozzle Weld
Level - 04           200          30        Butt Weld    200          30       Nozzle Weld


select L.Level_Inspection,N.Root_Visual,N.Final_Visual,T.Type_Joint
from Mst_NDT N,Mst_TypeJoint T,Mst_LevelInspection L
 where T.TypeJoint_Id=N.TypeJoint_Id and L.Level_Id=N.Level_Id ;

-- I written the above query and getting output as below

Level_Inspection  Root_Visual  Final_Dpt  Type_Joint
Level - 02	    100	          10       Butt Weld
Level - 05	    100		  10       Butt Weld
Level - 03	    100		  20       Butt Weld
Level - 1B	    100	       	  10       Butt Weld
Level - 04	    100		  10       Butt Weld
Level - 02	    100	          20       Nozzle Weld
Level - 05	    100		  20       Nozzle Weld
Level - 03	    100		  10       Nozzle Weld
Level - 1B	    10		  20       Nozzle Weld
Level - 04	    200		  10       Nozzle Weld
Posted
Updated 23-Apr-13 0:41am
v4
Comments
StianSandberg 23-Apr-13 6:32am    
and your question is?
ali from hyd 23-Apr-13 6:34am    
select L.Level_Inspection,N.Root_Visual,N.Final_Visual,T.Type_Joint
from Mst_NDT N,Mst_TypeJoint T,Mst_LevelInspection L
where T.TypeJoint_Id=N.TypeJoint_Id and L.Level_Id=N.Level_Id ;

StianSandberg 23-Apr-13 6:35am    
and so? What is your question?
ali from hyd 23-Apr-13 6:44am    
i want to get display the result as below
Level_Inspection Root_Visual Final_Dpt Type_Joint Root_Visual Final_Dpt Type_Joint
Level - 02 100 10 Butt Weld 100 20 Nozzle Weld
Level - 05 100 10 Butt Weld 100 20 Nozzle Weld
TrushnaK 23-Apr-13 6:35am    
Where is table data? your query?

1 solution

Try this,

SQL
select L.Level_Inspection,N.Root_Visual,N.Final_Visual,T.Type_Joint
from Mst_NDT N, Mst_LevelInspection L
cross join Mst_TypeJoint T
where T.TypeJoint_Id=N.TypeJoint_Id and L.Level_Id=N.Level_Id
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900