October 22, 2024
Chicago 12, Melborne City, USA
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

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video