info_process与info_inn ,info_inn.inncd记录的是当前部门的码,inn_countid里面记录了所有部门码的合集,每个部门码之前用"-"符号连接的
SELECT info_process.processid,
info_process.record,
info_process.mantype,
info_process.man_type,
info_process.Nodecode,
info_process.Nodename,
info_process.inn_countid
FROM info_inn,
info_process
WHERE ( info_inn.inncd like '%' + info_process.inn_countid +'%' ) and info_inn.inncd=:inncd
我试了下,没查出来内容,不知道是否有高手可以解决这个部题,我可不想再建一个表再针对每个processid再关联所有相关的部门码了。。。。谢谢
------解决思路----------------------
SELECT info_process.processid,
info_process.record,
info_process.mantype,
info_process.man_type,
info_process.Nodecode,
info_process.Nodename,
info_process.inn_countid
FROM
info_process
WHERE ( info_process.inn_countid like '%'+:inncd + '%'