Loops in Sql Server Triggers and Stored Procedures
Expand Post »
Hi all
I am here again ,and this time i returned back and with my hand a problem in SQL server not in asp.net .
The problem is the following :
I am in a project that contains a table of users(user_tbl) and another table of groups(Group_tbl) . and each group can contains multi-user by Group_Id which is foreign key in user_tbl .
I am now about creating a trigger that happens when inserting in permissions_tbl (contains users and group permissions) . It should insert all users of the inserted group into the permissions_tbl also with the same values the group taked.
So , I need Loops very much to loop in the user_tbl and get the users of the inserted group then insert them in the permissions_tbl .
I wish if some one can help me .
Thank you very much
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.