易截截图软件、单文件、免安装、纯绿色、仅160KB

access怎么查询这个 - MS-SQL Server / 基础类

and id not in (select distinct client from tb_talk where DATEDIFF('d', #"&date&"#, adddate)<=45)

这个是从tb_client中找出超过45天没有在tb_talk 有记录的数据
结果貌似是对的
但效率太低了

我想这样应该快一点
and (select 1 from em_talk where client = tb_client.id DATEDIFF('d', #"&date&"#, adddate)<=45) 不存在
但不知应该怎么写
ACCESS中不知道有没EXISTS

SQL code:
select * from tb t where ... and not exists (select * from tb_talk where DATEDIFF('d', #"&date&"#, adddate)<=45 and t.id=client)


SQL code:
and id not in (select client from tb_talk where DATEDIFF('d', #"&date&"#, adddate)<=45)--去掉distinct


and not exists (select 1 from tb_talk where client = em_client.id and DATEDIFF('d', #"&date&"#, adddate)<=45)

这样可以了


相关问答:

jsp链接sql2000的疑问?



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

求一sql语句 - MS-SQL Server / 疑难问题

现在有两张表:文章主表A(articleId,articleTitle),文章评论表B(commentId,articleId,commentTitle)
现在我想实现这样的功能:列出文章列表,其中每篇文章标题下面列出此文章的前2个文章评论,请问sql语句怎么写啊 ......

sql - MS-SQL Server / 疑难问题

sql的软件在哪里可以下啊!在网上找了蛮多都用不了啊

随便搞一D版吧,

迅雷第一个就可以用
2000,2005都这样

http://119.147.41.16/down?cid=0698C2D64D7D637D90A6D2482298E6717D4F15CD&t=2&fmt=-1 ......

MS SQL作业问题 - MS-SQL Server / 应用实例

如何在SQL2005中设定定时作业,比如说定时清理某些表的数据,
或者是定时的将某些表的数据导出excel!
在线等待,急急急,最好是详细步骤!
之前我做的作业有点问题!
帮UP

参考:http://hi.baidu.com/toiota ......

求一个SQL语句 - MS-SQL Server / 基础类

字段1,字段2.....字段N,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
想要的结果是:
1,Na ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号