Select to view content in your preferred language

SQL comment at beginning of database view

414
0
07-20-2022 12:22 PM
Status: Open
Labels (1)
Bud
by
Esteemed Contributor

When creating a database view in an Oracle EGDB using the Create Database View GP tool:

I can successfully create a view if there isn't a comment at the beginning of the SQL query:

select 1 as unique_id from dual --a comment

But I can't create a view if there is a comment at the beginning of the SQL query, like this:

 --a comment
select 1 as unique_id from dual

When I move the cursor out of the View Definition textbox, then the SQL is automatically changed to be single-line:

 --a comment select 1 as unique_id from dual

Which makes the SQL invalid (Oracle probably thinks the SQL is one big comment).

ERROR 999999: Something unexpected caused the tool to fail. 
Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and
refer to the error help for potential solutions or workarounds.
[ORA-00928: missing SELECT keyword]
DBMS table not found [ORA-04043: object A_TEST_VW does not exist] [a_test_vw]
Failed to execute (CreateDatabaseView).

 
Could Pro be enhanced so that we can put SQL comments at the beginning of database views?

Or put differently, could Pro be enhanced so that it doesn't automatically convert the SQL to be a single line (don't remove line breaks).