Ok, this one is going to be hard to describe properly, and as it's some client confidential stuff in the query I can't just post it direct. So here's the summary.
I have a query that is used by an ASP page to provide a report for a client. Due to some filtering they're asking for, I needed to modify the query to use a temp table structure so I could check some items before returning. However, when doing so, it causes the report page to crash on a missing name or ordinal. I've quintuple checked to make sure field names and datasets are identical between the two methods. So for example, is there a functional difference between:
and
This is a quick and dirty example. Obviously the real query is more complex, but I've even tried modifying it to return both result sets to look at in QA, and they're identical as far as I can see. Yet the second approach crashes the report.
I have a query that is used by an ASP page to provide a report for a client. Due to some filtering they're asking for, I needed to modify the query to use a temp table structure so I could check some items before returning. However, when doing so, it causes the report page to crash on a missing name or ordinal. I've quintuple checked to make sure field names and datasets are identical between the two methods. So for example, is there a functional difference between:
Code:
SELECT s.Item [FieldA], s.Name [Name], s.Score [Score]
FROM Scores
and
Code:
CREATE TABLE #Results ([Item] INT, [Name] VARCHAR(50), [Score] INT)
INSERT INTO #Results
SELECT Item, Name, Score FROM Scores
This is a quick and dirty example. Obviously the real query is more complex, but I've even tried modifying it to return both result sets to look at in QA, and they're identical as far as I can see. Yet the second approach crashes the report.