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?

Charles
  • 50,943
  • 13
  • 104
  • 142
maialithar
  • 3,065
  • 5
  • 27
  • 44
  • Please don't use `code markup` to add `emphasis` or add `styling` to words you think are `important`. – Charles Oct 08 '13 at 01:57

1 Answers1

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)

Paul Maxwell
  • 33,002
  • 3
  • 32
  • 51
  • Yes, I believe that view would be the best solution. I was just wondering what's allowed in msquery. – maialithar Oct 07 '13 at 12:57
  • 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. – Paul Maxwell Oct 07 '13 at 13:40
  • 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. – Paul Maxwell Oct 08 '13 at 02:21