码迷,mamicode.com
首页 > 数据库 > 详细

三个页面的相关数据库语句

时间:2015-05-29 20:04:55      阅读:227      评论:0      收藏:0      [点我收藏+]

标签:

客户信息:
select khbh as 客户编号,
khxm as 客户姓名 ,
(select shouji from lianxifangshi where bianma=a.khbh) as 联系电话,
gcdz as 施工地址,
lpmc as 楼盘名称,
jzmj as 面积,
(select mingcheng from initialize_per where code=a.khjl) as 客户经理,
(select shouji from lianxifangshi where bianma=a.khjl) as 客户经理手机,
(select mingcheng from initialize_per where code=a.sjs) as 设计师 ,
(select shouji from lianxifangshi where bianma=a.sjs) as 设计师手机 ,
(select mingcheng from initialize_per where code=a.zjsjs) as 主材设计师,
(select shouji from lianxifangshi where bianma=a.zjsjs) as 主材设计师手机,
(select mingcheng from initialize_per where code=a.xmjl) as 项目经理,
(select shouji from lianxifangshi where bianma=a.xmjl) as 项目经理手机,
(select mingcheng from initialize_per where code=(select xiangmujingli from paigongdan where khbh=a.khbh)) as 质检,
(select shouji from lianxifangshi where bianma=(select xiangmujingli from paigongdan where khbh=a.khbh))as 质检手机
from sell_khxx a where a.khbh=‘2011070000003‘


维修单
select khbh as 编号,
khxm as 姓名,
(select weixiurenyuan from gongchengweixiudan where khbh=a.khbh) as 维修人员,
(select paichushijian from gongchengweixiudan where khbh=a.khbh) as 维修时间,
(select weixiuneirong from gongchengweixiudan where khbh=a.khbh) as 维修内容,
(select shifoujiejue from gongchengweixiudan where khbh=a.khbh) as 是否解决
from sell_khxx a where a.khbh=‘2011070000001‘

保修单
select khbh as 编号,
khxm as 姓名,
(select shouji from lianxifangshi where bianma=a.khbh)as 联系方式,
gcdz as 地址,
(select mingcheng from initialize_per where code=a.khjl)as 客户经理,
(select mingcheng from initialize_per where code=a.sjs)as 设计师,
(select mingcheng from xcfzr where code=(select xcfzr_code from paigongdan where khbh=a.khbh)) as 施工负责人,
(select kstime from baoxiudan where khbh=a.khbh) as 开始时间,
(select jstime from baoxiudan where khbh=a.khbh) as 结束时间
from sell_khxx a where a.khbh=‘2011070000001‘

三个页面的相关数据库语句

标签:

原文地址:http://www.cnblogs.com/yisujian/p/4539260.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!