我想从A数据库把一表中记录成批拷至B数据库的一表中,这SQL语句怎样写?3Q

解决方案 »

  1.   

    Select * From [a].[usr].[table] into [b].[usrb].[tableb]
    or Insert into [b].
      

  2.   

    是从A插入到B吧
    insert into B数据库.dbo.table(field1,field2) select field1,field2 from A数据库.dbo.table
      

  3.   

    两个Access数据库互导:ADOConnection.Execute('select * into sAccess from stable in ''d:\data.mdb'''),你反过来:select * into sAccess in 'd:\data.mdb' from sTable
      

  4.   

    怎么同时操作两个数据库啊?这些SQL语句写在哪?
      

  5.   

    当然是写在Query中了
    操作一个数据库就行了。只不过要在各个表前加上“所有者”
    注:两个表的结构一样
      

  6.   

    MSSQl中,用户为sa:----------------------------------------------------
    想将数据库NiceSoft中表MSSysParameter的记录成批复制至数据库NiceERP中表MSSysParameter,AdoConnection1.Execute('Select * From NiceSoft.sa.MSSysParameter into NiceERP.sa.MSSysParameter');AdoConnection1.Execute('insert into NiceERP.dbo.MSSysParameter  select * from NiceSoft.dbo.MSSysParameter');两条语句都报错,倒底要怎样写SQl?3Q
      

  7.   

    AdoConnection1.Execute('Select * From [NiceSoft].[sa].[MSSysParameter] into [NiceERP].[sa].[MSSysParameter]');也报错
      

  8.   

    select into选项默认是关闭的,打开先,否则在sql7报错。sql2k可以,2k文档不对。