Subquery returned more than 1 value.

  • Hi ,

    one small problem:

    ALTER Procedure dbo.UPdata

    (

    @e_Nplan char(20),

    @e_Ncas char(20)

    )

    As

    Update Cis_OP_NO

    SET N_Cas100ks = convert(float,replace(@e_Ncas,',','.'))

    Where N_Kplan = @e_Nplan

    return

    Error message:

    Subquery returned more than 1 value. This is not premitted when the subquery follows =, =! , ....

    Could you give some suggests how to solve it?

    Thanks

  • Would you please show us how you are using this procedure?

  • ALTER Procedure dbo.UPdata

    (

    @e_Nplan char(20), /* e.g. 112a */

    @e_Ncas char(20) /* e.g. 15,45 */

    )

    As

    Update Cis_OP_NO

    SET N_Cas100ks = convert(float,replace(@e_Ncas,',','.'))

    Where N_Kplan = @e_Nplan

    return

    .... problem is that in my table is more than 1 record for N_Kplan ...but I dont know how to solve it

  • peter478 (5/22/2009)


    ALTER Procedure dbo.UPdata

    (

    @e_Nplan char(20), /* e.g. 112a */

    @e_Ncas char(20) /* e.g. 15,45 */

    )

    As

    Update Cis_OP_NO

    SET N_Cas100ks = convert(float,replace(@e_Ncas,',','.'))

    Where N_Kplan = @e_Nplan

    return

    .... problem is that in my table is more than 1 record for N_Kplan ...but I dont know how to solve it

    Sorry, but all you did is repost the code for your stored procedure. This doesn't tell us anything.

    Please provide the DDL for the table Cis_OP_NO, sample data for the table (in a readily consumable format), how you are calling the stored procedure dbo.UPdata including the data being passed to procedure.

  • There is not a subquery in the code you provided.

    Please include the ALL code you are running that produces the error.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply