From: Brent S. E. <we...@ai...> - 2009-04-06 14:21:23
|
So how do I use the admin_cmd procedure from pydb2? I tried import DB2 conn = DB2.connect(... curs = conn.cursor() Then I assume curs.execute(something). But what would the exact syntax be to try admin_cmd on the following statement? export to /home/brente/file.del of del select * from schema.table where working = 'PREVIOUS' for read only My db2 client is 8.2 and the db2 server I am connecting to is 9.2. On Sun, 2009-04-05 at 17:47 +0200, len...@la... wrote: > > > Can pydb2 handle an export command in an execute statement? > > export is not part of sql so that wont work. You don't mention which > version of db2 you are running, but at least for 9.5 you should be able to > run export via the admin_cmd procedure: > > http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.sql.rtn.doc/doc/r0012547.html?resultof=%22%61%64%6d%69%6e%5f%63%6d%64%22%20 > > Not sure of earlier versions, and I haven't tried it myself though. > > HTH > /Lennart > > [...] > > > > > > > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > PyDB2-discuss mailing list > > PyD...@li... > > https://lists.sourceforge.net/lists/listinfo/pydb2-discuss > > > |