Subject | RE: [firebird-support] Number list without table |
---|---|
Author | Leyne, Sean |
Post date | 2013-07-25T18:53:26Z |
Piotr
StartNumber Integer,
EndNumber Integer
) RETURNS (
List_of_Numbers Integer
) AS
BEGIN
List_of_Numbers = StartNumber;
WHILE (List_Of_Numbers <= EndNumber) DO BEGIN
Suspend;
List_Of_Numbers = List_Of_Numbers + 1;
END
END
> I need to get list of number (f.e 1,2,3,4,5) as rows but using only SQL queryEXECUTE BLOCK (
> (without extra table or view).
>
> Something what after running query looks like:
>
> List_of_numbers
>
> -----------------------
>
> 1
> 2
> 3
> 4
> 5
>
> Any ideas??
>
StartNumber Integer,
EndNumber Integer
) RETURNS (
List_of_Numbers Integer
) AS
BEGIN
List_of_Numbers = StartNumber;
WHILE (List_Of_Numbers <= EndNumber) DO BEGIN
Suspend;
List_Of_Numbers = List_Of_Numbers + 1;
END
END