Hello I need to convert to Teradata this sql query :
DECLARE @contatore AS INTEGER, @MySQL AS VarChar(8000)
SET @contatore = 0
SET @MySQL = 'select 0'
WHILE @contatore < 400 BEGIN
SET @contatore = @contatore + 1
set @MySQL = @MySQL + ' union select ' + CAST(@contatore AS VARCHAR)
END
Exec (@MySQL)
I could use query:
select * from (select 0 as x) dt union select * from (select 1 as x) dt...........................select * from (select 400 as x) dt
↧