tab1 tab2
1,a 1,d
2,b 3,c
perfoms outerjoin what is the o/p?
write sql query for outerjoin?

Answers were Sorted based on User's Feedback



tab1 tab2 1,a 1,d 2,b 3,c perfoms outerjoin what is the o/p? write sql query for oute..

Answer / subhash

OUTPUT:
1, a, d
2, b, NULL
3, NULL, c

SQL Query:
SELECT * FROM TAB1 FULL OUTER JOIN TAB2 ON
TAB1.key_column=TAB2.key_column;

or

SELECT * FROM TAB1,TAB2 WHERE
TAB1.key_column=TAB2.key_column(+)
UNION
SELECT * FROM TAB1,TAB2 WHERE
TAB1.key_column(+)=TAB2.key_column;

Is This Answer Correct ?    7 Yes 0 No

tab1 tab2 1,a 1,d 2,b 3,c perfoms outerjoin what is the o/p? write sql query for oute..

Answer / subhash

OUTPUT:

1, a, d
2, b, NULL
3, NULL, c

Is This Answer Correct ?    3 Yes 0 No

tab1 tab2 1,a 1,d 2,b 3,c perfoms outerjoin what is the o/p? write sql query for oute..

Answer / karthi

select * from tab1 full outer join tab2 on
tab1.key_column=tab2.key_column;

or

select * from tab1,tab2 where tab1.key_column(+)=tab2.key_column
union
select * from tab1,tab2 where
tab1.key_column=tab2.key_column(+);

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More Data Stage Interview Questions

i have source like deptno,sal 1,2000 2,3000 3,4000 1,2300 4,5000 5,1100 i want target like target1 deptno,sal 1,2000 3,4000 4,5000 target2 2,3000 1,2300 5,1100 with out using transformerstage

6 Answers  


difference between server shared container and parallel shared container

6 Answers   CTS,


How to read multiple files at different directories using a single Sequential File stage in DS Enterprise Edition

6 Answers   TCS,


How to get max salary of an organization using data stage stages........... can any body help me plz.......

7 Answers   Cap Gemini,


i/p o/p1 o/p2 1 1 4 1 1 5 1 1 6 2 2 2 2 2 2 3 3 4 5 6 how to populates i/p rows into o/p1&o/p2 using datastage stages?and also the same scenario using sql?

8 Answers   IBM,


I/P --- ID Value 1 AB 2 ABC 3 ADE 4 A O/p --- ID Value 1 A 1 B 2 A 2 B 2 C 3 A 3 D 3 E 4 A

3 Answers   IBM,


Define Job control?

0 Answers  


I have 2 files 1st contains duplicate records only, 2nd file contains Unique records.EX: File1: 1 subhash 10000 1 subhash 10000 2 raju 20000 2 raju 20000 3 chandra 30000 3 chandra 30000 File2: 1 subhash 10000 5 pawan 15000 7 reddy 25000 3 chandra 30000 Output file:-- capture all the duplicates in both file with count. 1 subhash 10000 3 1 subhash 10000 3 1 subhash 10000 3 2 raju 20000 2 2 raju 20000 2 3 chandra 30000 3 3 chandra 30000 3 3 chandra 30000 3

2 Answers   TCS,


If you want to use the same piece of code in different jobs, how will you achieve it?

0 Answers  


eno ename esal acct1 acct2 amount1 amount2 100 suresh 10000 sbi1 sbi2 1000 2000 this is our sourse data i would loke to disply like this eno ename esal acct amount 100 suresh 10000 sbi1 1000 100 suresh 10000 sbi2 2000

2 Answers   HCL,


How do u set a default value to a column if the column value is NULL?

7 Answers   HP,


What are the enhancements made in datastage 7.5 compare with 7.0?

0 Answers  


Categories