• Your problem probably has to do with the blue/italic code below. Because of the blue/bold code (setting the _val variables to null) means the red/italic code never runs.

    set @f_val = Null

    set @i_val = Null

    set @c_val = Null

    if @f_val = 1

    set @f_val = @pParameterValue

    begin

    insert into [ISMS].[dbo].[t_ecm_aircraftinput]

    (

    [aircraft_id],

    [Flight_phase],

    [flight_datetime],

    [parameter_name],

    [integer_value],

    [float_value],

    [char_value]

    )

    VALUES

    (

    '"AP-BEQ"',

    '"CRUISE"',

    @CruiseTimestampCsv,

    @pparameter_name,

    @i_val,

    @f_val,

    @c_val

    )

    End

    --else

    if @i_val = 1

    begin

    insert into [ISMS].[dbo].[t_ecm_engineinput]

    (

    [aircraft_id],

    [engine_position],

    [Flight_phase],

    [flight_datetime],

    [parameter_name],

    [integer_value],

    [float_value],

    [char_value]

    )

    VALUES

    (

    '"AP-BEQ"',

    @pengine_position,

    '"CRUISE"',

    @CruiseTimestampCsv,

    @pparameter_name,

    @i_val,

    @f_val,

    @c_val

    )

    end

    If the colors don't show I apologize. This is the first time I tried using the coloring on the forum.:unsure: