M
mar
I'd like to create a view that returns numbers 1 through 364. Ex:
NUMBER
1
2
3
.....
The only way that I know how to do this is by using UNION:
(SELECT 1 AS NUMBER UNION SELECT 2 AS NUMBER UNION SELECT 3 AS NUMBER)
AS ONETO364
But that means I'd have to create 364 unions. Is there a shorter
script for this? I'm trying to avoid creating a table and populating
it with 364 rows.
Thanks.
NUMBER
1
2
3
.....
The only way that I know how to do this is by using UNION:
(SELECT 1 AS NUMBER UNION SELECT 2 AS NUMBER UNION SELECT 3 AS NUMBER)
AS ONETO364
But that means I'd have to create 364 unions. Is there a shorter
script for this? I'm trying to avoid creating a table and populating
it with 364 rows.
Thanks.