Code Insight in order by clause displays only columns specified in select
That is because Oracle only allows you to order by columns that you have selected. . .
On Wed, Mar 2, 2016 at 5:32 AM, fisher_359 bounce-fisher_359@toadworld.com wrote:
Thread created by fisher_359
ToadInside in order by clause displays only columns specified in select
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or Unsubscribe from Toad for Oracle - Beta notifications altogether.
Toad for Oracle - Beta Discussion Forum
Flag this post as spam/abuse.
--
Phyllis Helton
Data Magician
Digital Products & Strategies, Cru | Data Sciences & Analytics
Office 407-515-4452
Does it ??
select o.object_name, o.subobject_name, o.object_id, o.data_object_id
from obj o
order by o.created
I was under the impression that order by was for select items as well, but I don't know where (or even if) I saw that. The restriction has been removed. All fields will show in next beta. I still have a little tweaking left to show expressions that exist in the select list and to exclude items that already appear in order by.
On 03/02/2016 08:35 AM, fisher_359 wrote:
Reply by fisher_359
Does it ??
select o.object_name, o.subobject_name, o.object_id, o.data_object_id
from obj o
order by o.created
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Toad for Oracle - Beta notifications altogether.Toad for Oracle - Beta Discussion Forum
Flag
this post as spam/abuse.
Please, do not overdo it, I’d expect just list of all columns, otherwise when I’d get fairly complicated sorting with cases function calls and decode, I’ll not be able to use again.
Wow, I didn't even realize that. Guess I need to read the release docs more often to find out things like this.
On Wed, Mar 2, 2016 at 9:50 AM, Michael Staszewski bounce-mstaszew@toadworld.com wrote:
Reply by Michael Staszewski
I was under the impression that order by was for select items as well, but I don't know where (or even if) I saw that. The restriction has been removed. All fields will show in next beta. I still have a little tweaking left to show expressions that exist in the select list and to exclude items that already appear in order by.
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or Unsubscribe from Toad for Oracle - Beta notifications altogether.
Toad for Oracle - Beta Discussion Forum
Flag this post as spam/abuse.
--
Phyllis Helton
Data Magician
Digital Products & Strategies, Cru | Data Sciences & Analytics
Office 407-515-4452
I’ll let all fields display and look at perhaps adding some support for indexed field notation as well after John sent me an offline message with his thoughts.
I have been using another Dell tool as a model because their Code Insight has been well received. They have similar restrictions on what appears in various clauses, perhaps trying to guide a user towards best practice coding? I’m not sure what the reasoning is there, but it’s apparent that their user base and Toad’s are very different or perhaps they sold their implementation really well to management. This is yet another request to remove restrictions so I’ll look at removing all of them and let users construct anything they wish. Oracle will tell you if there’s a problem with the resulting SQL.
[EDIT] The other tool does do some things really well so of course we’ll steal those ideas.
Hey Phyllis,
On 02/03/16 15:44, phyllis.helton_1150 wrote:
Wow, I didn't even realize that. Guess I need to read the release docs
more often to find out things like this.
For some amusement with your users, code up something like "select ...
from ... where ... order by DBMS_RANDOM.RANDOM;" They will eventually
notice the same query returning results in a completely different order!
Not that I would do such a thing!
--
Cheers,
Norm. [TeamT]
That's fun, Norm! I like that.
And I realized why I recently came across error messages in trying to order by a column not in the select. It was when I was doing a group by, and of course it wouldn't work for that. So much for trying to be helpful here!
On Wed, Mar 2, 2016 at 10:56 AM, Norm [TeamT] bounce-NormTeamT@toadworld.com wrote:
Reply by Norm [TeamT]
Hey Phyllis,
On 02/03/16 15:44, phyllis.helton_1150 wrote:
Wow, I didn't even realize that. Guess I need to read the release docs
more often to find out things like this.
For some amusement with your users, code up something like "select ...
from ... where ... order by DBMS_RANDOM.RANDOM;" They will eventually
notice the same query returning results in a completely different order!
Not that I would do such a thing!
--
Cheers,
Norm. [TeamT]
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or Unsubscribe from Toad for Oracle - Beta notifications altogether.
Toad for Oracle - Beta Discussion Forum
Flag this post as spam/abuse.
--
Phyllis Helton
Data Magician
Digital Products & Strategies, Cru | Data Sciences & Analytics
Office 407-515-4452
Even there it’s OK provided that the selected fields for non-aggregate functions are included in the group by. If you have that then you can add additional fields too it seems.
Right. That's what I did not have.
On Wed, Mar 2, 2016 at 12:09 PM, Michael Staszewski bounce-mstaszew@toadworld.com wrote:
Reply by Michael Staszewski
Even there it's OK provided that the selected fields for non-aggregate functions are included in the group by. If you have that then you can add additional fields too it seems.
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or Unsubscribe from Toad for Oracle - Beta notifications altogether.
Toad for Oracle - Beta Discussion Forum
Flag this post as spam/abuse.
--
Phyllis Helton
Data Magician
Digital Products & Strategies, Cru | Data Sciences & Analytics
Office 407-515-4452