当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 我的电脑装的wnxp pro版,在上网时可以打开主页,但是不能打开文字连接,点下去没有丝毫反应,而网站的弹出式广告也不出现。我的系统是刚装的,还有就是装了norton杀毒软件,office 2000,acrobat reader5.0,photoshop6.0,winrar3.0,豪杰超级解霸3000,请高手急救!!! ......
 ·两个小问题 请各位高人指点12    »显示摘要«
    摘要: 我写了一个从前端得到数据然后存入数据库的asp!我想在asp页面验证字段是否为数字 还有如何控制连接数据库的异常,如果异常出现就转到另外一页!在jsp中可以捕捉sqlexception异常,在asp中如何用vbscript编写!! ......


sqlserver中的case函数在oracle中有没有对应的函数

sqlserver中的case函数在oracle中有没有对应的函数?

NO.1   作者: shahand

先给出decode说明,再给出example  
   
  Decoded   Expression  
  A   decoded   expression   uses   the   special   DECODE   syntax:    
       
   
  To   evaluate   this   expression,   Oracle   compares   expr   to   each   search   value   one   by   one.   If   expr   is   equal   to   a   search,   Oracle   returns   the   corresponding   result.   If   no   match   is   found,   Oracle   returns   default,   or,   if   default   is   omitted,   returns   null.   If   expr   and   search   contain   character   data,   Oracle   compares   them   using   nonpadded   comparison   semantics.   For   information   on   these   semantics,   see   the   section   "Datatype   Comparison   Rules".    
   
   
  The   search,   result,   and   default   values   can   be   derived   from   expressions.   Oracle   evaluates   each   search   value   only   before   comparing   it   to   expr,   rather   than   evaluating   all   search   values   before   comparing   any   of   them   with   expr.   Consequently,   Oracle   never   evaluates   a   search   if   a   previous   search   is   equal   to   expr.    
   
   
  Oracle   automatically   converts   expr   and   each   search   value   to   the   datatype   of   the   first   search   value   before   comparing.   Oracle   automatically   converts   the   return   value   to   the   same   datatype   as   the   first   result.   If   the   first   result   has   the   datatype   CHAR   or   if   the   first   result   is   null,   then   Oracle   converts   the   return   value   to   the   datatype   VARCHAR2.   For   information   on   datatype   conversion,   see   "Data   Conversion".    
   
   
  In   a   DECODE   expression,   Oracle   considers   two   nulls   to   be   equivalent.   If   expr   is   null,   Oracle   returns   the   result   of   the   first   search   that   is   also   null.    
   
   
  The   maximum   number   of   components   in   the   DECODE   expression,   including   expr,   searches,   results,   and   default   is   255.    
   
 

NO.2   作者: macroyan

oracle   和   sqlserver   中的函数区别:  
    DECODE  
     
      CASE   WHEN   if   条件  
              Then   value1  
            Else    
                    value2  
      End

NO.3   作者: zhouweiwansui

case就是decode撒


    摘要: 看到网上有篇文章说软驱非平置的话,会出现这种情况。但我的软驱一直是平置的,怎么老出现这种情况?请教。 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE