资讯   |   开发   |   选机中心   |   产品大全 | IBM | 惠普 | 联想 | 戴尔 | 苹果 | 神舟
更多: | 华硕 | 明基 | 方正 | 紫光 | TCL | 夏新 | 联宝 | 宏碁 | 七喜 | 长城 | 清华同方 | 海尔 | 三星 | 东芝 | 索尼 | 富士通 | LG | 技术 | ddnoon
当前位置:笔记本 > 软件开发 >
Advertisement
文章正文

为什么数值类型不对?

类型:转载   责任编辑:asp.net   日期:2007/05/23


热门软件下载:


   

sql   语句:  
  insert   into   temp  
  select   sum(price),pername,dateadd(month,-1,getdate()),1   from   pro_ioput   where   type=2   and   datediff(month,modtime,getdate())=1   group   by   pername  
   
  temp   结构:  
  price   bigint  
  pername   char(20)  
  modtime   datetime  
  type   int  
   
  pro_ioput结构:  
  price   int  
  pername   char(20)  
  modtime   datetime  
   
  出错信息:  
  服务器:   消息   8114,级别   16,状态   5,行   2  
  将数据类型   varchar   转换为   bigint   时出错。  
 

网友回答:

发表者:zjcxc

insert   into   [temp](price,pername,modtime,type)   --可能是字段顺序问题,写清楚字段顺序  
  select   sum(price),pername,dateadd(month,-1,getdate()),1    
  from   pro_ioput    
  where   type=2    
  and   datediff(month,modtime,getdate())=1    
  group   by   pername  
 


 

 
热门推荐笔记本: IBM笔记本
相关文章:
webmaster:popbb@126.com   最佳浏览:1024X768 MSIE
©2007 popbb.net All Rights Reserved