Re: Saving an ADO Result Set

From: Heinrich Braun (heinrich.braun_at_homagSPAMM.de)
Date: 02/04/05

  • Next message: BCostello: "ADOQuery to view & edit but not Update Table??"
    Date: Fri, 04 Feb 2005 22:04:27 +0100
    
    

    Hi,

    an easy way is by linking a remote-server (may even be access/excel or
    any other database-server):

    --check "sp_addlinkedserverlogin" as well, you may need it, depending on
    --user permissions

    use master
    go
    -- CHECK IF REQUESTED SERVER(S) EXIST
    if not exists (select * from master.dbo.sysservers where (srvname =
    'MYSERVER2'))
      begin
       EXEC sp_addlinkedserver 'MYSERVER2', N'SQL Server'
      end

    --than do query with INTO
    use mydatabase1
    go
    select * into MYSERVER2.dbo.mydatabse2.newtable from mytable1

    --you may pack the serverlinking into a stored procedure
    --thats it , you don't need an resultset first, just execute an ado
    --command or query

    hth
    heinrich

    Jose schrieb:
    > Hi,
    >
    > I have to different servers with MSSQL 7 and i want to save in a new table
    > in the second server the result of a select query executed in the main
    > server. Is there a direct (and easy) way to do it?
    >
    > Thanks for your help.
    >
    >


  • Next message: BCostello: "ADOQuery to view & edit but not Update Table??"

    Relevant Pages

    • Re: MailMerge hangs and crashes with Access on Server
      ... Since I am fairly new to working in this environment, I am not sure what you mean by an "Access group" with help to restructuring the query? ... "Peter Jamieson" wrote: ... All I know is that the performance of queries depends to a large extent on whether, for example, a join is performed on the client side, or on the server side, incurring no network traffic and potentially benefitting from caching on the server. ... There are no dialog boxes, and actually, I have now split the database, and have kept the Word templates and the Access frontend locally on my machine, and moved the backend to the server. ...
      (microsoft.public.word.mailmerge.fields)
    • Re: Performance Benchmarks?
      ... Are attribute relationships defined properly on the dimensions? ... If you run Profiler against the server, how long is spent in "Query ... I have created aggregations (Partitions tab in cube design). ...
      (microsoft.public.sqlserver.olap)
    • High CPU in client (Excel, OWC, Proclarity, etc.) accessing Analysis Services
      ... the OWC10 with 3 dimensions on the row axis, ... The largest size of any of these 4 dimensions < 360 members. ... Performance Guide to optimize the query, the cube, the server, etc. ...
      (microsoft.public.sqlserver.olap)
    • Re: Performance Benchmarks?
      ... adding memory on the server can help you; more data can be cached on the ... Here is my test query. ... )} DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ... I have created aggregations (Partitions tab in cube design). ...
      (microsoft.public.sqlserver.olap)
    • RE: Execute permission lost for nonadmin user after db migration with
      ... Your problem is that users are stored in master. ... server to another one that does not have the same users in it's master. ... permissions, remove the permissions, detach the DB, attach the DB and then ...
      (microsoft.public.sqlserver.server)