thanks for the tag?
can you share with us a VIEW sample with the original source we can test against?
I did more testing and I believe it is choking when it comes across the COMMENTS made on a table or column.
How do I disable COMMENTS from appearing when I hit on the [SQL] tab?
The VIEWS that don't have any Table or Column comments, it renders the SQL perfectly fine.
that would be weird....i can see ddl generated with comments no problemo
and, there's no way to disable generation of object COMMENTS in the current ddl generation preferences
Upon digging further, after skipping through the errors, the SQL code finally appears and I notice that the DDL contains the following statement:-
WITH READ ONLYCOMMENT ON TABLE SOMEONES_SCHEMA.SOME_TABLE IS 'Some very long paragraphs with line breaks and long text'
A few points to observe in the above statement:-
1. My apologies for keeping the schema and table names vague. I work for the Govt and I need to keep things super confidential. Hope you understand.
2. The team that created this VIEW is not my team - so we simply use the VIEW but often times, we need to know which TABLE it is driven off of. So, the developer in that other team, when s/he created the VIEW, somehow must have entered the "ENTER" key after the words WITH READ ONLY followed by COMMENT keyword but somehow, the generated DDL is combining WITH READ ONLYCOMMENT together without a space in between ONLY and COMMENT keywords. This is where I see the first error getting generated.
3. The actual comment surrounded by '' is a long paragraph with line-breaks and other characters like apostrophies, dashes, paranthesis, etc. This is where I also see another error displayed when I hit the SQL tab.
Hope this helps a bit more.
I agree this is a bug. Workaround:
<value n="AUTO_READONLY_FORMAT" v="true" />
in product-preferences.xml and remove this line (or flip to false). Save, restart SQLDeveloper.
I searched for product-preferences.xml in my Windows Explorer and it is returning several hits, so I'm not sure which proper folder path location this file is located so that I can change the prefs.
Also, I did speak with the developer on the other team and he said that WITH READ ONLY and COMMENT was not typed by him but rather it is auto-generated by the DDL.
Let me know.
I found the file and made the changes you suggested - works like a charm now.
Also, it would be nice to have a setting to disable the display of COMMENTS in the DDL generation. Something like SET DDL COMMENT OFF as a preference setting in the login.sql