数据库中的字段是日期时间型的。假如查询条件是浮点数,我如何用SQL语言去查询
请给出具体查询语句,

解决方案 »

  1.   

    例如:COleDateTime t=COleDateTime::CurrectTime();
         float time;
         time=t.format(); 
    time是查询的条件,
    数据库的字段是日期时间,假设内容为2003-7-12;
    用sql 
      select * from db where date='     '就是这里不知道该怎么写
      

  2.   

    遇见过类似的字段类型匹配问题
    但是没能解决
    帮你up吧
    gz
      

  3.   

    浮点行怎末转换时间型
    把你的浮点型些个函数转换为时间型
    在sql里用变量好像是+xx+
      

  4.   

    例如:COleDateTime t=COleDateTime::CurrectTime();
         float time;
         time=t.format(); 
    time是查询的条件,
    数据库的字段是日期时间,假设内容为2003-7-12;
    用sql 
      select * from db where date='     '就是这里不知道该怎么写select * from db where date like '2003-7-12%%'?
      

  5.   

    If the DBMS is Oracle, then write:SELECT * FROM db WHERE  date = TO_DATE( '2001-7-12', 'YYYY-MM-DD');