I always do that too, Ryan, but that doesn't help in this situation. The problem is that there was a different temp table out there that conflicted with my column names, so dropping my temp table first didn't matter Karen -----Original Message----- From: Ryan Blanchard <blanchardrya...@gmail.com> To: rbase-l@googlegroups.com Sent: Tue, Aug 4, 2020 11:51 am Subject: Re: Re[2]: [RBASE-L] - Best practices?
As a general rule, I drop a table I am about to create just in case it existed before creating it. You have to set error messages off before run to not have the code error out though. Ryan On Mon, Aug 3, 2020 at 4:44 PM Bruce Chitiea <rby...@safesectors.com> wrote: (1) Temp table/views: ground all planes that don't need to be flying around in RAM (2) Variables: CLEAR and NULL local variables religiously. Have a second class of variables (e.g. gvname) as "global" variables, accessible across all routines in an application, which disappear at DISCONNECT. (3) The R:Dependency Viewer has developed to the point where it does a creditable job of showing what's what and who's consorting with whom. Play with "Regions" to show development territories. (4) For community reference, the R:Documenter Plugin (in PowerPack.) Print to PDF with OCR Find capability and distribute to all parties when making changes. Bruce Bruce A. ChitieaSafeSectors, Inc.-----------------------------------112 Harvard Ave #272Claremont CA 91711-4716-----------------------------------rby...@safesectors.com-----------------------------------+011 (909) 238-9012 c+011 (909) 912-8678 f ------ Original Message ------From: "Dan Goldberg" <d...@lancecamper.com>To: "rbase-l@googlegroups.com" <rbase-l@googlegroups.com>Sent: 8/3/2020 2:49:36 PMSubject: RE: [RBASE-L] - Best practices? I always drop temp tables/views/variables when done with that routine. Maybe keeping an excel file/or table with column names and datatypes would help? Dan Goldberg From: 'Karen Tellef' via RBASE-L <rbase-l@googlegroups.com> Sent: Monday, August 3, 2020 1:40 PM To: rbase-l@googlegroups.com Subject: [RBASE-L] - Best practices? Hard to believe in my decades of programming that this is the first time this has happened. Just wondering if other programmers have tips on this situation for the future. And I'm kinda bored this afternoon so thought I would post. History: I work on this company's stuff with another programmer. We work independently, each of us handling different "areas" of the business. The company's contact himself also does a bit of programming. So 3 of us writing programs. I write a new program today, works great for me, he keeps claiming it doesn't work for him, giving him my "no data to report" message. He exits and comes back in, never works. I finally ask him exactly the process he's going thru, and I find out that he will run another program immediately before running this program. Aha, a clue. Guess what. In that other program (written by the other programmer), he creates a temp table (and doesn't drop it) using the same column name that I have inmy temp table, but as a different datatype! So my temp table was never created because of the structure error, and it reports no data! So what's the best way to prevent this? I was thinking of things like: 1. Each of us using temp column names using our initials (like: ktQty INT). But even with that, there's no guarantee that I'll remember I used a "ktQty" as a Double once, and as an Integer another time. 2. I could search program code for occurrences of each "new" temp column name I want to use to see if any other program uses that name. 3. I could only use permanent column names, altho using the permanent name "Qty" is not as descriptive as a temp column name like: tmpQtyToShipByMonthend But in reality there's 3 "easy" things I could do: 1. We could drop our temp tables at the end of our programs. None of us do this. I like leaving them around in case I run something from the menu and want to get to the R> prompt to see temp table data. Do you all drop temp tables? 2. After every "create temp table" do a "select ... from sys_tables" to see if the temp table exists. Seems the easiest, doesn't it? Again, do any of you routinely do this? 3. Or.. I can figure that since this has happened once in the >20 yrs that I've worked on that account, figure that it's most likely not going to happen again so don't worry about it. Just some Monday musings...... Karen -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email torbase-l+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/2069458979.877585.1596487225564%40mail.yahoo.com. -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/2E4830CEC16615458329D3D83342F8D0014E5B1E15%40exchange11. -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/em17cf0369-9862-4495-bc05-daec3f890eec%40pathfinder. -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/CADj97F%3DF8k2Lzk9U71UTDgHTqEHdErYo6hhGZ9kV4ym06aZQkA%40mail.gmail.com. -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to rbase-l+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/497235462.72412.1596591730702%40mail.yahoo.com.