I want inverted triangle using teradata sql. I have written below recursive query and getting the output. But i want to print inverted triangle using stored procedure .
with recursive atr_col(id, val) AS ( sel 1, cast('' as varchar(1000)) as val from (sel 1 as dummy) a union all sel tb2.id+1, trim(tb2.val)||'' from atr_col tb2 where tb2.id<=val) sel val from atr_col order by id desc;