SY系统数据导出说明

一.导出方案

1.1 选择数据库-->数据右键-->任务-->导入数据

1.2 选择“下一步”

1.3 选择数据源

数据库选择对应需要导出的数据库名称

1.4 选择导出目标

1.5 点击“浏览”选择文件保存类型

记录好保存的位置

1.6 选好了直接下一步

1.7 选择要导出的表或者视图

1.8 输入导出语句

sql语句输入导出脚本的相关语句即可

ST系统

ST会员导出脚本
select a.CustomerName as '会员姓名', a.RelationPhone as '联系电话', a.Sex as '性别', a.BirthDate as '公历生日', b.GradeName as '会员等级', a.PaperType as '证件类型', a.PaperNumber as '证件号码', case a. status when 0 then '启用' when 1 then '停用' when 2 then '挂失' else '未知' end as '卡状态', a.CustomerID as '会员卡号', a.CardNum as '物理卡号', a.EndDate as '有效期', a.CreateDate as '建卡时间', a.MemberAccountTotal as '消费合计', a.MemberAccountBalance as '剩余金额', a.TotalIntegral as '累计积分', a.CardIntegral as '剩余积分', a.remark as '备注' from KTV_TBL_Customer a join BL_TBL_MemberGrade b on a.GradeID=b.GradeID

JT系统

JT包厢导出脚本
select roomname as '包厢名称', roomip as '包厢IP', case g.status when 0 then '是' else '否' end as '状态', areaname as '区域', roompricesortname '类型', case f.pricetype when 0 then '大厅价' when 1 then '包厢价' when 2 then '会员价' when 4 then 'VIP价' when 5 then 'A类价' when 6 then 'B类价' else '' end '商品价格', roomthemename from ktv_tbl_room a join ktv_tbl_area b on a.areaid = b.areaid join bl_tbl_roomthemeset c on a.roomthemeid = c.roomthemeid join bl_tbl_roominfo_add g on g.roomid = a.roomid join BL_TBL_RoomPriceSort f on f.roompricesortid = g.roompricesortid where g.status <> 2 order by a.roomid
JT会员导出脚本
select a.CustomerName as '会员姓名', a.RelationPhone as '联系电话', a.Sex as '性别', a.BirthDate as '公历生日', b.GradeName as '会员等级', a.PaperType as '证件类型', a.PaperNumber as '证件号码', case a. status when 0 then '启用' when 1 then '停用' when 2 then '挂失' else '未知' end as '卡状态', a.CustomerID as '会员卡号', a.CardNum as '物理卡号', a.CardUseLimitDate as '有效期', a.CreateDate as '建卡时间', a.MemberAccountTotal as '消费合计', a.MemberAccountBalance as '剩余金额', a.TotalIntegral as '累计积分', a.CardIntegral as '剩余积分', a.remark as '备注' from KTV_TBL_Customer a join BL_TBL_MemberGrade b on a.GradeID=b.GradeID
JT寄存导出脚本
SELECT A.ConsignationVoucher AS N'寄存单号', A.ClientName AS N'客人姓名', A.ClientTelephone AS N'联系电话', A.HappenDate '寄存日期', b.RoomName '包厢名称', d.StorageName N'仓库名称' , cc.MaterName AS N'商品名称', CAST(bb.OperationNumber + IsNull(bb.DrawNumber, 0) + IsNull(bb.StoreNumber, 0) AS NVARCHAR) AS N'剩余数量', CONVERT(NVARCHAR(10), bb.EndDate, 120) AS N'过期时间', bb.DetailType AS N'寄存类型', bb.DetailRemark AS N'备注' FROM BL_TBL_Consignation a join BL_TBL_Consignation_Detail bb on a.Consignationid = bb.Consignationid and bb.GoodsSign in (0,2) JOIN BL_TBL_MaterialCode cc ON bb.WineMaterialID = cc.WineMaterialID left join (select RoomID,RoomName,RoomSpellCode from KTV_TBL_Room) b on a.RoomID=b.RoomID left join BL_TBL_StorageUnit D on A.StorageUnitID = d.StorageUnitID order by bb.EndDate asc

