Member management memo

Source: Internet
Author: User
Tags date1
W_sunpos_hygl_5 members maintain and query the source code in hlj. Modify sun_public_object.pbl to the user's input card number.
The cashier part is in the kfp code.

Sales ranking

If exists (select * From DBO. sysobjects where id = object_id (n' [DBO]. [getsalessort] ') and objectproperty (ID, n' isprocedure') = 1)
Drop procedure [DBO]. [getsalessort]
Go

Set quoted_identifier off
Go
Set ansi_nulls off
Go

Create procedure getsalessort (@ date1 datetime, @ date2 datetime)
-- Sales within a period of time
Select nbbm, sum (Case BZ when 1 then-1 else 1 end) * sl * zyts) as SL into # time_sale from sun_pos_cymx where czrq> = '2017-05-01 'and czrq <= '2017-05-30' group by nbbm
-- Select * from # time_sale

-- Last supply, purchase, and other information
Select nbbm, 0 as xssl, bzdj, DW, ''as lxfs, lsj, lsj-bzdj as LL, djbh into # last_stock from zy_yp1_sfmx A where. cfbj = 'T' and left (. DW, 1) <> '9' and. jzrq = (select max (B. jzrq) from zy_yp1_sfmx B where B. cfbj = 'T' and left (B. DW, 1) <> '9' and. nbbm = B. nbbm)
Update # last_stock set xssl = B. SL from # last_stock A, # time_sale B where a. nbbm = B. nbbm
Select. GBM,. ypm,. GG,. CD,. zxdw, B. lsj, B. xssl, B. bzdj, B. DW, (select dmmc from zy_sys2_cgdw c Where C. dm = B. DW) as dwmc, (select lxfs from zy_sys2_cgdw c Where C. dm = B. DW) as lxfs, B. ll, B. djbh from zy_sys2_ypzdk A, # last_stock B where. nbbm = B. nbbm
Drop table # last_stock
Drop table # time_sale
Go
Set quoted_identifier off
Go
Set ansi_nulls on
Go

