insert into 表3 (col1,col2,...) select col1,col2,... from 表1,表2

解决方案 »

  1.   

    程序要求用VBA触发这个过程啊!!!插入语句要求写在ORACLE中!!!!!
      

  2.   

    语句写在存储过程中,然后用VBA调用。
      

  3.   

    VBA是怎样调用的啊!!!!!!!!!!!
    语句是什么?
      

  4.   

    1、insert into table3(...) select ... from table1/table2
    2、VBA里面可以使用ADO来访问数据库,给你一个例子:
    Public cnn As New ADODB.Connection
    Public rst As New ADODB.Recordset
    Public sqlstr As String
    Set cnn = New Connection
    cnn.Open "provider=……"
    sqlstr = ""  '你的SQL语句
    Set rst = New Recordset
    rst.CursorLocation = adUseClient
    rst.Open sqlstr, cnn, adOpenStatic, adLockOptimistic
    rst.Close
    cnn.Close
      

  5.   

    用ADODB.Command可以调用Oracle的存储过程,具体的查一查帮助