by default, it removes semi-colons where they appear at the end of a statement.
you could execute the statement 'as-is' from the popup menu in the
editor and selecting 'Execute as single statement'.
this might be a little annoying to do all the time, can you send me a
sample statement of what you are executing so i can better understand
why it is a problem that they are being removed and then we can see
how to cater for them.
thanks
Takis
Thanks for your reply.
I am defining a function for HSQLDB.
The script is as the following. Isn't the semicolon the standard
statement delimiter?
DROP FUNCTION IsEmailExist IF EXISTS;
CREATE FUNCTION IsEmailExist(IN strEmailAddr VARCHAR(256))
RETURNS INT
READS SQL DATA
BEGIN ATOMIC
DECLARE rec_count INT;
--Check if it exists already.
SELECT COUNT(*) INTO rec_count FROM EMAIL_ACCOUNTS WHERE
EMAIL_ADDRESS = strEmailAddr;
IF rec_count > 0 THEN
RETURN 1;
ELSE
RETURN 0;
END IF;
END
Best Regard,
Gary
EQ attempts to detect a number of specific query types - one of which
is create procedure or create function.
the issue in this specific case is in fact the drop statement you have
just before the create. the current implementation detects the drop
function first and proceeds to tokenize the remainder around the
semi-colons as it assumes a series of individual statements after
detecting the drop statement on the first line.
if you remove the drop statement, it should work. also, if you select
to execute as a single statement from the popup menu - this should
work also.
i will investigate whether there is anything we can do here to allow
for cases such as the one you have presented and treat this like EQ
treats create procedure or function statements.
please let me know how you go.
thanks
Takis
this will be available in the next release.
i'm happy to provide you with access to an updated eq.jar file if you
would like this sooner.
thanks
Takis
On Thu, Mar 29, 2012 at 11:46 PM, Takis Diakoumis
On Thu, Mar 29, 2012 at 11:58 PM, Takis Diakoumis
Yes, If I remove the drop statement in the first line, it works.
But if I only comment out this line, it cannot work either.
Anyway, many thanks for your kindly support.
Best Regards,
Gary
On Thu, Mar 29, 2012 at 9:00 PM, Takis Diakoumis