android开发入门教程

android开发入门教程
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

android中使用sqlite的问题

Posted on 2014-10-20 21:05  android开发入门教程  阅读(203)  评论(0)    收藏  举报

============问题描述============


查询语句不会拼,求帮忙
 nt_tasks表中
[f_vc_jiessj] DATETIME, 
  [f_vc_renwsx] CHAR(30), 
f_vc_jiessj字段表示接收到任务的时间
f_vc_renwsx字段表示任务的时限
想查还有1天就要到期的任务

String sql = "select t.[_id],t.[f_vc_mingc],t.[f_vc_gonglmc],t.[f_vc_jiessj],t.[state],t.[f_vc_bummc],t.[username] from nt_tasks t  "
后面的查询条件应该怎么拼

============解决方案1============


where julianday(strftime('%Y-%m-%d',datetime(f_vc_jiessj, '+'||f_vc_renwsx||' day' )))
 - julianday(strftime('%Y-%m-%d','now')) =1
我要啦免费统计