#StackBounty: #sql #oracle #oracle11g #common-table-expression #ms-query Oracle CTE failing in one computer

Bounty: 100

I have queries created in Microsoft Query to run in Excel with VBA.

They work in different computers but there’s one computer where it doesn’t work.

In that computer the queries still work except the ones that use CTEs.

A normal query like the following works:

SELECT
  TBL.COL
FROM
  DB.TBL TBL;

But when it has a subquery (CTE) like the following:

WITH
  SUBQUERY AS (
    SELECT
      TBL.COL
    FROM
      DB.TBL TBL
  )
SELECT
  SUBQUERY.COL
FROM
  SUBQUERY;

It runs but doesn’t retrieve any data.

It doesn’t even show the column name like it would if it worked but had 0 records returned.

The query shows the warning message:

SQL Query can’t be represented graphically. Continue anyway?

Which is normal and shows in any computer, but it also shows another warning message after:

SQL statement executed successfully.

Which only appears in that computer when it doesn’t work.

I need to be able to use them for the queries that I have made.

Using temporary tables would maybe work but I don’t have the permissions required to try.

I tried using inline views but they duplicate the data.


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.