This content has been marked as final. Show 5 replies
Johnbr (Oracle10G) wrote:Frankly I find that hard to believe. That CONVERT() call uses a different syntax (SQL Server?) from [url http://docs.oracle.com/cd/B28359_01/server.111/b28286/functions027.htm]the Oracle function of the same name.
I can run the sub querey in this fine,
but when I apply Select * around it, I get the Incorrect syntax near ')' error.Soon don't do that then.
Are you sure you run this query in an Oracle database?. "dbo" owner is a typical owner of other engines, like SQL server.
Anyway, inside Oracle the statement "select * from (subquery);" is valid, as well as using an alias for the subquery, "select * from (subquery) as table_alias;". But in other engines you could find only the last one valid.
This is clearly SQL Server query, and SQL Server requires to alias in-line view:
SELECT * FROM ( SELECT 1 c ) Msg 102, Level 15, State 1, Line 4 Incorrect syntax near ')'.
SELECT * FROM ( SELECT 1 c ) x c - 1
I missed those "dbo" thisngs (there's something about double-quoted mixed case which makes my eyes glaze over). But that just confirms my belief that this query could never run on Oracle, as a sub-query or not.
oh yes... silly me.. yes, it is a SQL Server DB.. thanks!