OiO.lk Blog SQL Two ELSE SQL stataments
SQL

Two ELSE SQL stataments


I’ve the next doubt, I’ve this code:

select DISTINCT case when lppp.TipoLugarProduccion = 3 THEN 
lppp.Id_LugarProduccion
    ELSE 99999 end from LineasProduccionPorParte lppp

I’d like to do two ELSE:

  1. ELSE 99999
  2. ELSE 2027

Like this:

select DISTINCT case when lppp.TipoLugarProduccion = 3 THEN 
    lppp.Id_LugarProduccion
        ELSE 99999 OR ELSE 2027 end from LineasProduccionPorParte lppp

But I’m getting error.

Do you know how can I do it?



You need to sign in to view this answers

Exit mobile version