0
我有以下SQL命令:SQLScript:標量類型是不允許
SELECT DFT(weighted, 32768 ORDER BY rel_id).REAL as four FROM :fith
現在我想用unnest
函數來分割結果。因此我需要將結果保存在一個變量中。
以下命令將引發一個錯誤:
my_array = SELECT DFT(weighted, 32768 ORDER BY rel_id).REAL as four FROM :fith;
===> invalid datatype: Column FOUR of table variable MY_ARRAY has an unsupported data type (ARRAY)
好吧好吧......我my_array
宣佈後到一個數組,我得到這個錯誤:
declare my_array double array;
my_array = SELECT DFT(weighted, 32768 ORDER BY rel_id).REAL as four FROM :fith;
==>scalar type is not allowed: MY_ARRAY:
爲什麼我想要通過這樣的彎路來做到這一點? 該文檔說:
The UNNEST function cannot be referenced directly in a FROM clause of a SELECT statement
什麼錯了?我現在能做什麼?