At 03:35 PM 7/11/2010, Mike Sinclair wrote:

Question.... If method 1 is considered a "good technique",
is there anything wrong with just turning the error messages
off and creating the table even when it already exists? Is
there any reason to think that would cause any problems like
a memory leak or database corruption if that were done many
times? Could it slow down the application?


If you always need to create a fresh TEMPORARY table, use the
following technique, if you wish:

-- Example
-- Start here ...
SET ERROR MESSAGE 2038 OFF
DROP TABLE tTempTableName
SET ERROR MESSAGE 2038 ON
CREATE TEMPORARY TABLE `tTempTableName` +
(`TransID` INTEGER, +
 `CustID` INTEGER, +
 `EmpID` INTEGER, +
 `TransDate` DATE, +
 `BillToCompany` TEXT (40), +
 `BillToAddress` TEXT (30),  +
 `BillToCity` TEXT (20), +
 `BillToState` TEXT (2), +
 `BillToZip` TEXT (10), +
 `ShipToCompany` TEXT (40), +
 `ShipToAddress` TEXT (30), +
 `ShipToCity` TEXT (20), +
 `ShipToState` TEXT (2), +
 `ShipToZip` TEXT (10))
COMMENT ON TABLE tTempTableName IS 'Temporary Customer Information'
RETURN
-- End here ...

Very Best R:egards,

Razzak.


Reply via email to