Home > database >  Consolidation line data window
Consolidation line data window

Time:09-19


Are too many in number of assets in the same large number (so the single Q20130003), acquire the same date, the same unit, best can display and print the merger, and mergers and merger can choose, such as: the single merged into 1 records, asset number is shown as large number Q20130003, number 2, the figure of compute number

CodePudding user response:

With group by in SQL processing, to achieve, grouped according to need, merging can be realized

CodePudding user response:

In the dw group subtotal is used

CodePudding user response:

refer to the second floor lsh370190322 response:
in dw by grouping subtotal

How to achieve specific

CodePudding user response:

reference 1st floor lzp_lrp response:
in SQL processing, using group by, grouped according to need, can implement merge

And more fields in SQL, specific how to realize the group by

CodePudding user response:

U010463335
reference 4 floor response:
Quote: refer to 1st floor lzp_lrp response:

With group by in SQL processing, to achieve, grouped according to need, can implement merge

And more fields in SQL, specific how to realize the group by

You have SQL complete post, you show your analysis

CodePudding user response:

Select the asset number, the sum (value of the asset)
From the table
Group by asset tag

If you need more fields group, refer to the above SQL

CodePudding user response:

reference 5 floor Dersak reply:
Quote: refer to 4th floor u010463335 response:

Quote: refer to 1st floor lzp_lrp response:

With group by in SQL processing, to achieve, grouped according to need, can implement merge

And more fields in SQL, specific how to realize the group by

You have SQL complete post, you show your analysis

SELECT "ZC_TPD". "TPD_ID,"
"ZC_TPD". "TPDH",
"ZC_TPD". "KS_ID",
"ZC_TPD". "SBYT",
"ZC_TPD". "GXRQ",
"ZC_TPD". "TPRQ",
"ZC_TPD". "ZT,"
"ZC_TPD". "LRR,"
"ZC_TPD". "TPR,"
"ZC_TPD". "XH,"
"ZC_TPD". "ZBXH",
"ZC_TPD". "BZ,"
"ZC_TPD". "TPLX",
"ZC_ZCZD". "DW",
"ZC_ZCZD". "MC" | | '/' | | "ZC_ZCZD". "GG" | | '/' | | "ZC_ZCZD". "CD" as the name,
"ZC_ZB". "ZCXH",
"ZC_ZB". "ZCBH",
"ZC_ZB". "ZCYZ",
"ZC_ZB". "TZRQ",
0 as bj,
"' as gys,
"ZC_ZB". "WLDW_ID",
Substr (" ZC_ZB ". "ZCBH", 1, 9) as bh,
"ZC_TPD". "second life"
FROM "ZC_TPD,"
"ZC_ZB,"
"ZC_ZCZD
"The WHERE (" ZC_ZB ". "ZC_ID"="ZC_ZCZD". "ZC_ID") and
(" ZC_TPD ". "ZBXH"="ZC_ZB". "ZBXH") and
(" ZC_TPD ". "TPD_ID=" : a)

CodePudding user response:

refer to 6th floor lzp_lrp response:
select asset number, the sum (value of the asset)
From the table
Group by asset tag

If you need more fields group, refer to the above SQL

Major grouping is only need the same number, acquire the same date, the same unit, and then sum quantity and amount for line, but not only that, select the following fields nearly more than 20 fields,

CodePudding user response:

refer to the eighth floor u010463335 response:
Quote: refer to the sixth floor lzp_lrp response:

Select the asset number, the sum (value of the asset)
From the table
Group by asset tag

If you need more fields group, refer to the above SQL

Main grouping is only need the same number, acquire the same date, the same unit, and then sum quantity and amount for line, but not only that, select the following fields nearly more than 20 fields,


If using group by the trouble, you can manually merge, combine the same data together and then delete the second row data can also achieve this effect

CodePudding user response:

references 9 f lzp_lrp response:
Quote: refer to the eighth floor u010463335 response:

Quote: refer to the sixth floor lzp_lrp response:

Select the asset number, the sum (value of the asset)
From the table
Group by asset tag

If you need more fields group, refer to the above SQL

Main grouping is only need the same number, acquire the same date, the same unit, and then sum quantity and amount for line, but not only that, select the following fields nearly more than 20 fields,


If using group by the trouble, you can manually merge, combine the same data together and then delete the second row data also can achieve the effect

Specific how should do, as a beginner is not very understanding, can you give an example?

CodePudding user response:

The
references to the tenth floor u010463335 response:
specific how should do, as a beginner is not very understanding, can you give an example?



Long ll_row, ll_find
String ls_ asset tag
Dec {2} ldc_ assets value
For ll_row=1 to dw_1. Rowcount ()
Ls_ asset number=dw_1. Getitemstring (ll_row, "assets no.")
Ldc_ assets value=dec (dw_1. Describe (" the evaluate (' the sum (the if (asset number=~ "" + number + ls_ assets" ~ ", the original value of the assets, 0) ', 1)))
Dw_1. Setitem (ll_row, "the original value of the assets," ldc_ assets value)
Ll_find=dw_1. Find (" asset number='" + number + ls_ assets "' ", ll_row + 1, dw_1, rowcount ()
The do while ll_find & gt; 0
Dw_1. Deleterow (ll_find)
Ll_find=dw_1. Find (" asset number='" + number + ls_ assets "' ", ll_row + 1, dw_1, rowcount ()
Loop
next

CodePudding user response:

11 references lzp_lrp response:
Quote: reference to the tenth floor u010463335 response:

Specific how should do, as a beginner is not very understanding, can you give an example?



Long ll_row, ll_find
String ls_ asset tag
Dec {2} ldc_ assets value
For ll_row=1 to dw_1. Rowcount ()
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related