日期:2014-05-18  浏览次数:20810 次

Update更新语句问题,求高手,在线等
以下是我插入时的原码,现在要做修改了,不知道这个语句应该怎么写
数据库中满足更新条件的一次只有12条记录,要全部更新,但是12条记录中有一个字段的值都是不同的
希望大家能明白我的意图如果有不明确的地方见回复,在线等...
C# code
 
public int Add(Model.FCEngineData model)
        {
            StringBuilder InsertString = new StringBuilder();
            InsertString.Append("insert tbFCEngineData(AircraftFlightRecordID,EngineID,PositionDesc,FCParamterGroupID,ParamterID,ParamterValue)");
            InsertString.Append("select " + model.AircraftFlightRecordID + "," + "'" + model.EngineIDleft + "'" + "," + "'" + model.PositionDescleft + "'" + "," + model.FCParamterGroupID + "," + 9 + "," + model.Qygd + "  union all ");
            InsertString.Append("select " + model.AircraftFlightRecordID + "," + "'" + model.EngineIDleft + "'" + "," + "'" + model.PositionDescleft + "'" + "," + model.FCParamterGroupID + "," + 6 + "," + model.Dqwd + "  union all ");
            InsertString.Append("select " + model.AircraftFlightRecordID + "," + "'" + model.EngineIDleft + "'" + "," + "'" + model.PositionDescleft + "'" + "," + model.FCParamterGroupID + "," + 5 + "," + model.TemLeft + "  union all ");
            InsertString.Append("select " + model.AircraftFlightRecordID + "," + "'" + model.EngineIDleft + "'" + "," + "'" + model.PositionDescleft + "'" + "," + model.FCParamterGroupID + "," + 4 + "," + model.RevLeft + "  union all ");
            InsertString.Append("select " + model.AircraftFlightRecordID + "," + "'" + model.EngineIDleft + "'" + "," + "'" + model.PositionDescleft + "'" + "," + model.FCParamterGroupID + "," + 18 + "," + model.MaxtemLeft + "  union all ");
            InsertString.Append("select " + model.AircraftFlightRecordID + "," + "'" + model.EngineIDleft + "'" + "," + "'" + model.PositionDescleft + "'" + "," + model.FCParamterGroupID + "," + 17 + "," + model.MaxrevLeft + "  union all ");
            InsertString.Append("select " + model.AircraftFlightRecordID + "," + "'" + model.EngineIDright + "'" + "," + "'" + model.PositionDescright + "'" + "," + model.FCParamterGroupID + "," + 9 + "," + model.Qygd + "  union all ");
            InsertString.Append("select " + model.AircraftFlightRecordID + "," + "'" + model.EngineIDright + "'" + "," + "'" + model.PositionDescright + "'" + "," + model.FCParamterGroupID + "," + 6 + "," + model.Dqwd + "  union all ");
            InsertString.Append("select " + model.AircraftFlightRecordID + "," + "'" + model.EngineIDright + "'