Subject | Re: [firebird-support] MS SQL Server stored procedure to Firebird |
---|---|
Author | Luiz Henrique Martino |
Post date | 2010-06-10T20:06:14Z |
In Firebird, you need to declare a variable for each column that you pretend
to return in your procedure. Please, change the "SELECT TOP(100) * FROM
groups" by another specifying your column names.
Sometimes, this is boring, but on the other hand, avoids that you increase
the unnecessary data traffic on network (I think)
[]'s
Martino
2010/6/10 sqlsvr <sqlsvr@...>
to return in your procedure. Please, change the "SELECT TOP(100) * FROM
groups" by another specifying your column names.
Sometimes, this is boring, but on the other hand, avoids that you increase
the unnecessary data traffic on network (I think)
[]'s
Martino
2010/6/10 sqlsvr <sqlsvr@...>
>[Non-text portions of this message have been removed]
>
> I'm migrating from SQL server to firebird, how do you convert the following
> MS SQL stored procedure to firebird?
>
> CREATE STORED PROCEDURE insert_member
> (
> @username VARCHAR(25),
> @password VARCHAR(25)
> )
> AS
> BEGIN
> BEGIN TRANSACTION
> DECLARE @group_name VARCHAR(25);
> INSERT INTO members (username, password) VALUES (@username, @password);
> SELECT TOP 1 @group_name = group_name FROM groups ORDER BY last_modified;
> INSERT INTO group_members (group_name, username) VALUES (@group_name,
> @username);
>
> SELECT TOP(100) * FROM groups;
> COMMIT;
> END
>
>
>