cfset using tempory table
Posted on 2011-03-08
i have a report generating from dynamic sql (500 lines) in coldfusion that is taking long time to run, in this process of fine tuning ,i have created temporary table for a view as this view is used in about 5 times in the query , after making this change and the query executed in less time.To implement this in coldfusion I need to know how to declare below query using temp table using cfset in coldfusion
SELECT * INTO #temp
FROM VW_sample MAIN
INNER JOIN table_A
Note: In database, after we reran query with temporary table We will get the following message
'There is already an object named '#temp' in the database'.
So we need to make sure in coldfusion not to repeat this error.