Hi,
I am trying to create a temp table by inserting data to it using a select query. The code will only create a table if there is no where clause in the select query which seems strange. Can anyone help?
In the below code, when the red statement is removed, it works fine but when added, it does not create any temp table. I checked that where clause does return data. I tested that using a query fixture.
!|Execute|!-
Select top 1 detail_id
into #temp
from AdvisoryData_Fiserv..hst_bil_detail
where qtrend_date = @Qtrenddate
-!|