Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread EDBManager SQL WIndow
Sun, Sep 22 2013 9:21 AMPermanent Link

Michael Riley

ZilchWorks

Avatar

Adding to my wish list...

It would be nice if EDBManager would execute only the selected SQL from
within an SQL window.

--
Michael Riley
GySgt USMC (Ret)
www.zilchworks.com
Sun, Sep 22 2013 10:38 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Michael


>It would be nice if EDBManager would execute only the selected SQL from
>within an SQL window.

I've seen this sort of request a few times. It sort of made sense with DBISAM where a script was a semicolon delimited list of discrete SQL statements. With ElevateDB the only uses I can think of is 1) to execute a subselect independently and for that I prefer what I do now which is cut'n'paste into a new window or 2) to execute a statement leaving out a JOIN or one of the clauses (eg ORDER BY) and I'm happy to use comments for that.

Just my viewpoint.

Roy
Mon, Sep 23 2013 2:17 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Michael,

<< It would be nice if EDBManager would execute only the selected SQL from
within an SQL window. >>

Do you mean as a portion of an SQL statement ?  The EDB Manager already
allows you to select individual statements for execution - just click on the
left-hand gutter to select which statements to execute.

Tim Young
Elevate Software
www.elevatesoft.com
Mon, Sep 23 2013 6:10 PMPermanent Link

Steve Gill

Avatar

<< I've seen this sort of request a few times. It sort of made sense with DBISAM where a script was a semicolon delimited list of discrete SQL statements. With ElevateDB the only uses I can think of is 1) to execute a subselect independently and for that I prefer what I do now which is cut'n'paste into a new window or 2) to execute a statement leaving out a JOIN or one of the clauses (eg ORDER BY) and I'm happy to use comments for that.

Just my viewpoint. >>

You can do this with Microsoft SQL Server Management Studio. I do this quite often, especially with complex SQL scripts.  The organisation I'm doing some work for has some huge stored procedures (eg. 4000 lines) so it's very handy to be able to isolate a part of the SQL and execute just that code.  Sometimes though it can be easier to copy it to another window to execute it.

Which reminds me, I don't know why Microsoft use the F5 key to run a script when it's normally the refresh key.  I keep pressing the F5 key in EDB Manager and wonder why my script doesn't execute. Smile

- Steve
Mon, Sep 23 2013 6:13 PMPermanent Link

Steve Gill

Avatar

Hi Tim,

<< Do you mean as a portion of an SQL statement ?  The EDB Manager already allows you to select individual statements for execution - just click on the left-hand gutter to select which statements to execute. >>

How does that work?  I clicked in the gutter next to a statement but it selects all statements.

- Steve
Tue, Sep 24 2013 3:20 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Steve

>You can do this with Microsoft SQL Server Management Studio. I do this quite often, especially with complex SQL scripts. The organisation I'm doing some work for has some huge stored procedures (eg. 4000 lines) so it's very handy to be able to isolate a part of the SQL and execute just that code. Sometimes though it can be easier to copy it to another window to execute it.

The reason I would copy to another window is that, especially with a 4000 line procedure, I would forget which bit of sql produced the result set I was looking at. Plus its easier to tweak thinks when you have them isolated.

>Which reminds me, I don't know why Microsoft use the F5 key to run a script when it's normally the refresh key. I keep pressing the F5 key in EDB Manager and wonder why my script doesn't execute. Smile

Smiley

Roy
Tue, Sep 24 2013 4:24 PMPermanent Link

Barry

Steve,

<< Do you mean as a portion of an SQL statement ?  The EDB Manager already allows you to select individual statements for execution - just click on the left-hand gutter to select which statements to execute. >>

<How does that work?  I clicked in the gutter next to a statement but it selects all statements. >

Each SQL statement must be separated by a "!" and not a ";" as you would expect. I'm sure there is a reason for it, but it escapes me at the moment.

Barry
Tue, Sep 24 2013 5:57 PMPermanent Link

Steve Gill

Avatar


<<  The reason I would copy to another window is that, especially with a 4000 line procedure, I would forget which bit of sql produced the result set I was looking at. Plus its easier to tweak thinks when you have them isolated. >>

I agree, that works fine in some situations and that is usually how I introduce new code.  I write the SQL in a separate window and when I get it working, paste the code into the existing stored proc.  But sometimes it's not easy to extract code out of a complex stored proc. And when you're pair programming with an SQL guru who says "you don't need to copy the code out, you just do it like this".  The speed and skill of the SQL gurus I work with is just amazing.  They can write complex SQL so quickly, and it works first time.  It just goes over my head sometimes.
Tue, Sep 24 2013 5:59 PMPermanent Link

Steve Gill

Avatar

<< Each SQL statement must be separated by a "!" and not a ";" as you would expect. I'm sure there is a reason for it, but it escapes me at the moment. >>

Thanks Barry, interesting syntax. I don't think I would have ever worked that one out.
Tue, Sep 24 2013 6:36 PMPermanent Link

Raul

Team Elevate Team Elevate

On 9/24/2013 4:24 PM, Barry wrote:
> Each SQL statement must be separated by a "!" and not a ";" as you would expect. I'm sure there is a reason for it, but it escapes me at the moment.

Technically it must be separated by whatever your statement termination
char is (preferences->editor). Default is "!"

As i recall Tim saying the reason for not using ; was that the
procedures and triggers, etc include the ";" so it confuses the editor
gutter selection parsing logic.

Raul
Page 1 of 2Next Page »
Jump to Page:  1 2
Image