思迅商云出入库明细有数据,查不到库存

server/2024/10/18 19:48:17/

请备份数据库执行修复机构价格表后查询:
--总部
use hbposv8
go
insert into t_pc_branch_price (branch_no,item_no,supcust_no,sale_way,price, 
base_price,sale_price,vip_price,sup_ly_rate,branch_price,branch_sale,com_flag,item_stock,base_price1,base_price2,base_price3,base_price4)
Select b.branch_no,item_no,main_supcust,item_sup_flag,(case b.trade_type when '2' then a.trans_price else a.price end),
base_price,sale_price,vip_price,sup_ly_rate,branch_price,'1','0',item_stock,base_price1,base_price2,base_price3,base_price4
From t_bd_item_info a,t_bd_branch_info b
Where b.property in ('0','1') 
And b.branch_no+item_no not in (select c.branch_no+c.item_no from t_pc_branch_price c
     where c.branch_no=b.branch_no and c.item_no = a.item_no)
go
--分部
use hbposv8_branch
go
insert into t_pc_branch_price (branch_no,item_no,supcust_no,sale_way,price, 
base_price,sale_price,vip_price,sup_ly_rate,branch_price,branch_sale,com_flag,item_stock,base_price1,base_price2,base_price3,base_price4)
Select b.branch_no,item_no,main_supcust,item_sup_flag,(case b.trade_type when '2' then a.trans_price else a.price end),
base_price,sale_price,vip_price,sup_ly_rate,branch_price,'1','0',item_stock,base_price1,base_price2,base_price3,base_price4
From t_bd_item_info a,t_bd_branch_info b
Where b.property= '1' 
And b.branch_no+item_no not in (select c.branch_no+c.item_no from t_pc_branch_price c
     where c.branch_no=b.branch_no and c.item_no = a.item_no)
go


http://www.ppmy.cn/server/132848.html

相关文章

你们还在用8位单片机吗?

以前做过挺多8位机的,51内核的产品,比如楼层刷卡器用的STC的,还有计量产品,里面也是51内核计量单元等集成的SOC芯片。 类似的太多了,比如TI早期的Zigbee芯片,蓝牙芯片,很多都是8位的51内核。 8位…

MySQL【知识改变命运】04

复习: 1:CURD 1.1Create (创建) 语法: insert [into] 表名 [column[,column]] valuse(value_list)[,vaule_list]... value_list:value,[value]...创建一个实例表: 1.1.1单⾏数据全列插⼊ values_l…

【JVM】原理篇

1 栈上的数据存储 在Java中有8大基本数据类型: 这里的内存占用,指的是堆上或者数组中内存分配的空间大小,栈上的实现更加复杂。 以基础篇的这段代码为例: Java中的8大数据类型在虚拟机中的实现: boolean、byte、char、…

yub‘s Algorithmic Adventures_Day9

两数之和 link:1. 两数之和 - 力扣(LeetCode) 思路分析 看到题目描述首先想到用两层for循环解决问题. 分别从i位置和j(i1)位置开始相加遍历判断. 注意不越界条件 数组 class Solution {public int[] twoSum(int[] nums, int target) {//…

华为OD机试真题-数组连续和-2024年OD统一考试(E卷)

最新华为OD机试考点合集:华为OD机试2024年真题题库(E卷+D卷+C卷)_华为od机试题库-CSDN博客 每一题都含有详细的解题思路和代码注释,精编c++、JAVA、Python三种语言解法。帮助每一位考生轻松、高效刷题。订阅后永久可看,持续跟新 题目描述 给定一个含有N个正整数的数…

能源设施安全智能守护:AI监控卫士在油气与电力领域的应用

能源行业的安全与稳定运行对于社会的可持续发展至关重要,无论是石油、天然气还是电力设施,都面临着复杂的监测需求。思通数科推出的AI视频监控卫士,通过应用先进的人工智能技术,为能源行业的安全监测提供了高效、智能的解决方案。…

C++初阶学习第七弹——string的模拟实现

C初阶学习第六弹------标准库中的string类_c语言返回string-CSDN博客 通过上篇我们已经学习到了string类的基本使用,这里我们就试着模拟实现一些,我们主要实现一些常用到的函数。 目录 一、string类的构造 二、string类的拷贝构造 三、string类的析构函…

【专题】关系数据库标准语言SQL

1. SQL语言介绍 SQL(Structured Query Language)是结构化查询语言,它是一种在关系数据库中定义和操纵数据的标准语言,是用户与数据库之间进行交流的接口。 1.1 SQL数据库的体系结构 使用SQL关系数据库的特点: SQL用户可以是应用程序&#xf…