Home Forums SQL Server 2012 SQL Server 2012 - T-SQL Subquery returned more than 1 value. This is not permitted when the subquery follows RE: Subquery returned more than 1 value. This is not permitted when the subquery follows

  • use

    if (select TOp 1 UNITE_COUT_MATERIEL from DIM_INTER_MATERIEL)= 'Unité'

    or

    if exists (select 1 from DIM_INTER_MATERIEL where UNITE_COUT_MATERIEL = 'Unité')

    both the above query will work in your case.

    sub query should return single value if you are using =operator to compare/assign the result of the query.

    Pramod
    SQL Server DBA | MCSE SQL Server 2012/2014

    in.linkedin.com/in/pramodsingla/
    http://pramodsingla.wordpress.com/