Karen My previous email must not have made it to the list. Anyhow I was saying that I normally drop my temp tables at the end of the application.
Buddy From: [email protected] [mailto:[email protected]] On Behalf Of Karen Tellef Sent: Tuesday, January 08, 2013 11:42 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: Thoughts about temp tables? Razzak: Yes I'm talking about a "true" temp table, so they will go away when the database is disconnected. But until then, there could be dozens of them hanging around throughout the day if the connection stays open. I do always drop temp tables before creating, but that doesn't help the problem that I had. I defined a temp table with a column name QtyBal as an Integer datatype. However, a different programmer had written a program that also used a column named QtyBal in a temp table, but he defined it as a computed column. The user had run his program first, the temp table stuck around, then he ran my program and it couldn't create my temp table because QtyBal existed with a different datatype... Karen -----Original Message----- From: A. Razzak Memon <[email protected]> To: RBASE-L Mailing List <[email protected]> Sent: Tue, Jan 8, 2013 10:36 am Subject: [RBASE-L] - Re: Thoughts about temp tables? 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

