Translate loop into Teradata Stored Procedure

Analytics

Translate loop into Teradata Stored Procedure

How can I translate this loop into Teradata SQL?

DECLARE @logdate DATETIME  

DECLARE @hrinput1 INTEGER

DECLARE @hrinput2 INTEGER

SET @logdate = '2013-03-01' 

SET @hrinput1 = '0'

SET @hrinput2 = '1'

while @logdate <= '2013-04-01' 

BEGIN 

--reset parameter values

set @hrinput1 = '0'

set @hrinput2 = '1' 

while 

@hrinput2 <=25

BEGIN 

print @hrinput1

print @hrinput2

set @hrinput1 = @hrinput1 + 1

set @hrinput2 = @hrinput2 + 1 

END 

print @logdate

set @logdate = DATEADD(day, 1, @logdate) 

END