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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing Right Parenthesis???

Status
Not open for further replies.

TTThio

Programmer
May 3, 2001
185
US
Hi all,

I've been overwhelmed with this for 2 days, still cannot find what is missing. Perhaps you can help me with this.
I'm using pass-through SQl to take data directly from Oracle DB.

Here's the result from debug.print vSQL:

SELECT
Name,
Account_ID,
Account_Team,
Status,
Market_Type
FROM TB_ACCT_V
WHERE (((Market_Type IS NOT Null) AND (Market_Type <> 'Network Services'))
AND (Status <> 'Delete')
AND (Account_ID NOT IN
(SELECT
Account_ID
FROM TB_OPTY_V
WHERE ((Class IS NOT Null) AND (Class <> 'Network Services'))
AND ((Type IS NOT NULL) AND (Type <> 'Delete'))
AND (Opportunity_Name NOT LIKE 'TB - ORT%')
ORDER BY Sales_Stage, Sales_Team, Type)))
 
SELECT
Name,
Account_ID,
Account_Team,
Status,
Market_Type
FROM TB_ACCT_V
WHERE (((Market_Type IS NOT Null) AND (Market_Type <> 'Network Services'))
AND (Status <> 'Delete')
AND (Account_ID NOT IN
(SELECT Account_ID
FROM TB_OPTY_V
WHERE ((Class IS NOT Null) AND (Class <> 'Network Services'))
AND ((Type IS NOT NULL) AND (Type <> 'Delete'))
AND (Opportunity_Name NOT LIKE 'TB - ORT%')
)
)

ORDER BY Sales_Stage, Sales_Team, Type
 
I tried, now I got a message
&quot; 3669 exection failed&quot;

What is wrong now?
 
I could be wrong but when I break it down into smaller bites
the subquery appears to be missing one!
(SELECT
Account_ID
FROM TB_OPTY_V
WHERE ((Class IS NOT Null) AND (Class <> 'Network Services'))
AND ((Type IS NOT NULL) AND (Type <> 'Delete'))
AND (Opportunity_Name NOT LIKE 'TB - ORT%')) <this guy??
 
Actually, we'll need one more parentheses to close it, or delete one from the first WHERE clause.

This error actually reminds me that whenever I run a query that takes quite a long time, I always got a &quot;Execution failed&quot; message.

Is this actually a problem with the time set up?
I'm not familiar with this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top