Enhancement req for Issue 821: Execute currently selected query

[expired user #4597]'s profile image [expired user #4597] posted 14 years ago in Running SQL scripts Permalink
When writing new queries in the editor one then to end up with the cursor right after the ;.
Like "select id from table1;<- cursor here
, therefore it would be nice if the Ctrl-Shift-F9 thing would regard the line in front of the cursor as the current line if the cursor is one char to the right of a ;.

Right now
select id from table1;<-Cursor here
delete from table1;
, the delete will be run.

Hopefully this is a not to hard thing to implement smile
ansgar's profile image ansgar posted 14 years ago Permalink
Did you update to the latest build yet? Should have been solved already.
ansgar's profile image ansgar posted 14 years ago Permalink
Ah.. understand, you're expecting the opposite behaviour of what another user called a bug. Well, that won't be solvable I think.
[expired user #4597]'s profile image [expired user #4597] posted 14 years ago Permalink
Hmm, I fail to see how the opposite behavior could be called a bug happyDo you have a reference to that report?

If I have the following sql in an editor window.

1
2
3
4
5 delete * from table 1;

Then add the following to line 1.

1 select * from table1;<-cursor here (will since I've just written that line)
2
3
4
5 delete * from table 1;

Which query will be run?
[expired user #4597]'s profile image [expired user #4597] posted 14 years ago Permalink
Also if I have a new query editor and write:

1 select * from table1;<-cursor here, the query will not run.

One have to move the cursor one step to the right after finished writing the query, if you don't use F9, which is not something that I want since normally I have loads of different queries loaded in the editor.

If a remember correctly both toad and sqlyog handles this "my" way. smile
ansgar's profile image ansgar posted 14 years ago Permalink
See issue #1956 for opposite arguments.

We could possibly run the previous query if there is only 1 at all. But if there is a delimiter Heidi should not just ignore it and run the sentence before the delimiter, which would be hard to explain to other users, such as the reporter of the above issue.
[expired user #4597]'s profile image [expired user #4597] posted 14 years ago Permalink
The behavior described in #1956 is exactly how I would like it to worksmileWhen it comes to arguments I'm not sure there are any in that issue.

In my humble opinion it's far harder to explain to users the way it is now. "Well yes you have written a query, but since you have delimited with a ; at the end, you now have to move the cursor to before the delimiter then you can run it"

My request is that when the cursor is on the first position after the delimiter, then and only then the query before the delimiter should be run.

I'm sorry I fail to see why this is confusing, this is how it works, trademark, in all other decent sql editors.
ansgar's profile image ansgar posted 14 years ago Permalink
> this is how it works, trademark, in all other decent sql editors

Can't believe that, and can't believe you have tested them allsmileAnyway, that's not so important. Only I'm undecided if that's what most people expect, or if it's just you. So, let's get into issue #821 again where this "Run current query" was requested and where it is likely to get some opinions as quite a few people have starred that issue. Could you please leave a comment there with that one-char-behind-stuff please? Thanks!
[expired user #4597]'s profile image [expired user #4597] posted 14 years ago Permalink
I'll sure do that smile

Please login to leave a reply, or register at first.