Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

[4.1] Column named "CURRENT_DATE" displays current date instead of contents

ArpodJun 5 2015 — edited Jun 7 2015

Well, here's the problem: we have a table which contains a field named CURRENT_DATE. When opening said table in navigator and going to "Data" tab, SQLDeveloper displays the contents of this column as a result of CURRENT_DATE function. Sure enough, the statement looks like this:

/* + NO_PARALLEL */SELECT ROWID "ROWID", ..., CURRENT_DATE CURRENT_DATE, ... FROM "SCHEMA"."TABLE"

Granted, this selects value of CURRENT_DATE function. This is pretty unfortunate, since the table is about 10 years old already, and there's a LOT of business logic built around it; additionally, the person who've created that monster left the job years ago and moved to another city, so I can't even ask him why did he do that in the first place.

So, can sqldeveloper build queries in such way that columns are double-quoted when they collide with built-in function name, like it is done for reserved words like 'INDEX' already? Using table alias could also help.

P.S. what's with that /* + NO_PARALLEL */ hint? Shouldn't it go after select to be useful?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 5 2015
Added on Jun 5 2015
3 comments
924 views