-- Report
$ Pbexportheader $ dw_sales_sort.srd
$ Pbexportcomments $ sales ranking
Release 6;
Datawindow (Units = 0 timer_interval = 0 color = 16777215 Processing = 1 print.doc umentname = "" print. orientation = 0 print. margin. left = 110 print. margin. right = 110 print. margin. top = 96 print. margin. bottom = 96 print. paper. source = 0 print. paper. size = 0 print. prompt = no print. buttons = no print. preview. buttons = no grid. lines = 0)
Header (Height = 92 color = "536870912 ")
Summary (Height = 0 color = "536870912 ")
Footer (Height = 0 color = "536870912 ")
Detail (Height = 96 color = "536870912 ")
Table (column = (type = char (20) updatewhereclause = no name = GBM dbname = "GBM ")
Column = (type = char (32) updatewhereclause = no name = ypm dbname = "ypm ")
Column = (type = char (20) updatewhereclause = no name = Gg dbname = "GG ")
Column = (type = char (8) updatewhereclause = no name = CD dbname = "cd ")
Column = (type = char (4) updatewhereclause = no name = zxdw dbname = "zxdw ")
Column = (type = Number updatewhereclause = no name = lsj dbname = "lsj ")
Column = (type = Number updatewhereclause = no name = xssl dbname = "xssl ")
Column = (type = Number updatewhereclause = no name = bzdj dbname = "bzdj ")
Column = (type = char (10) updatewhereclause = no name = DW dbname = "DW ")
Column = (type = char (40) updatewhereclause = no name = dwmc dbname = "dwmc ")
Column = (type = char (20) updatewhereclause = no name = lxfs dbname = "lxfs ")
Column = (type = Number updatewhereclause = no name = ll dbname = "ll ")
Column = (type = char (20) updatewhereclause = no name = djbh dbname = "djbh ")
Procedure = "1 execute DBO. getsalessort; 1 @ date1 =: date1, @ date2 =: date2 "arguments = (" date1 ", string), (" date2 ", string )))
Text (band = header alignment = "0" text = "Sn" border = "0" color = "0" x = "9" Y = "8" Height = "80" width = "137" name = rowid_t font. face = "" font. height = "-11" font. weight = "400" font. family = "0" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Text (band = header alignment = "2" text = "encoding" border = "0" color = "0" x = "155" Y = "8" Height = "80" width = "361" name = gbm_t font. face = "" font. height = "-11" font. weight = "400" font. family = "0" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Text (band = header alignment = "2" text = "name" border = "0" color = "0" x = "526" Y = "8" Height = "80" width = "1024" name = ypm_t font. face = "" font. height = "-11" font. weight = "400" font. family = "0" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Text (band = header alignment = "2" text = "" border = "0" color = "0" x = "1559" Y = "8" Height = "80" width = "553" name = gg_t font. face = "" font. height = "-11" font. weight = "400" font. family = "0" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Text (band = header alignment = "2" text = "Origin" border = "0" color = "0" x = "2121" Y = "8" Height = "80" width = "293" name = cd_t font. face = "" font. height = "-11" font. weight = "400" font. family = "0" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Text (band = header alignment = "2" text = "unit" border = "0" color = "0" x = "2423" Y = "8" Height = "80" width = "155" name = zxdw_t font. face = "" font. height = "-11" font. weight = "400" font. family = "0" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Text (band = header alignment = "2" text = "zero price" border = "0" color = "0" x = "2587" Y = "8" Height = "80 "width =" 251 "name = lsj_t font. face = "" font. height = "-11" font. weight = "400" font. family = "0" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Text (band = header alignment = "2" text = "final price" border = "0" color = "0" x = "2848" Y = "8" Height = "80 "width =" 315 "name = bzdj_t font. face = "" font. height = "-11" font. weight = "400" font. family = "0" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Text (band = header alignment = "2" text = "number of sales segments" border = "0" color = "0" x = "3173" Y = "8" Height =" 80 "width =" 361 "name = xssl_t font. face = "" font. height = "-11" font. weight = "400" font. family = "0" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Text (band = header alignment = "2" text = "Interest Rate" border = "0" color = "0" x = "3543" Y = "8" Height = "80" width = "251" name = ll_t font. face = "" font. height = "-11" font. weight = "400" font. family = "0" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Text (band = header alignment = "2" text = "" border = "0" color = "0" x = "3803" Y = "8" Height = "80 "width =" 1280 "name = dwmc_t font. face = "" font. height = "-11" font. weight = "400" font. family = "0" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Text (band = header alignment = "2" text = "Contact Information" border = "0" color = "0" x = "5093" Y = "8" Height = "80 "width =" 640 "name = lxfs_t font. face = "" font. height = "-11" font. weight = "400" font. family = "0" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Text (band = header alignment = "2" text = "last document" border = "0" color = "0" x = "5742" Y = "8" Height = "80 "width =" 530 "name = djbh_t font. face = "" font. height = "-11" font. weight = "400" font. family = "0" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Compute (band = detail alignment = "0" expression = "getrow () "Border =" 0 "color =" 0 "x =" 9 "Y =" 4 "Height =" 88 "width =" 137 "format =" [general] "name = rowid font. face = "" font. height = "-11" font. weight = "400" font. family = "0" font. pitch = "2" font. charset = "134" background. mode = "2" background. color = "16777215 ")
Column (band = detail id = 1 alignment = "0" tabsequence = 10 border = "0" color = "0" x = "155" Y = "4" Height = "88 "width =" 361 "format =" [general] "name = GBM edit. limit = 0 edit. case = any edit. focusrectangle = No edit. autoselect = Yes edit. autohscroll = Yes font. face = "" font. height = "-11" font. weight = "400" font. family = "2" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Column (band = detail id = 2 alignment = "0" tabsequence = 20 border = "0" color = "0" x = "526" Y = "4" Height = "88 "width =" 1024 "format =" [general] "name = ypm edit. limit = 0 edit. case = any edit. focusrectangle = No edit. autoselect = Yes edit. autohscroll = Yes font. face = "" font. height = "-11" font. weight = "400" font. family = "2" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Column (band = detail id = 3 alignment = "0" tabsequence = 30 border = "0" color = "0" x = "1559" Y = "4" Height = "88 "width =" 553 "format =" [general] "name = Gg edit. limit = 0 edit. case = any edit. focusrectangle = No edit. autoselect = Yes edit. autohscroll = Yes font. face = "" font. height = "-11" font. weight = "400" font. family = "2" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Column (band = detail id = 4 alignment = "0" tabsequence = 40 border = "0" color = "0" x = "2121" Y = "4" Height = "88 "width =" 293 "format =" [general] "name = CD edit. limit = 0 edit. case = any edit. focusrectangle = No edit. autoselect = Yes edit. autohscroll = Yes font. face = "" font. height = "-11" font. weight = "400" font. family = "2" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Column (band = detail id = 5 Alignment = "0" tabsequence = 50 border = "0" color = "0" x = "2423" Y = "4" Height = "88 "width =" 155 "format =" [general] "name = zxdw edit. limit = 0 edit. case = any edit. focusrectangle = No edit. autoselect = Yes edit. autohscroll = Yes font. face = "" font. height = "-11" font. weight = "400" font. family = "2" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Column (band = detail id = 6 Alignment = "1" tabsequence = 60 border = "0" color = "0" x = "2587" Y = "4" Height = "88 "width =" 251 "format =" ### 0.00 "name = lsj edit. limit = 0 edit. case = any edit. focusrectangle = No edit. autoselect = Yes edit. autohscroll = Yes font. face = "" font. height = "-11" font. weight = "400" font. family = "2" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Column (band = detail id = 8 alignment = "1" tabsequence = 70 border = "0" color = "0" x = "2848" Y = "4" Height = "88 "width =" 315 "format =" ### 0.00 "name = bzdj edit. limit = 0 edit. case = any edit. focusrectangle = No edit. autoselect = Yes edit. autohscroll = Yes font. face = "" font. height = "-11" font. weight = "400" font. family = "2" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Column (band = detail id = 7 alignment = "1" tabsequence = 80 border = "0" color = "0" x = "3173" Y = "4" Height = "88 "width =" 361 "format =" ### 0.00 "name = xssl edit. limit = 0 edit. case = any edit. focusrectangle = No edit. autoselect = Yes edit. autohscroll = Yes font. face = "" font. height = "-11" font. weight = "400" font. family = "2" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Column (band = detail id = 12 alignment = "1" tabsequence = 90 border = "0" color = "0" x = "3543" Y = "4" Height = "88 "width =" 251 "format =" ### 0.00 "name = ll edit. limit = 0 edit. case = any edit. focusrectangle = No edit. autoselect = Yes edit. autohscroll = Yes font. face = "" font. height = "-11" font. weight = "400" font. family = "2" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Column (band = detail id = 10 Alignment = "0" tabsequence = 100 border = "0" color = "0" x = "3803" Y = "4" Height = "88 "width =" 1280 "format =" [general] "name = dwmc edit. limit = 0 edit. case = any edit. focusrectangle = No edit. autoselect = Yes edit. autohscroll = Yes font. face = "" font. height = "-11" font. weight = "400" font. family = "2" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Column (band = detail id = 11 alignment = "0" tabsequence = 110 border = "0" color = "0" x = "5093" Y = "4" Height = "88 "width =" 640 "format =" [general] "name = lxfs edit. limit = 0 edit. case = any edit. focusrectangle = No edit. autoselect = Yes edit. autohscroll = Yes font. face = "" font. height = "-11" font. weight = "400" font. family = "2" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Column (band = detail id = 13 alignment = "0" tabsequence = 120 border = "0" color = "0" x = "5742" Y = "4" Height = "88 "width =" 530 "format =" [general] "name = djbh edit. limit = 0 edit. case = any edit. focusrectangle = No edit. autoselect = Yes edit. autohscroll = Yes font. face = "" font. height = "-11" font. weight = "400" font. family = "2" font. pitch = "2" font. charset = "134" background. mode = "1" background. color = "536870912 ")
Htmltable (border = "1" cellpadding = "0" cellspacing = "0" generatecss = "no" nowrap = "yes ")

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.