Well yes, actually I don't want to deal with an SQLException in my code. Having an SQL query (SELECT name FROM tables WHERE name like 'table_I_want_to_drop';) to see if the table is there as Fabian suggested and then move on to dropping it if it exists by checking the results of the query, works for me.
I was trying to find out if there is a single SQL query that would do that like for example in Ms SQL, but reading a bit the documentation of MonetDB I couldn't come up with sth.
Mike
On Wed, Mar 30, 2011 at 4:55 PM, Stefan de Konink stefan@konink.de wrote:
Because somepeople have scripts that clean up, and dont want these parts to run outside a transaction?
Stefan
Op 30 mrt 2011 om 15:53 heeft Stefan.Manegold@cwi.nl het volgende geschreven:\
Mike,
may I ask why you want to drop a table that does not exist?
Stefan
On Wed, Mar 30, 2011 at 04:41:15PM +0300, Michael Sioutis wrote:
Hello,
I want to prevent an SQLException from occurring for tables that do not exist in my database. For example: sql>DROP TABLE "locked"; SQLException:sql.catalog:DROP TABLE: no such table 'locked'
It seems (and is documented) that there is no such thing like "IF EXISTS" in MonetDB. Is there a way to circumvent the SQLException?
Mike
Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar
MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- | Stefan.Manegold @ CWI.nl | DB Architectures (INS1) | | http://CWI.nl/~manegold/ | Science Park 123 (L321) | | Tel.: +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |
Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users