Popular Posts
Join related table and count rows or sum sql server 2005 count rows: SELECT * FROM Table1 LEFT JOIN     (SELECT Level1ID, COUNT(Level2ID) AS Total FROM Table2 GROUP BY Level1ID) AS... Remove file not in list ADD ... THEN ... UNTIL ... data: begin of SERIES, N1 type I value 10, N2 type I value 20, N3 type I value 30, N4 type I value 40, ...
Stats
Internal Table: declare
types ARR type I occurs 10.                   " 定義長度為10的數值table/array

types: begin of CONTACT,                      " 定義CONTACT為work area, 並以CONTACT定義內表
         FIRST_NAME(15),
         LAST_NAME(15),
         EMAIL(30),
         TEL type N length 12,
       end of CONTACT,
       CTAB type CONTACT occurs 0.


data S1 type I occurs 10 with header line.    " 宣告包含header line(work area)的表變數
data S2 type I occurs 10.                     " 宣告無header line的表變數
data S3 type standard table of I.             " 取代舊occurs語法的宣告方式

data: begin of EMPLOYEE occurs 10,            " 宣告EMPLOYEE的表變數, 並定義其欄位
        FIRST_NAME(15),
        LAST_NAME(15),
        TEL type N length 12,
      end of EMPLOYEE.