DB2 executes the begin/end block in the dbvisualizer client

Note that the begin end code block needs to be added before the dbvisualizer executes --/ followed by a /

Note that the begin end code block needs to be added before the dbvisualizer executes --/ followed by a /

Note that the begin end code block needs to be added before the dbvisualizer executes --/ followed by a /

--Said important things three times (many coders can't execute because they didn't add it)

1  -- / Note that the begin end code block needs to be added before the dbvisualizer executes --/ and / 
2  BEGIN      
3       declare V_USERIDVALUE decimal ( 18 );         
 4       set V_USERIDVALUE =  3477 ;
 5       FOR V AS MYCURSOR CURSOR  FOR  SELECT  *    FROM BA_EMPLOYEELINFOTEMP_20180503BAK
 6       DO
 7          BEGIN              
8              set V_USERIDVALUE =   V_USERIDVALUE + 1 ;
 9              INSERT 
10                 INTO
11                     SYS_USER_20180502BAK
12                     (
13                         USERID,
14                         EPID,
15                         USERCODE,
16                         USERNAME,
17                         PASSWORD,
18                         LOGINCODE,
19                         LOGINFUNCTION,
20                         LOGINFUNCTIONNAME,
21                         LOGINERRCNT,
22                         EXECTASKID,
23                         SORTNO,
24                         ISVALID,
25                         MEMO,
26                         ISONDUTY,
27                         PHONE,
28                         EMAIL,
29                         BTPASSWORD,
30                         REACCOUNT
31                     )
32                     VALUES
33                     (
34                         V_USERIDVALUE,
35                         V.EPID,
36                         V.EPCODE,
37                         V.EPNAME,
38                         'B1:40:2F:CF:BD:1D:92:05',
39                         V.LOGIN_NAME,
40                         '',
41                         '',
42                         0,
43                         NULL,
44                         NULL,
45                         1,
46                         '',
47                         NULL,
48                         NULL,
49                         NULL,
50                         NULL,
51                         NULL
52                     );
53         END;
54      END FOR;
55 END
56 / Note that the begin end code block must be added before the dbvisualizer executes --/ followed by a /

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325536965&siteId=291194637
db2
db2