Reputation: 11
I need to create data series with the value from 0 to 100 with a step of 0.1 Unfortunately, function generate_series() does not work with my database. does anyone know any other way to create a series like this? Thank you in advance.
Upvotes: 0
Views: 184
Reputation: 175726
One way is to use recursive cte:
WITH RECURSIVE CTE(c) AS (
VALUES (0.0)
UNION ALL
SELECT c + 0.1
FROM cte
WHERE c <= 100
)
SELECT *
FROM CTE;
Upvotes: 2