(急)dephi中的嵌套子查询问题
我用的是tquery组件,语句如下:
select nam,fes from dy 
where num not in(select num from sg where dat=date() )
可是系统不给执行,系统提示的是DATE()函数有错误。
请各位大侠指点一下!

解决方案 »

  1.   

    date()是delphi函数,你用在sql中当然不行
    你还是用数据库中取得当前日期的函数吧.
    PARADOX7中不知道,sqk sever中是getdate()
    在PARADOX7帮助中找下不是很难的
      

  2.   

    with adoquery do
      begin
       close;
       sql.clear;
       sql.add('select nam,fes from dy where num not in(select num from sg where      dat=:pdate' );
       parameters.parambyname('Pdate'):=date();
       open;
      end;
      

  3.   

    select nam,fes from dy 
    where num not in(select num from sg where dat=SysDate
      

  4.   

    谁能告诉楼主paradox的当前日期的函数或日期格式