Mertech Blog

Use SQL Temporary Tables and then Create a Report with a VDF WinReport Object

Written by Mertech | Feb 24, 2008 10:02:00 PM

You can create temporary tables at runtime to store intermediate results from complex queries and greatly improve your performance.  

Note: Different SQL databases have different options for dealing with the scope (local or global) and lifetime of temporary tables. Refer to the online documentation for your particular database. 

Download the code example here:  Temporary Tables Report in VDF

The example contains code for both MS SQL and ORACLE. The example retrieves information from the CUSTOMER table (which should be present on your server), stores the results in a temporary table, and then uses the VDF WinReport Object to create the following report: