I am sorry i for got to copy the Insert statement.. Ignore the above Procedure.. Use the below procedure it will work ..
insert into tableD (UserID, DepartmentID, SecurityID)
Create proc Proc_Insert_Details
@UserName varchar(10) ,
@DepartmentName varchar(10),
@SecurityLevel varchar(10)
as
Begin
declare @User_id int
set @User_id=(select UserID FROM TABLEA WHERE UserName = @UserName)
declare @Department_id int
set @Department_id=(select DepartmentID FROM TABLEB WHERE DepartmentName = @DepartmentName)
declare @Security_id int
set @Security_id=(select SecurityID FROM TABLEC WHERE SecurityLevel = @SecurityLevel)
insert into tabled(UserID,DepartmentID,SecurityID) values(@User_id,@Department_id,@Security_id)
end