Database operation, a table is inserted into another table (Source 9cbs)

xiaoxiao2021-03-06  60

The original post "How can I not use the INSERT statement to insert the data in the table in another external database? Online, etc.

http://community.9cbs.net/expert/topic/3616/3616576.xml?temp =.8309137

Insert data in a table of a database into a table of another external database: use INSERT INTO BIAO IN external database SELECT FIELD from Table this statement

Pay attention to single quotes, SQL statement, for example: strsql = "INSERT INTO YKT IN '" & app.path & "/db/yktdb.mdb' SELECT * FROM Business Water Supply"

Mycn.open

STRSQL = "INSERT INTO YKT IN '" & app.path & "/db/yktdb.mdb' SELECT * FROM Operating Water Supply"

'strsql = "SELECT * INTO YKT IN" & app.path & "/db/yktdb.mdb from operating water"

mycmd.activeconnection = mycn

Mycmd.commandtext = strsql

Mycn.execute strsql

Mycn.close

转载请注明原文地址:https://www.9cbs.com/read-84318.html

New Post(0)