I have a report with a complex dataset query that involves a temp table. Anytime I make a change to that query and save or change tabs, I get this message:
Could not generate a list of fields for the query.
Invalid object name #[temp table name]. (Error 208)
Fair enough, but the real nuisance is that every time this happens it erases all of the dataset parameters I have previously set up. I have to redefine them every time.
I hope this behavior changes in the future.
I'm using technique like this:
IF (OBJECT_ID('#temp') IS NOT NULL)
DROP TABLE #temp
...
SELECT * from Table INTO #temp
I assume you mean the SELECT INTO would avoid this behavior? Unfortunately I don't think that's an option for me as I'm retrieving the data set for the table from a stored procedure, i.e.
INSERT #temp
EXEC GetTempRecords @.Param1
No comments:
Post a Comment