Toad World® Forums

Name of Calculated Field not wrapped in quotes


#1

Version 5.0.0.694 (32-bit)

When creating a calculated field with multiple words, the name of the field is no longer automatically wrapped in quote marks (I’m working in Oracle). Manually adding the double-quote marks when creating the name seems to work.

In the example below:

  1. Created a calculated field with intended name “12 Months”
  2. Line 8 shows how the name is not wrapped and also how the first and second words are separated with 71 spaces.
  3. Line 13 shows how I created a second calculated field by entering the double-quote marks manually in the “New field name” area.


#2

This looks to me like a bug. One of our developers will be able to pick this up, try and reproduce the issue and log it. Of course, if you don’t mind, it’s always best to open a Support ticket.


#3

what is the action that is triggering the issue?
I created similiar statement with “12 Months”. Formatting SQL doesn’t strip off the quotes on the alias. Opening the file does not strip off the Alias. And you have to have double quotes to have the alias. So I must have missed a step here.

what is the SQL like prior to the corruption? And what action caused the corruption?

And are you using the SQL Editor of Query Builder. I am using the editor.


#4

I’m using Query Builder and was illustrating what was occurring by showing the SQL script.

  1. Create a query via Query Builder.
  2. Click the sigma button on the toolbar to create a calculated field.

#5

Thanks for the clarification. I am able to reproduce and entered QAT-14216. Jowever, I am pretty sure that the developer will feel that quoting is the responsibility of the user. This comes from how Oracle normally treats object names. IE: if you enter Apples as the name of a column or table it will turn this into APPLES. If you really want Apples (Initcap) as the name you have to enclose in quotes. This is considered non-standard name and quoting would be expected in any name that contains a space. But I will pass this onto dev and see what they say.


#6

“Developers with feelings” that’s funny.

At any rate, I feel that it is important to remember that the Query Builder is used by many that are not SQL savvy and it is expected that the software handle the reasonable inputs of the user and write/format the SQL for the user. While I am extremely SQL savvy, the current behavior is not expected, as earlier versions did not require the use of quotes.


#7

Further evidence of maintaining consistency across the software (that quotes should not be required in Query Builder)…

When entering a Field Alias in Query Builder for a multi-word alias quotes are not required and the software wraps the alias in quotes in the SQL.

Example:
Column PRICE_CUSTOMER_EXTENDED has been aliased as “Order Dollars” and I did not input any quotes.

QueryBuilderFieldAliases QueryBuilderFormattedSQL

The software adds the quotes for me.


#8

Fair enough. I will add your points to the Jira issue. :blush:


#9

Danke


#10

:heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes: