Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » SQL File Editor > Execute All not skipping comment lines
SQL File Editor > Execute All not skipping comment lines [message #56477] Wed, 20 May 2009 00:54 Go to next message
Robert Mark Bram is currently offline Robert Mark BramFriend
Messages: 32
Registered: July 2009
Member
Hi All,

Eclipse 3.4.2.

I have some SQL in a file that includes comments. E.g.

-- drop TABLE MDFYG02_USER_SESSION;
CREATE TABLE MDFYG02_USER_SESSION(
blah blah..

Using Data Source Explorer I connect to an Oracle database and open the
SQL file in "SQL File Editor". When I right click on the file and select
"Execute All", it does so, but always fails on the comment lines. Screen
shot of this:
http://www.flickr.com/photos/90979331@N00/3544712063/

Is this a configuration issue? I.e. why isn't Eclipse just skipping
comment lines?

Thanks for any advice!

Rob
:)
Re: SQL File Editor > Execute All not skipping comment lines [message #56558 is a reply to message #56477] Fri, 22 May 2009 01:57 Go to previous message
Eclipse UserFriend
Originally posted by: hui.cao.sybase.ocm

Hi Rob,
Unfortunately, this is not a configuration issue. The current SQL
execution logic is described in
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=221845). Before the
statements are executed, the generic SQL parser tries to parse them and if
no parsing errors are found, the statements will be executed based on the
parsing result, which could take out the comment lines. But the problem of
generic SQL parser is it's too simplified and cannot recognize
vendor-specific syntaxes, therefore, parsing errors will be generated and we
fall back to use a very simple mechanism as described in 221845 to separate
the statements ( You can specify the statement terminator via preference).
So, the short answer to your question is there's no configuration to work
around this problem, unless you provide a full-fledged SQL parser for your
DB. I remember there's a Oracle plug-in for DTP, have you tried that?

--
Best Regards!

Max (Hui) Cao
Sybase Shanghai RD
"Robert Mark Bram" <robertmarkbram@gmail.com> wrote in message
news:e8790581aa5e34464b385154a85ae570$1@www.eclipse.org...
> Hi All,
>
> Eclipse 3.4.2.
>
> I have some SQL in a file that includes comments. E.g.
>
> -- drop TABLE MDFYG02_USER_SESSION;
> CREATE TABLE MDFYG02_USER_SESSION(
> blah blah..
>
> Using Data Source Explorer I connect to an Oracle database and open the
> SQL file in "SQL File Editor". When I right click on the file and select
> "Execute All", it does so, but always fails on the comment lines. Screen
> shot of this:
> http://www.flickr.com/photos/90979331@N00/3544712063/
>
> Is this a configuration issue? I.e. why isn't Eclipse just skipping
> comment lines?
>
> Thanks for any advice!
>
> Rob
> :)
>
>
Re: SQL File Editor > Execute All not skipping comment lines [message #595803 is a reply to message #56477] Fri, 22 May 2009 01:57 Go to previous message
Hui Cao is currently offline Hui CaoFriend
Messages: 29
Registered: July 2009
Junior Member
Hi Rob,
Unfortunately, this is not a configuration issue. The current SQL
execution logic is described in
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=221845). Before the
statements are executed, the generic SQL parser tries to parse them and if
no parsing errors are found, the statements will be executed based on the
parsing result, which could take out the comment lines. But the problem of
generic SQL parser is it's too simplified and cannot recognize
vendor-specific syntaxes, therefore, parsing errors will be generated and we
fall back to use a very simple mechanism as described in 221845 to separate
the statements ( You can specify the statement terminator via preference).
So, the short answer to your question is there's no configuration to work
around this problem, unless you provide a full-fledged SQL parser for your
DB. I remember there's a Oracle plug-in for DTP, have you tried that?

--
Best Regards!

Max (Hui) Cao
Sybase Shanghai RD
"Robert Mark Bram" <robertmarkbram@gmail.com> wrote in message
news:e8790581aa5e34464b385154a85ae570$1@www.eclipse.org...
> Hi All,
>
> Eclipse 3.4.2.
>
> I have some SQL in a file that includes comments. E.g.
>
> -- drop TABLE MDFYG02_USER_SESSION;
> CREATE TABLE MDFYG02_USER_SESSION(
> blah blah..
>
> Using Data Source Explorer I connect to an Oracle database and open the
> SQL file in "SQL File Editor". When I right click on the file and select
> "Execute All", it does so, but always fails on the comment lines. Screen
> shot of this:
> http://www.flickr.com/photos/90979331@N00/3544712063/
>
> Is this a configuration issue? I.e. why isn't Eclipse just skipping
> comment lines?
>
> Thanks for any advice!
>
> Rob
> :)
>
>
Previous Topic:Installation blocked by DTP
Next Topic:db4o database in the Data Tools Platfom
Goto Forum:
  


Current Time: Tue Mar 19 10:36:30 GMT 2024

Powered by FUDForum. Page generated in 0.04047 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top