Well, it is not a delimiter settings problem. For example if you
could add a delimiter, what delimiter would you add? “begin” ? “end”?
This would not help the parser since the whole statement structure
should be formulated in another way.
Roy
From:
dtp-dev-bounces@xxxxxxxxxxx [mailto:dtp-dev-bounces@xxxxxxxxxxx] On Behalf
Of Kirill Kranke
Sent: Wednesday, December 23, 2009 7:12 PM
To: DTP development mailing list
Subject: Re: [dtp-dev] delimiter and stored procedures
So!
Probably I had to be more specific from the beginning. Just tried to make
question shorter.
The solution I see : give DTP user possibility to set SQL parser delimiter.
2009/12/23 Roy Ganor <roy@xxxxxxxx>
Yep, I see the problem.
The generic parser cuts statements
according to a specified delimiter (can be any character or a word),
Maybe I did not search good enough. How can I set this
delimiter character to something but ';'? I did not find!! Sorry if it is my
fault.
but I couldn’t allocate a scope
mode which is required by your example to nest the
“begin”/”end” tokens.
I suggest you open a bug against the
data tools SQLTools sub-project, or maybe someone else have another idea?
For example in phpMyAdmin when you execute MySQL SQL
statement you can specify parser delimiter in GUI. The given example can be
executed there like this:
DROP PROCEDURE IF EXISTS `ats`.`p_ins_rdata`@@
CREATE DEFINER = 'ATS'@'%'
PROCEDURE ats.p_ins_rdata(
IN _symbol varchar(16),
IN _value INT
)
BEGIN
DECLARE object_id int ;
... some more code ...
END @@
with Parser delimiter = '@@'.