0

I've written an oracle query which executes fine against Oracle 11g DB (I wrote it in PL/SQL developer). But when I try to copy/paste it into Microsoft Query as SQL, it fails with ORA-00900: invalid SQL statement.

Is there a list of what can be included in query for Microsoft Query to be treated as valid? In my query I use a lot of SQL modelling - is it not supported?

1
  • Please don't use code markup to add emphasis or add styling to words you think are important. Commented Oct 8, 2013 at 1:57

1 Answer 1

1

I don't believe any of the MODEL features of Oracle are supported by any MS SQL variant.

But as that is an ORA message you are still executing against Oracle, I have to assume that the connection is messing with the SQL. Why do you need to issue the sql through MS Query?

(Perhaps you could define a view/function/proc in Oracle with your model syntax, and then use that object through MS Query)

Sign up to request clarification or add additional context in comments.

3 Comments

Yes, I believe that view would be the best solution. I was just wondering what's allowed in msquery.
Unable to give you that as I don't use MS Query - bound to be some limitations though. Is it ODBC? Limitations can be imposed by ODBC itself.
well if nothing else ODBC will cause limitations I believe, MS Query may attempt a complete pass-thru of a query string - but ODBC doesn't know how to actually issue parts of it (or conversely how to handle the response) so it clags out. Think you have no option but to use the model syntax inside an Oracle object and call it via a simpler request.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.