質問編集履歴
3
質問内容の更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -49,3 +49,95 @@
|
|
49
49
|
|
50
50
|
|
51
51
|
上記、方法論で実装可能か検討中となります
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
※開発中のpl/sql
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
```ここに言語を入力
|
62
|
+
|
63
|
+
DECLARE W_BANGOU varchar(50)
|
64
|
+
|
65
|
+
DECLARE W_NUM varchar(50)
|
66
|
+
|
67
|
+
DECLARE W_STR varchar(50)
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
DECLARE CUR_AAA CURSOR FOR
|
72
|
+
|
73
|
+
SELECT A1.BANGOU
|
74
|
+
|
75
|
+
,A1.NUM
|
76
|
+
|
77
|
+
,A1.STR
|
78
|
+
|
79
|
+
FROM INPUT_TEST_001 A1
|
80
|
+
|
81
|
+
INNER JOIN INPUT_TEST_002 B1
|
82
|
+
|
83
|
+
WHERE A1.NUM = B1.NUM
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
OPEN CUR_001;
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
FETCH NEXT FROM CUR_AAA
|
92
|
+
|
93
|
+
INTO W_BANGOU,W_NUM,W_STR;
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
WHILE @@FETCH_STATUS = 0
|
98
|
+
|
99
|
+
BEGIN
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
INSERT INTO INPUT_TEST_003
|
104
|
+
|
105
|
+
VALUES (
|
106
|
+
|
107
|
+
W_BANGOU
|
108
|
+
|
109
|
+
,W_NUM
|
110
|
+
|
111
|
+
,W_STR
|
112
|
+
|
113
|
+
)
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
FETCH NEXT FROM CUR_AAA
|
120
|
+
|
121
|
+
INTO W_BANGOU,W_NUM,W_STR;
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
END
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
CLOSE CUR_001;
|
130
|
+
|
131
|
+
DEALLOCATE CUR_001;
|
132
|
+
|
133
|
+
```
|
134
|
+
|
135
|
+
※実行結果
|
136
|
+
|
137
|
+
```ここに言語を入力
|
138
|
+
|
139
|
+
SQL> @C:\Users\xxxx\Desktop\embulk\CURSOR_test_002.sql
|
140
|
+
|
141
|
+
36
|
142
|
+
|
143
|
+
```
|
2
質問内容更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,6 +16,10 @@
|
|
16
16
|
|
17
17
|
⇒以下のようなSQLを使ってみる
|
18
18
|
|
19
|
+
|
20
|
+
|
21
|
+
```ここに言語を入力
|
22
|
+
|
19
23
|
select
|
20
24
|
|
21
25
|
A1.BANGOU,A1.NUM,A1.STR,A1.DT
|
@@ -27,6 +31,8 @@
|
|
27
31
|
where
|
28
32
|
|
29
33
|
A1.NUM = B1.NUM;
|
34
|
+
|
35
|
+
```
|
30
36
|
|
31
37
|
|
32
38
|
|
1
質問内容更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -39,3 +39,7 @@
|
|
39
39
|
|
40
40
|
|
41
41
|
➂embulkでBigQueryにバルクインサート
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
上記、方法論で実装可能か検討中となります
|