Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --drop table #perfil
- SELECT IDENTITY(INT)AS id, per_codigo
- INTO #perfil
- FROM PERFIL
- --select * from #perfil
- DECLARE @RowCount INT
- SET @RowCount = (SELECT COUNT(per_codigo) FROM #perfil)
- DECLARE @I INT
- SET @I = 1
- WHILE (@I <= @RowCount)
- BEGIN
- DECLARE @per_codigo VARCHAR(20)
- SELECT @per_codigo = per_codigo FROM #perfil WHERE id = @I
- INSERT INTO PERMISO(PER_CODIGO, IPE_CODIGO, PRM_ABRE, PRM_GRABA, PRM_ELIMINA, PRM_AUTORIZA)
- VALUES(@per_codigo, 933, 0, 0, 0, 1)
- SET @I = @I + 1
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement