Hello, I am having some difficulty keeping my data consistent throughout
my tables. I have 3 tables that I need to be "synch'd up".
tblItem_FMEA_Details, tblItem_FMEA_ViewDetails,
tblItem_FMEA_Views. When I do an insert, things aren't getting done
properly. Would it be at all possible for you to tell me what I need to
fix in my Insert Statement to make sure that the data gets updated for
these 3 tables correctly???? Thanks in advance. Here is what the
tables look like( diagram pic ):
[url]http://www.cs.rit.edu/~ksb8327/tables.jpg[/url]
and here is my Insert statement:

CREATE PROCEDURE usp_datFmea_Details_Insert

(

FailureMode varchar(125),
Cause varchar(125),
LocalEffect varchar(125),
SecondaryEffect varchar(125),
Ultimate varchar(125),
Detection varchar(125),
DetectFactor int,
SeverityFactor int,
FrequencyFactor int,
UpdateUserID char(20),
UpdateTime datetime

)

AS

SET NOCOUNT OFF;

INSERT INTO dbo.tblItem_FMEA_Details (FailureMode, Cause, LocalEffect, SecondaryEffect, Ultimate, Detection, DetectFactor, SeverityFactor,
FrequencyFactor, UpdateUserID, UpdateTime)

VALUES (FailureMode, Cause, LocalEffect, SecondaryEffect, Ultimate, Detection, DetectFactor, SeverityFactor,
FrequencyFactor, UpdateUserID, cast(UpdateTime as datetime) );

SELECT FmeaID, FailureMode, Cause, LocalEffect, SecondaryEffect, Ultimate, Detection, DetectFactor, SeverityFactor, FrequencyFactor, UpdateUserID, UpdateTime

FROM dbo.tblItem_FMEA_Details

WHERE (FmeaID = IDENTITY)
GO


--
Posted via [url]http://dbforums.com[/url]