Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of various stores of digital products

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

/ / Store analysis report of digital products / /

BEGIN

-- SET NOCOUNT ON added to prevent extra result sets from

-- interfering with SELECT statements.

SET NOCOUNT ON

Create table # temp12 ([date] datetime, [Department Code] varchar, [Department name] varchar, [Commodity Code] varchar

[product name] varchar, [Brand] varchar, [quantity] int, [tax included] decimal (10L2)

[excluding tax amount] decimal (10jue 2), [cost] decimal (10jin2))

Insert into # temp12

Select t0.F_PBKA_DATE

T12.fnumber,t11.fname fname1,t2.FNUMBER,t3.FNAME,t2.F_PBKA_MOBILE_BRANK

Case when t0.FBILLTYPEIDES 57faf492b10d31' then sum (isnull (t1.FQTYPower0))

When t0.FBILLTYPEIDIUM 580778655b6d7d7d' then-sum (isnull (t1.FQTYPER0)) end FQTY

Case when t0.FBILLTYPEIDES 57faf492b10d31' then sum (isnull (t1.FSDJAMOUNT, 0))

When t0.FBILLTYPEIDEX 580778655b6d7d7d' then-sum (isnull (t1.FSDJAMOUNT, 0)) end including tax amount

Case when t0.FBILLTYPEIDES 57faf492b10d31' then sum (isnull (t1.F_PBKA_BHSAMOUNT, 0))

When t0.FBILLTYPEIDED end 580778655b6d7d' then-sum (isnull (t1.F_PBKA_BHSAMOUNT, 0)) end does not include tax amount, 0

From PBKA_t_BillHead t0

Inner join PBKA_t_GoodsDetail t1 on t0.fid=t1.fid

Left join t_bd_material t2 on t1.FMATERIALID=t2.FMATERIALID

Inner join T_BD_MATERIAL_L t3 on t1.FMATERIALID=t3.FMATERIALID and t3.FLOCALEID=2052

Inner join t_bd_material t9 on t3.FMATERIALID=t9.FMATERIALID

Join t_bd_department_l t11 on t0.FOLDDEPARTMENT=t11.FDEPTID

Join t_bd_department t12 on t11.FDEPTID=t12.FDEPTID

Where t12.fnumber like '203%'and t9.FNUMBER like' 03%'

And (convert (varchar (10), t0.FirstPBKANGDATERE21) > = '2017-03-01'

And convert (varchar (10), t0.FullPBKANGDAT 21) = '2017-03-01'

And convert (varchar (10), t0.fdatejol 21) = '2017-03-01'

And convert (varchar (10), t0.fdatere21)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report