SELECT CASE columnA WHEN 1 THEN 'text' WHEN NULL THEN 0 END FROM tableX WHERE columnB = 'Test'
Art_Wolf wrote: » I believe what you want is the CASE function. So you would haveSELECT CASE columnA WHEN 1 THEN 'text' WHEN NULL THEN 0 END FROM tableX WHERE columnB = 'Test'
WHERE columnA <> 1 OR columnA = 1 AND columnB IS NULL
WHERE 'A' = decode(columnA, 1, decode(columnb, null, 'A', 0), 'A')
WHERE columnA <> 1 OR columnA = 1 AND columnB IS NULL[code] that to me is not very clear as to what the original programmers intention was. this would be better [code]WHERE { (columnA <> 1) OR (columnA = 1 AND columnB IS NULL) )