rsd.sql

来自「将excel格式的文件销售订单导入数据库中」· SQL 代码 · 共 15 行

SQL
15
字号
SELECT rdrecord.ddate,rdrecord.cdefine12 as cCusname,rdrecord.ccuscode,RdRecord.cWhCode as cWhCode,RdRecords.cInvCode as cInvCode,   
sum((case when RdRecords.iQuantity is null then 0 else RdRecords.iQuantity end)*(case when RdRecord.bRdFlag < 1 then -1 else 1 end)) as qichusl  
FROM RdRecord,RdRecords  
WHERE ( RdRecords.ID = RdRecord.ID ) and RdRecord.cvouchtype='34' and cwhcode in('11','12','13','14')
group by rdrecord.cdefine12,RdRecord.cWhCode,RdRecords.cInvCode,rdrecord.ccuscode,rdrecord.ddate

drop table  #temp1

select * from rdrecord where ccuscode is null and cdefine12 is null and cwhcode in('11','12','13','14') and cvouchtype='34'
select distinct cvouchtype from rdrecord where ccuscode is null and cdefine12 is null
select * from rdrecord where cdefine12 is null and ccuscode is  null and brdflag=0 and cwhcode in('11','12','13','14')
select * from vouchtype
select * from warehouse

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?