How to create SQL function
-
I want to update table, with this following code:
declare @parentid int select accountparentid=@parentid from account where accountid=@accountid while @parentid<> 0 begin UPDATE [dbo].[account] SET [accountvalue] = [accountvalue]+@accountvalue where accountid=@parentid select accountparentid=@parentid from account where accountid=@parentid END
How do I create the function in SQL with the name UpdateAccountParent, I'm using C# express. This should be easy. Thanks.
Work hard, Work effectively. Stock Pick
-
I want to update table, with this following code:
declare @parentid int select accountparentid=@parentid from account where accountid=@accountid while @parentid<> 0 begin UPDATE [dbo].[account] SET [accountvalue] = [accountvalue]+@accountvalue where accountid=@parentid select accountparentid=@parentid from account where accountid=@parentid END
How do I create the function in SQL with the name UpdateAccountParent, I'm using C# express. This should be easy. Thanks.
Work hard, Work effectively. Stock Pick