Create Stored Procedures for MS SQL Server

[expired user #7193]'s profile image [expired user #7193] posted 8 years ago in General Permalink
Hi
Using Microsoft SQL Server 2014 and Heidi 9.3.0.4999 right click and 'create stored routine'

Heidi generates following code:

CREATE PROCEDURE "test"(IN "@MyLimit" INT)
LANGUAGE SQL
NOT DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN
SELECT * FROM Country ORDER BY CountryID OFFSET 0 ROWS
FETCH NEXT @MyLimit ROWS ONLY
END


This cannot be saved. Correct code should be:

DELIMITER //
CREATE PROCEDURE clipdogTest2
(
@MyLimit INT
)
AS
BEGIN
SELECT * FROM Country ORDER BY CountryID OFFSET 0 ROWS
FETCH NEXT @MyLimit ROWS ONLY  
END//
DELIMITER ;


Is there some way to change the 'snippets' used in create procedure?
ansgar's profile image ansgar posted 8 years ago Permalink
No, I have to adjust the resulting CREATE code for each database system. The procedure editor has most of its features for MySQL. But I guess with the above code snippet I can solve that for MSSQL, at least for the exact case.
[expired user #7193]'s profile image [expired user #7193] posted 8 years ago Permalink
Great response
dluck's profile image dluck posted 2 years ago Permalink

I am seeing the same behavior in the current version. Was this ever implemented or is there a plan to implement it?

Please login to leave a reply, or register at first.