views:

87

answers:

0
declare @@newid int, @@newRequestId int

INSERT INTO Projects    (ProjectName)
VALUES ('first')

SELECT [@@newId] = SCOPE_IDENTITY()



-- Insert statements for procedure here
INSERT INTO Requests 
(projectId, Title, RequestedBy, ReviewedBy, AssignedTo, EstimatedHours, ActualHours, 
 Status, DateCreated, DateDue, DateAssigned, DateQC, Description)
VALUES (@@newId, 'first','me', null,null, 10, 
 null, 1, '07/27/2009', '7/29/2009', '07/27/2009', null, null)

 select  [@@newRequestId]= scope_Identity()