Home » SQL & PL/SQL » SQL & PL/SQL » Multiple Cursors (10.2.0.3.0)
Multiple Cursors [message #392433] Wed, 18 March 2009 00:16 Go to next message
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 #392435 is a reply to message #392433] Wed, 18 March 2009 00:22 Go to previous messageGo to next message
trivendra
Messages: 208
Registered: October 2007
Location: Noida, India
Senior Member
Join with column Card_num with three queries and make a single cursor.
Re: Multiple Cursors [message #392436 is a reply to message #392433] Wed, 18 March 2009 00:25 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Quote:
I have written 3 cursors.


Quote:
can any one pleas let me know how to relate these 3 cursors while declaraing and getting this output


more than 400 posts?
anyone please let me know how can i relate this post as per forum guide lines?
Re: Multiple Cursors [message #392441 is a reply to message #392436] Wed, 18 March 2009 00:35 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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 #392443 is a reply to message #392433] Wed, 18 March 2009 00:38 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>can any one pleas let me know how to relate these 3 cursors while declaraing and getting this output.

You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Re: Multiple Cursors [message #392450 is a reply to message #392443] Wed, 18 March 2009 01:06 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Quote:
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


but first you have to learn how to post ,formate as per the guidelines provided.
http://www.orafaq.com/forum/t/88153/0/
Re: Multiple Cursors [message #392451 is a reply to message #392450] Wed, 18 March 2009 01:13 Go to previous messageGo to next message
trivendra
Messages: 208
Registered: October 2007
Location: Noida, India
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 Go to previous messageGo to next message
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 Go to previous messageGo to next message
Frank
Messages: 7880
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.
Re: Multiple Cursors [message #392460 is a reply to message #392454] Wed, 18 March 2009 01:33 Go to previous message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
That's a Good suggestion
Previous Topic: SQL Query
Next Topic: Query to alter mass number of tables
Goto Forum:
  


Current Time: Thu Dec 08 04:03:47 CST 2016

Total time taken to generate the page: 0.09042 seconds