经典模式

简洁实用,快捷灵活

当前位置:首页>平台开发>经典模式
全部 1208 平台特色 8 经典模式 77 流行模式 108 技术论坛 1014 经典视频 1

单机升迁到网络版做的一些工作

时间:2022-05-07   访问量:1211

下面说一下单价版升迁网络版应该修改的地方:

    1,日期字段:应将  #日期#  替换为  '日期'

    2,取当前时间函数应将 date() 换为 getdate(),但应注意的是 getdate()函数返回的是日期+时间,如果只取日期值,应用 left(getdate(),10)

    3,update语句如果涉及多个表格 ,应将单机版语句

           update 表1 inner join 表2 on 表1.关联字段=表2.   关联字段 set ....

         替换为

            update 表1 set 表1.字段=... from 表1,表2 where on 表1.关联字段=表2.关联字段

    4,网络版应使用单引号包含文本,而不能使用双引号

          即 应使用 select * from 表 where 字段='abc'

             而不能用 select * from 表 where 字段="abc"


    5,网络版删除记录应用 

          delete from 表 where ...

        不能用

          delete * from 表

    6, 网络版不能用iif 用 case when then 

  例如:单机版:select  iif (A.ID is null,'0001',right ('1000'& A.ID,4)) as 编号

from (select max (right(客户编号,4))+1  as ID

from 钟点工客户 ) as A

 

         网络版:select  (case when a.id is null then '0001' else right ('10000'+ a.id,4) end )  as 编号

from (select max (right(客户编号,4))+1  as id

from 钟点工客户 ) as a


      7.自动生成编号  select 'GZ' + cast (year(getdate()) as varchar(4))+right(100+month(getdate()),2)+

right(100+day(getdate()),2)+

right(str(1000+(case when A.ID is null then '1' else A.ID end)),3) as 收款编号

from (select cast(right(max(收款编号),8) as int)+1 as ID from 财务收款

where right(left(收款编号,10),8)=cast(year(getdate()) as varchar(4))+right('0'+cast(month(getdate()) as varchar(2)),2)+ right('0' + cast(day(getdate()) as varchar(2)),2)) as A

     8.有中间表的 

  update 备件库存 set 备件库存.入库数量=临时表.数量 from 备件库存,

(select 备件入库.备件编号,sum(备件入库.入库数量) as 数量

from 备件入库

group by 备件入库.备件编号) as 临时表 where 临时表.备件编号=备件库存.备件编号

    9.网络验证为空 select 1 where :字段 is null or :字段=''

    10  .网络计算总金额

 select (case when sum(金额) is null then 0 else sum(金额) end )  as 发货总额

from 发货登记从表

where 发货编号=':发货编号'.


上一篇:《人事信息管理系统》疑难解答

下一篇:网络版系统安装问题的解决办法

发表评论:

评论记录:

未查询到任何数据!

在线咨询

点击这里给我发消息 售前咨询专员

点击这里给我发消息 售后服务专员

在线咨询

免费通话

24小时免费咨询

请输入您的联系电话,座机请加区号

免费通话

微信扫一扫

微信联系
返回顶部
备案号码:鲁ICP备09000001号-2