create procedure DBA.p_card_check(@card_no char(16),@fix_no char(16))
----------------------------------------------------------------------------------------                            
--  存储过程名:特殊名单测试      
--  功能描述:   检查是否是否为特殊名单      
--  变量说明:   @card_no:逻辑卡号 @fix_no:物理卡号
--  创建人:   Alex Chan                            
--  创建时间:   2001.12.18       
--  修改时间:   2001.12.22       
---------------------------------------------------------------------------------------- 
as
declare @nid char(16)
declare @nlen char(7)
nld   --- type  begin
  if exists(select* from special_card where nid = @fix_no and nld between 'A' and 'C')
    return 99
  if exists(select* from special_card where nid = @card_no and nld not between 'A' and 'C' and
      nlen = '1')
    return 99
  if exists(select* from special_card where nld not between 'A' and 'C' and nlen <> '1')
    begin tran
      declare cu_record cursor for select nid,nlen from special_card where 
              nld not between 'A' and 'C' and nlen <> '1'
      open cu_record
      fetch cu_record into @nid,@nlen
      while @@sqlstatus = 0
        begin 
          if convert(int,left(@card_no,15)) >= convert(bigint,left(@nid,15)) and
            convert(int,left(@card_no,15)) <= convert(bigint,left(@nid,15))+convert(bigint,@nlen)-1
            begin
              close cu_record
              return 99
            end
          fetch cu_record into @nid,@nlen end
      close cu_record
      return 0
   commint tran 
end
/////////////////////////////////////////////////////////////////////
出现的错误提示为
Server Message:  Number  195, Severity  15
Procedure 'DBA.p_card_check', Line 37:
'left' is not a recognized built-in function name. 
也就是
          if convert(int,left(@card_no,15)) >= convert(bigint,left(@nid,15)) and
            convert(int,left(@card_no,15)) <= convert(bigint,left(@nid,15))+convert(bigint,@nlen)-1
这一段
求助