I have the following snippet of SQL code that I'm testing in Domo Workbench, basically just populating a table variable with one row for each of the previous 18 months. Domo Workbench (3.1.5714.35059) will validate the code, but I can't get it to preview. When I click the Preview button, I see messages that the query executed, etc, but the preview is never shown. No error messages, no nothing.
declare @pds table (
EvtMo smallint
,EvtYr int
)
declare @tmpDate date = getdate()
while datediff(month,@tmpDate,getdate()) < 18
begin
insert into @pds select datepart(month,@tmpdate), datepart(year,@tmpDate)
set @tmpDate = dateadd(month,-1,@tmpDate)
end
select * from @pds