PL / SQL:ORA-00907:缺少右括号

时间:2013-12-18 01:07:26

标签: oracle

我在此代码中出现此错误

  

ORA-00907:缺少右括号

select buyer
,cobuyer
, case
            when Sp_Desc like('ma%') then 'mail'
            when Sp_Desc like('pa%') then 'phone'      
            else " "
            end AS Special_Handling 
            from
              ( string_function(g.buyer_id)
                from gift g ) AS Sp_Desc  
, salary
, etc

1 个答案:

答案 0 :(得分:1)

select 
  buyer 
  , cobuyer 
  , case when Sp_Desc like('ma%') then 'mail' 
         when Sp_Desc like('pa%') then 'phone'
    else ' '
    end 
  AS Special_Handling 
from 
  ( SELECT string_function(g.buyer_id) from gift g ) Sp_Desc