YT系统

YT包厢信息导出脚本
select RoomName as '名称', AreaName as '区域', RoomTypeName as '类型', ip as 'ip', RoomCharge as '包厢价', HourCharge as '钟点费', LownessCharge as '最低消费' from BL_V_AllRoomInfo where Status=0 order by RoomID
YT人员导出脚本
select StaffName as '姓名', Sex as '性别',/*性别*/ DeptName as '部门', case a.StaffType when '1' then '总经理' when '2' then '销售经理' when '3' then '包房公主' when '4' then '传菜员(吧仔)' when '5' then '迎宾员' when '6' then '清洁员(PA)' when '7' then '公关小姐' when '8' then '模特' when '9' then 'Dj服务员' when '10'then '保安' when '11'then '公关组长' end as '职务', a.StaffCode as '帐号', Psw as '密码', d.StationName '菜单权限组', f.GroupName '业务权限组', a.StaffCard '物理卡号' from KTV_TBL_STAFF a left join BL_TBL_Staff_Add b on b.StaffID=a.StaffID left join KTV_TBL_DEPt c on c.DeptId=a.DeptId left join BL_TBL_Staff_Station d on d.StaffStationID=b.StaffStationID left join BL_TBL_chargePersonAccount e on e.StaffID=a.StaffID left join KTV_TBL_PopedomGroup f on f.GroupID=a.PopedomGroup where a.StaffStatus=0 and StaffType not in (7,8) and isUsed=0
YT公关/模特导出脚本
Select MStaffName as '姓名', MStaffCode as '编号', a.Sex as '性别',/*性别*/ groupname as '队伍', GradeName as '等级', c.Psw as '密码', a.ConnWay '联系电话', PaperType '证件类型', papernumber '证件号码', ShepingID as '物理卡号', Joindatetime as '入职时间' from BL_V_MStaffInfo a left join BL_TBL_Staff_Add b on a.mstaffid=b.staffid left join KTV_TBL_STAFF c on a.mstaffid=c.staffid Where c.StaffStatus=0 order by A.MStaffId
YT会员导出脚本
select a.CustomerName as '会员姓名', a.RelationPhone as '联系电话', a.Sex as '性别', a.BirthDate as '公历生日', b.GradeName as '会员等级', a.PaperType as '证件类型', a.PaperNumber as '证件号码', case a. status when 0 then '启用' when 1 then '停用' when 2 then '挂失' else '未知' end as '卡状态', a.CustomerID as '会员卡号', a.CardNum as '物理卡号', a.EndDate as '有效期', a.CreateDate as '建卡时间', a.MemberAccountTotal as '消费合计', a.MemberAccountBalance as '剩余金额', a.TotalIntegral as '累计积分', a.CardIntegral as '剩余积分', a.remark as '备注' from KTV_TBL_Customer a join BL_TBL_MemberGrade b on a.GradeID=b.GradeID

TY系统

TY会员导出脚本
select a.CustomerName as '会员姓名', a.TelePhone as '联系电话', a.Sex as '性别', a.BirthDate as '公历生日', a.LunarDate as '农历生日', b.GradeName as '会员等级', a.PaperType as '证件类型', a.PaperNumber as '证件号码', case a. status when 0 then '启用' when 1 then '停用' when 2 then '挂失' else '未知' end as '卡状态', a.CardNum as '会员卡号', a.CardUID as '物理卡号', a.CardUseLimitDate as '有效期', a.CreateDateTime as '建卡时间', c.AccountTotal as '消费合计', c.AccountBalance as '余额', c.AccountCash as '本金余额', c.AccountPresent as '赠送余额', c.TotalIntegral as '累计积分', c.CardIntegral as '剩余积分', a.remark as '备注' from BL_TBL_Customer a join BL_TBL_MemberGrade b on a.GradeID=b.GradeID join BL_TBL_CardAccount c on a.GuestID=c.GuestID

1.9 下一步

1.10 “完成”

1.11 导出成功

  
0 0