标签:
CREATE OR REPLACE VIEW V_SELECTGPSINFO AS select d.applyid, (select id from tb_sys_org where orgname=g.appointmentarea ) as orgid, --部门编号 g.appointmentarea as orgname, -- 部门 d.gpscode , --gps编号 g.acceptanceby, --安装人员 g.acceptancetime ,--安装时间 (select brand from tb_lm_gpsdepot where gpscode=d.gpscode) as brand ,--品牌 d.gpstype --设备类型 0无线 1有线 from tb_lm_gpsworkorderdetial d left join tb_lm_gpsworkorder g on g.id=d.gpsworkorderid ;
调用:select * from V_SelectGpsinfo where applyid={0} and gpscode=‘{1}‘
标签:
原文地址:http://www.cnblogs.com/jingyong001/p/5647497.html