[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.dtp] Re: SQL File Editor > Execute All not skipping comment lines

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@xxxxxxxxx> wrote in message 
news:e8790581aa5e34464b385154a85ae570$1@xxxxxxxxxxxxxxxxxx
> 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
> :)
>
>