select * ,
(select concat(picPath,picName) as picPatch, picTitle, picNote from etpic where picid='etTasteEva01') as b ,
(select group_concat(codeCont) from codetable where codeId in (select busiProId from busiprolink where etId ='et001' order by busiProId)) as busiPro,
from (
select etId,Name
from etinfo where etId = 'et001') a
group by a.etId;
-----------------------------------
错误:
1241 operand should contain 1 column(s)
------------------------------------
我把picTitle, picNote去调就好了。
但画面上还需要这两个字段,
------------------------------------
问:这个怎么解决,不会写了。
(select concat(picPath,picName) as picPatch, picTitle, picNote from etpic where picid='etTasteEva01') as b ,
(select group_concat(codeCont) from codetable where codeId in (select busiProId from busiprolink where etId ='et001' order by busiProId)) as busiPro,
from (
select etId,Name
from etinfo where etId = 'et001') a
group by a.etId;
-----------------------------------
错误:
1241 operand should contain 1 column(s)
------------------------------------
我把picTitle, picNote去调就好了。
但画面上还需要这两个字段,
------------------------------------
问:这个怎么解决,不会写了。
考虑你的表etpic和etinfo表是否有什么关联,然后把etpic表放到主查询的from后面去。
解释得很清楚了。你需要重写一下你的SQL语句实现相同功能。建议你列出你的表结构,并提供测试数据以及基于这些测试数据的所对应正确结果。
这样应该可以利用其它格式的SQL语句来实现。
字段:picPatch ,picTitle, picNote
key:picid
--------------------------
想把多条等于picid的记录检成1条
想要结果:
picPatch1 ,picTitle1, picNote1,picPatch2 ,picTitle2, picNote2,
picPatchN ,picTitleN, picNoteN
怎么实现????????