If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

This is my original which i had used it in one of my stored procedure.

Example: - OPEN RC4 FOR SELECT
BPJ.ID,
BPJ.CID,
BPJ.PID,
BPJ.INC,
VBC.BID,
VBC.CID,
TCL.NAME,
TCL.ID,
TPR.NAME,
TPR.ID,
TPR.STARTDATE,
TPR.ENDDATE,
TINV.BNO,
TINV.NAME
FROM BPJ,
VBC,
TCL,
TINV,
TPR,
TPJST
WHERE BPJ.CID = VBC.ID
AND VBC.CID = TCL.ID
AND VBC.BID = TINV.ID
AND BPJ.PID = TPR.ID
AND TPJST.CID (+) = VBC.CID
AND ((TPJST.PID (+) = BPJ.PID)
OR (BPJ.ID = LocalPID));
Note :-LocalPID is the local variable which i had used in my stored procedure.
Ofcourse i can use union operator to overcome this issue but by union operator it takes long time to retrive the result. is there any other way i can solve this issue?

Thanks for your reply. Is it that i have to use AND instead of OR in my query? by changing it whether query results remain unchanged? Can u please explain me with the example which is in my previous post.

sorry, i might confused u a lot what u had said was right for that query. Let forget about that query. Hope the following simple query(the same error occurs with this query) will help u to get me a solution

Sorry for my late reply. yes i could excute the block in sql. but the problem is when i try to access the same SQL block through Application(VB/.NET) from outside i am getting the mentioned error. Any idea that i could rewrite the query with out OR condition in it so that i could overcome this error?.

It seems to me that your VB app cannot be running the same SQL statement! SQL either works or does not work, Oracle doesn't care whether you submitted the SQL statement from SQL Plus, VB or any other client application.