select T_Batch.CID as '客户号',T_Batch.CTID as '客户作业号', T_Batch.BID as '批次', T_Image.PIC as '完整图例',T_Work1.PicID as '图像编号', T_Work1.FieldName as '名称',T_Work1.Area as '坐标', T_Work1.FDT as '类型',T_Work1.InputRule as '规则',T_Work2.U1Value as '实际值' from T_batch inner join t_image on t_image.bid =(select T_batch.BID from T_batch where CID = '00001' and CTID = '001' ) inner join T_Work1 on T_Work1.bid =(select T_batch.BID from T_batch where CID = '00001' and CTID = '001' ) inner join T_Work2 on T_Work2.bid =(select T_batch.BID from T_batch where CID = '00001' and CTID = '001' ) where CID = '00001' and CTID = '001' and T_Work1.PICID = T_Image.PICID and T_Work2.WID = T_Work1.WID and T_Work1.FieldName like '%电话%'
select
a.CID as'客户号',
a.CTID as'客户作业号',
a.BID as'批次',
b.PIC as'完整图例',
c.PicID as'图像编号',
c.FieldName as'名称',
c.Area as'坐标',
c.FDT as'类型',
c.InputRule as'规则',
d.U1Value as'实际值'from
T_batch a
join
t_image b on b.BID=a.bid
join
T_Work1 c on c.bid=a.bid and c.PICID=b.PICID
join
T_Work2 d on d.bid=a.bid and d.WID=c.WID
where
a.CID ='00001'and a.CTID ='001'and c.FieldName like'%电话%'
select a.bid as 批次,a.cid as 客户号,a.ctid as 客户作业号,b.picid as 图像编号,b.pic as 完整图例,
c.fieldname as 名称,c.area as 坐标,c.fdt as 类型,c.inputrule as 规则, d.u1value as 实际值
from t_batch a innerjoin t_image b on a.bid=b.bid
innerjoin t_work1 on a.bid=c.bid
innerjoin t_work2 on a.bid=d.bid
where c.picid=b.picid and d.wid=c.wid