This is strange because I actually had "if exists" in my code:<br><br>sqlKWDrop = 'DROP TABLE IF EXISTS ' + kwTable + ';'<br><br>where kwTable, in the instance cited below, becomes "judaism_128". What gives?<br>
Victor<br><br><div class="gmail_quote">On Sun, Aug 9, 2009 at 7:57 PM, Dennis Lee Bieber <span dir="ltr"><<a href="mailto:wlfraed@ix.netcom.com">wlfraed@ix.netcom.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Sun, 9 Aug 2009 15:21:43 -0500, Victor Subervi<br>
<<a href="mailto:victorsubervi@gmail.com">victorsubervi@gmail.com</a>> declaimed the following in<br>
gmane.comp.python.general:<br>
<div class="im"><br>
> Hi:<br>
> I get a ton of warnings like this from a program I run:<br>
><br>
> Warning (from warnings module):<br>
>   File "C:\Python25\read.py", line 67<br>
>     cursor.execute(sqlKWDrop)<br>
> Warning: Unknown table 'judaism_128'<br>
><br>
</div>        Personally -- I'd suggest fixing the database so that the table does<br>
exist...<br>
<br>
        Ah, but then -- it appears from the name, that the purpose of this<br>
SQL statement is to delete the table... In which case use a database<br>
that supports (for example, current versions of MySQL, SQLite, and<br>
PostgreSQL) "drop table IF EXISTS tbl_name" which suppress the<br>
warning/error message and update the SQL as appropriate.<br>
<br>
        Appears that M$ SQL Server does NOT implement that syntax... Nor<br>
could I find it for Firebird.<br>
<br>
        If the application is specific for one database engine, it might be<br>
worth it to find out what features permit discovering if a table exists<br>
and bypassing the drop if it doesn't...<br>
<br>
<br>
--<br>
        Wulfraed         Dennis Lee Bieber               KD6MOG<br>
        <a href="mailto:wlfraed@ix.netcom.com">wlfraed@ix.netcom.com</a>   <a href="HTTP://wlfraed.home.netcom.com/" target="_blank">HTTP://wlfraed.home.netcom.com/</a><br>
<font color="#888888"><br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br>