Chinaunix首页 | 论坛 | 博客
  • 博客访问: 426537
  • 博文数量: 126
  • 博客积分: 35
  • 博客等级: 民兵
  • 技术积分: 1262
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-19 16:39
文章分类

全部博文(126)

文章存档

2017年(2)

2016年(20)

2015年(64)

2014年(24)

2013年(16)

我的朋友

分类: C/C++

2013-11-29 16:08:34

数据库操作的pc文件里犯了个错误:
snprintf(SqlCont,sizeof(SqlCont),"%s",
"select EventClassID,AlarmMode,deleteFlag from Monitor_Event_Alarm"
"where modifytime>=to_date(:v1,'yyyy-mm-dd hh24:mi:ss')");
pc执行这里面的语句的时候就报错:ORA-00933: SQL command not properly ended
是因为snprintf把select那一行和where那一行直接拼在了一起,语句里出现了
“Monitor_Event_Alarmwhere”这样的东西

注意格式!注意空格!
阅读(1092) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~