At 11:18 AM 1/8/2013, Karen Tellef wrote:

Since the list has been slow, let me throw a question out there. When you write a program that uses temp tables, do you leave the temp tables out there? Or do
you delete them?

I always leave them, simply because I sometimes want to get to the r> prompt and look at the temp table. I'm not sure whether there's any space/memory/performance
issues with having them there.

The reason it comes to mind is that last week I had a program fail, and it turns out that another programmer on this client (we work as a team) and I happened to pick the same name for a column to use in a temp table, and of course we used a different data type! If I work alone I have a pretty good memory of what I might
have used for temp table column names (although not 100%).  And I try to use
existing column names whenever possible.

What do you do?


FWIW, if you have defined a true TEMPORARY table or view, it is automatically
DROPped as soon as you either CONNECT or DISCONNECT the database.

Here is a simple technique to create a TEMPORARY table without being worried
about its existence or not.

-- Example 01

   SET ERROR MESSAGE 2038 OFF
   DROP TABLE temptablename
   SET ERROR MESSAGE 2038 ON
   CREATE TEMPORARY TABLE temptablename ...

-- Example 02

   SET ERROR MESSAGE 2038 OFF
   DROP TABLE temptablename
   SET ERROR MESSAGE 2038 ON
   PROJECT TEMPORARY temptablename FROM ... USING ...

Very Best R:egards,

Razzak.

www.rbase.com
www.facebook.com/rbase

Reply via email to