请教,一句SQL语句,判断是否有满足条件的记录。判断A表中有满足condition的记录怎么写。select a.area, a.wg_rcuser, count(wg_code) doingitemcnt from v_qc_statistics a where wg_rctache = 1256
and not exists (select wg_code from v_qc_statistics b where b.wg_srtache = 1256 and b.wg_sruser = a.wg_rcuser)
group by area, wg_rcuser
其中,not exists后面挂号中的就是这个需要搞定的,剔除掉满足这样条件的记录
and not exists (select wg_code from v_qc_statistics b where b.wg_srtache = 1256 and b.wg_sruser = a.wg_rcuser)
group by area, wg_rcuser
其中,not exists后面挂号中的就是这个需要搞定的,剔除掉满足这样条件的记录
解决方案 »
- 一个sql语句,请帮看看
- java调用oracle存储过程CallableStatementCallback; uncategorized SQLException
- instant client 配置问题
- (100分)关于两种语言转换问题请教。
- 这句语句如何用PreparedStatement实现
- 请教高手,关于execute immediate
- oracle数据导入导出问题
- 请教一个oracle怪异问题(在google上都没能搜到)
- 急~~`高手帮忙~~~~~EXP备份数据库,DMP文件名取不到当前时间????
- 中秋,送80,有需要QQ的也送!请再LINUX平台下搞ORACLE应用开发的留个QQ,并给些意见!
- 不显示删除回复显示所有回复显示星级回复显示得分回复 如何更新oracle数据库中blob对象的十六进制数值?
- oracle不定期挂掉,急!!!!!
from v_qc_statistics a
where
not exists
(select 1 from v_qc_statistics b
where wg_rctache = 1256 NOT EXISTS( SELECT 1 FROM v_qc_statistics AS c WHERE c.wg_rcuser=b.wg_rcuser AND c.wg_srtache=a.wg_srtache)
)
group by area, wg_rcuser