ly.comeng
دوشنبه 15 فروردین 1390, 11:58 صبح
با سلام
من 3 تا جدوا دارم
groups
permission
grouppermission
که می خوام برای groupid=100 همه permissionid ها رو در جدول grouppermission
insert کنم
یه همچین چیزی نوشتم:
use Hot;
insert into GroupPermissions
(PermissionID)
select PermissionID from Permissions inner join GroupPermissions on PermissionID=Permissions.ID
where GroupPermissions.GroupID=100
این هم Error اش:
Msg 515, Level 16, State 2, Line 2
Cannot insert the value NULL into column 'GroupID', table 'Hot.dbo.GroupPermissions'; column does not allow nulls. INSERT fails.
The statement has been terminated.
لطفا راهنمایی کنید
من 3 تا جدوا دارم
groups
permission
grouppermission
که می خوام برای groupid=100 همه permissionid ها رو در جدول grouppermission
insert کنم
یه همچین چیزی نوشتم:
use Hot;
insert into GroupPermissions
(PermissionID)
select PermissionID from Permissions inner join GroupPermissions on PermissionID=Permissions.ID
where GroupPermissions.GroupID=100
این هم Error اش:
Msg 515, Level 16, State 2, Line 2
Cannot insert the value NULL into column 'GroupID', table 'Hot.dbo.GroupPermissions'; column does not allow nulls. INSERT fails.
The statement has been terminated.
لطفا راهنمایی کنید