/* This code worked after implementing recommendations of Gareth Wilson */
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
-- Author: Will
-- exec [dbo].[Test_TmpTblforQlik]
CREATE PROCEDURE [dbo].[usp_GetDataFromSQL]
SET NOCOUNT ON;
DROP TABLE IF EXISTS #MyTest_01
Select 'A' as MyLetter, 1 as MyNumber
Select 'B' as MyLetter, 2 as MyNumber
Select 'C' as MyLetter, 3 as MyNumber
Select 'D' as MyLetter, 4 as MyNumber
) as Qry_01
Previously I had been rewriting my stored procedures with CTEs but this time was different since I used several windowing functions (row_count) and the performance boost of temp table was really needed. Thanks for your quick response and the spot on solution! I really appreciate the help.
Out of curiosity, do you know why the nocount must be turned on?