SQL code
select * from Project t where not exists (select 1 from Expense from Project = t.Project and type = t.type)
[/Quote]
只要根据type判断 关联表是否显示数据就可以了
select * from T_PROJECT t where not exists (select 1 from T_EXPENSE from t.f_type ='ZHL3_WK_03')
不对啊- -!!我是用SQL查询分析
错误为
服务器: 消息 156,级别 15,状态 1,行 1
在关键字 'from' 附近有语法错误。