select b.truename,b.tel1,a.intime,a.cvid,b.comfrom,(select company from work where cvid=b.id)as company,(select tagname from cvtag where cvid=b.id)as tag from cvsession a,cvresume b where a.cvid =b.id and a.xmid in(select id from xm)我想以cvsession 为中心,返回他的所有行数,但是这里报错
解决方案 »
- 调用客户端打印机打印
- 涉及到SEO的分页优化问题
- asp.net 的表单中多个SUBMIT按钮的问题
- DataGridView控件中DataGridViewcheckBoxColumn被选中时读取该行的一个字段
- 在线等,解答了就结贴,-Controls
- 在一個小窗口中放一按紐.按這個按紐時這個小窗口關閉.同時會打開另一個窗口.這怎樣做?
- 急疯了!!!!水晶报表问题,请一飘、孟子等高手指教
- Microsoft.Web.UI.Webcontrols.TreeView的问题
- 如何在Asp与Asp.net中共享Session值
- javascript问题?
- 下载ZIP,直接打开ZIP文件,文件夹unicode编码。。
- ASP.NET 页面引用电脑摄像头照像
select b.truename,b.tel1,a.intime,a.cvid,b.comfrom,(select company from work where cvid=b.id)as company,(select tagname from cvtag where cvid=b.id)as tag from cvsession a,cvresume b where a.cvid =b.id and a.xmid in(select id from xm)中间两个子查询改成Left Join
(select company from work where cvid=b.id) as company,
(select tagname from cvtag where cvid=b.id) as tag
from
cvsession a,
cvresume b
where a.cvid =b.id and a.xmid in(select id from xm)
select company from work where cvid=b.id --这有多少条数据?
select tagname from cvtag where cvid=b.id --这个有多少条数据?单独查一下
b.tel1 ,
a.intime ,
a.cvid ,
b.comfrom ,
( SELECT MAX(company)
FROM work
WHERE cvid = b.id
) AS company ,--你这里返回的是一个集合,使用聚合或者只返回一个值
( SELECT MAX(tagname)
FROM cvtag
WHERE cvid = b.id
) AS tag --此处错误同上
FROM cvsession a
LEFT JOIN cvresume b ON a.cvid = b.id --改用左连接
WHERE a.xmid IN ( SELECT id
FROM xm )