on 2016 Dec 06 2:14 PM
Hi,
I want to use the function "DFT" in my stored procedure.
DFT is returning an array. How can I handle with the result?
The following query produce an error:
test = select dft(valll, 32768 order by dates).phase from :var5;
==> invalid datatype: Column DFT(valll,32768ORDERBYDATES) of table variable TEST has an unsupported data type (ARRAY)
After the declaration I'm getting this error:
declare test double array;test = select dft(valll, 32768 order by dates).phase from :var5;==>scalar type is not allowed: TEST:
I want to use the results of the DFT function.
I tried this one but this just returns 1024 items...
select
PHASE
from UNNEST(
(SELECT DFT(valll, 32768 ORDER BY dates).PHASE FROM :var5)
) AS UNNESTED_DFT("PHASE");
Thanks!
Tobias
Hello Tobias,
your last statement is the correct one. As you asked in another question UNNEST has no limitation.
In which evironment do you execute the statement? In the SQL console or somewhere else?
Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for the two threads...
We are using the HCP. The Database has the version 1.00.122.04.1478575636.
I'm execute the SQL in Hana Studio and in my xsjs project too. With the same result.
Tobias
Edit: This SQL works... but as you can see, it is not very nice and I have to use a loop to go through all 32K items...
select
*
from
unnest((
select subarray(wert, 1, 1024)
from((
select
dft(value, 32768 order by id).amplitude as wert
from "XXYYZZ"."TEST"
))
)) as unnested(amplitude);
User | Count |
---|---|
81 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.