公司用到的便利SQL
Posted 咖啡无眠的随笔
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了公司用到的便利SQL相关的知识,希望对你有一定的参考价值。
--查询流程的相关信息
select fnr.FNRID,fn.FNID,fnr.MainState,fn.FNName,fn.FNStateName from TFlowNodeRoperty fnr
left join TFlowNodes fn on fnr.FNID = fn.FNID
where fnr.FBID=11
--更新操作日志
update TOperationLog set ip=‘10.16.4.154‘,UserName=‘系统管理员‘,UserID=1 where id in ( select top 80 id from TOperationLog where ip=‘10.16.4.165‘ order by id desc)
--TGridColumn表更新
--select * from TGridColumn where GridID=‘GridOrderItem-FNR299‘
declare @GridID nvarchar(50) --GridID
set @GridID=‘GridOrderItem-FNR310‘
update TGridColumn set HeaderText=‘产品类型‘,ColumnNumber=20 where GridID=@GridID and DataField=‘Pro_title‘
update TGridColumn set HeaderText=‘产品型号‘,ColumnNumber=30 where GridID=@GridID and DataField=‘Pro_model‘
update TGridColumn set HeaderText=‘产品规格‘,ColumnNumber=40 where GridID=@GridID and DataField=‘Pro_specs‘
update TGridColumn set HeaderText=‘料号‘,ColumnNumber=50 where GridID=@GridID and DataField=‘Pro_code‘
update TGridColumn set HeaderText=‘单位‘,ColumnNumber=60 where GridID=@GridID and DataField=‘Pro_unit‘
update TGridColumn set HeaderText=‘台套数量‘,ColumnNumber=70 where GridID=@GridID and DataField=‘Pro_number‘
update TGridColumn set HeaderText=‘组数‘ ,ColumnNumber=80 ,IsOpen=1,ISEdit=1 where GridID=@GridID and DataField=‘Group_number‘
update TGridColumn set HeaderText=‘方案单元数‘ ,ColumnNumber=90 ,IsOpen=1,ISEdit=1 where GridID=@GridID and DataField=‘Unit_number‘
update TGridColumn set HeaderText=‘方案总单元数‘ ,ColumnNumber=100 ,IsOpen=1,ISEdit=1 where GridID=@GridID and DataField=‘SumUnit_number‘
update TGridColumn set HeaderText=‘综合台数‘ ,ColumnNumber=110 ,IsOpen=1,ISEdit=1 where GridID=@GridID and DataField=‘Syn_number‘
update TGridColumn set HeaderText=‘甲供物资‘ ,ColumnNumber=120 ,IsOpen=1,ISEdit=1,IsRequired=1 where GridID=@GridID and DataField=‘PartyAMaterials‘
update TGridColumn set HeaderText=‘空柜‘ ,ColumnNumber=130 ,IsOpen=1,ISEdit=1 ,IsRequired=1 where GridID=@GridID and DataField=‘EmptyBox‘
update TGridColumn set HeaderText=‘备用投微机‘ ,ColumnNumber=140 ,IsOpen=1,ISEdit=1 ,IsRequired=1 where GridID=@GridID and DataField=‘BackUpMicroComputer‘
update TGridColumn set HeaderText=‘DTU‘ ,ColumnNumber=150 ,IsOpen=1,ISEdit=1 ,IsRequired=1 where GridID=@GridID and DataField=‘DTU‘
update TGridColumn set HeaderText=‘备注‘ ,ColumnNumber=160 where GridID=@GridID and DataField=‘Pro_remark‘
以上是关于公司用到的便利SQL的主要内容,如果未能解决你的问题,请参考以下文章