按照MS SQL Server的语法来看:tinylnt => tinyint

解决方案 »

  1.   

    试一下这样写:create or replace procedure testnull1 as
    declare  @discount tinylntbegin
    if (@discount =0)
    print 'no rows'else if (@discount =1) 
    print '1 row'else 
    print case (@discount as tinylnt)+'rows'endif
    end
      

  2.   

    很显然是oracle嘛!注意,语句结尾需要;号
      

  3.   

    case (@discount as tinylnt)+'rows' 是什么意思呢?。想干嘛?
      

  4.   

    case有问题.
    其实我有时分不清是贴主的笔误呢还是什么
      

  5.   

    create procedure testnull1
    asdeclare  @disscount tinyintif (@disscount =0)
    begin
      print 'no rows'
    end
    else if (@disscount =1) 
    begin
    print '1 row'
    end 
    else 
    begin 
    print (convert(varchar,@disscount)  )+' rows'
    end
      

  6.   

    补充:我用的是SQL2000,oracle没试过。
      

  7.   

    诸位:
    1:ORACLE的语法不同于SQL SERVER的,same666的一看就是SQL SERVER语法!
    2: 看一下SQL语法,as 后面应该跟什么!
      

  8.   

    create procedure testnull1 
      @discount tinylnt
    asif (@discount =0)begin
      print 'no rows'
    end
    else if (@discount =1) begin
    print '1 row'
    end 
    else begin 
    print case (@discount as tinylnt)+'rows'
    end
      

  9.   

    问题解决了,有已下几处要改
    1、  tinylnt----------->tinyint
    2、  倒数第二行case----->cast