Someone can correct me if I am wrong, but I have it in my head that Temp tables are unique/mutually exclusive for each user.
I.e. TempTableA created by user Lena cannot be seen/used by user Doug and vice-versa So the same program called by Lena could create TempTableA and same program called by Doug would also TempTableA Regards Lena From: rbase-l@googlegroups.com <rbase-l@googlegroups.com> On Behalf Of Doug Hamilton Sent: Thursday, May 03, 2018 3:03 PM To: R:Base List <rbase-l@googlegroups.com> Subject: Re: [RBASE-L] - Does Table exist? Thanks Lena, Razzak and Buddy. The temp table is in an item maintenance routine. I don't want to delete it if there are other parts being edited by the same user. I was going to create a unique temp table for each part, but that got ugly real fast. Doug On 5/1/2018 11:04 AM, Buddy Walker wrote: I think doing a COUNT(*) FROM SYS_TABLES is the best way to check for an existing table. With that being said and you truly want to delete/drop a TEMPORARY table then recreate it I would just turn the error message off and drop the table then turn the error message back on. SET ERROR MESSAGE 2038 OFF DROP myTempTblName SET ERR0R MESSAGE 2038 ON CREATE TEMPORARY myTempTblName ……… Buddy From: rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com> <rbase-l@googlegroups.com><mailto:rbase-l@googlegroups.com> On Behalf Of Lena Dammstrom Sent: Tuesday, May 1, 2018 11:41 AM To: rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com> Subject: RE: [RBASE-L] - Does Table exist? Doug, I be interested in a more elegant way of checking for the existence of a table too! I use the count method: SET VAR vCount = 0 SELECT COUNT(*) INTO vCount FROM Sys_Tables + WHERE Sys_Table_Name = 'TableName' AND LIMIT = 1 Regards Lena From: rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com> <rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com>> On Behalf Of Doug Hamilton Sent: Tuesday, May 01, 2018 10:33 AM To: R:Base List <rbase-l@googlegroups.com<mailto:rbase-l@googlegroups.com>> Subject: [RBASE-L] - Does Table exist? I'm drawing a blank - is there a command/function (in 9.5) to check for the existence of a table? I want to see if a temp table exists before I try to recreate it. I could try to count rows and check for error messages if the table isn't there but I suspect there's a more elegant method. 'Course, recreating an existing table would also give an error message... TIA, Doug Now to get more coffee.... [Image removed by sender.]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon> Virus-free. www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link> -- 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<mailto:rbase-l+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- 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<mailto:rbase-l+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- 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<mailto:rbase-l+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- 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<mailto:rbase-l+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- 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. For more options, visit https://groups.google.com/d/optout.