Toad World® Forums

Venn diagram error cross connection query with excel

Hello, I am working with my clients to run a query that is looking at Oracle tables and an excel spreadsheet. If I take the extra step and import the excel data to oracle, I do not get this error. The query results are good. With the cross connection query with excel, I get this error when trying to do the Venn:

ODBC data source returned an error: Syntax error (missing operator) in query expression 'SUM(CASE WHEN G.ticket_nr IS NOT NULL THEN 0 ELSE 1 END)'.

I am guessing it is creating some sort of query to create the Venn, and in here there is something it can't get from Excel. Is there anything I can do or is it a bug? It also doing a right outer join on the Excel. Here is the sql:

SELECT TICKET.TICKET_NR
, TICKET.RECEIVED_TS
, TICKET_RESPONSE.RESPONSE_TS
, TICKET.TICKET_TYPE_TXT
, TICKET_ADDRESS.STATE
, TICKET.COMPANY_CODE
, TICKET_RESPONSE.VENDOR_CODE
, AutoRange_Sheet1.ticket_nr
, AutoRange_Sheet1.request_no
, AutoRange_Sheet1.CDC
, AutoRange_Sheet1.workcode_id
, AutoRange_Sheet1.cost
, AutoRange_Sheet1.transmit_date
, AutoRange_Sheet1.dateofwork
, AutoRange_Sheet1.Sales_Tax_State
FROM
(((TICKET_ASSIGNMENT TICKET_ASSIGNMENT INNER JOINTICKET TICKET
ON (TICKET_ASSIGNMENT.TICKET_ID = TICKET.TICKET_ID))
INNER JOIN
TICKET_RESPONSE TICKET_RESPONSE ON (TICKET_RESPONSE.ASSIGNMENT_ID = TICKET_ASSIGNMENT.ASSIGNMENT_ID)) INNER JOINTICKET_ADDRESS TICKET_ADDRESS
ON (TICKET_ADDRESS.TICKET_ID = TICKET.TICKET_ID))
RIGHT OUTER JOIN
Excel Spreadsheet.AutoRange_Sheet1 AutoRange_Sheet1
ON (AutoRange_Sheet1.ticket_nr = TICKET.TICKET_NR)