Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL help needed

Status
Not open for further replies.

malini0905

Programmer
Aug 8, 2006
6
US
I have SQL statement select * from tableA,but to this SQL statement i need to add the functionality of 3 functions.

Function1

Create or Replace Function1()
RETURM object1
IS

CURSOR c1
IS

SELECT * from tableA where (c1='A' or c2='Y');

---

---
RETURN object1;

END Function1


Function2

Create or Replace Function2()
RETURN object2

IS

CURSOR c2
IS

SELECT * from tableA where c2='Y';

---

---
RETURN object2

END Function2


Function3

Create or Replace Function3()

IS

CURSOR c3
IS

object1:=Function1();
object2:=Function2();

If object1.c1=object2.c1 then
return object1
---

---

END Function3

can any one help me with this.


Thanks





 
yes,but this question does not depend on the database.
I need the logic for the SQL statement.

can you please help me.Thanks in advance.
 
Yes it does depend on the database. ORACLE uses a different SQL than Microsoft SQL Server (what this forum is for) does.

You need to post your question in one of the Oracle forums.

-SQLBill

Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top