Multiple Cursors [message #392433] |
Wed, 18 March 2009 00:16  |
user71408
Messages: 585 Registered: November 2007 Location: NE
|
Senior Member |
|
|
Hi All,
I have written 3 cursors.
1st cursor return 1.Card_num 2.Rc_type 3.Rc_date
2nd cursor return 1.card_num 2.language 3. rc_type 4. rc_date
5.exec_date
3rd cursor retrn 1.card_num 2. Rc_type 3. rc_date 4.exec_date
values.
I need the o/p using all these query it should return
1. Card_num 2.Rc_type 3. Rc_date 4.exec_date 5.language
can any one pleas let me know how to relate these 3 cursors while declaraing and getting this output.
Thank you,
|
|
|
|
|
Re: Multiple Cursors [message #392441 is a reply to message #392436] |
Wed, 18 March 2009 00:35   |
user71408
Messages: 585 Registered: November 2007 Location: NE
|
Senior Member |
|
|
Please don't look at the no. of posts. I have posted even small small doubts as well.bcoz Now i am in learning stage.
Thank you
|
|
|
Re: Multiple Cursors [message #392442 is a reply to message #392435] |
Wed, 18 March 2009 00:38   |
user71408
Messages: 585 Registered: November 2007 Location: NE
|
Senior Member |
|
|
But the first cursor is like
1.select * from emp
Minus
select * from dept;
2. select ename,job,sal,deptno from emp;
3. select lang,desf,empno,ename,job from emp;
please let me know how to join these three queries to a single query.
Thank you
|
|
|
|
|
Re: Multiple Cursors [message #392451 is a reply to message #392450] |
Wed, 18 March 2009 01:13   |
trivendra
Messages: 211 Registered: October 2007 Location: Phoenix
|
Senior Member |
|
|
Condition 1
1.select * from emp
Minus
select * from dept;
Can never be true as the column and data type is different.
Condition 2 and Condition 3 can be merged in a single query as all column are from emp.
2. select ename,job,sal,deptno from emp;
3. select lang,desf,empno,ename,job from emp;
The given conditions do not match with actual scenario.
|
|
|
Re: Multiple Cursors [message #392454 is a reply to message #392451] |
Wed, 18 March 2009 01:24   |
user71408
Messages: 585 Registered: November 2007 Location: NE
|
Senior Member |
|
|
select card_num,rc_Type,rc_date from emp
minus
select card_num,rc_ty,rc_date from dept;
2. select card_num,language , rc_type , rc_date
exec_date from emp;
3. select card_num, Rc_type , rc_date,exec_date from emp;
Thank you,
[Updated on: Wed, 18 March 2009 01:26] Report message to a moderator
|
|
|
Re: Multiple Cursors [message #392458 is a reply to message #392454] |
Wed, 18 March 2009 01:30   |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
We said this before: get a good course in SQL & PL/SQL first. You seem to be missing the very basics of both, which means you have to come here for each and everything you have to do.
This will not change, because you are unable to interpret hints and work them out to solutions yourself. Again, this is because you miss the basics.
|
|
|
|