home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!bcm!mparsons
- From: mparsons@fleming.csc.bcm.tmc.edu (Mark Parsons)
- Newsgroups: comp.databases.sybase
- Subject: RE: "Select" from one server to ther other server
- Date: 18 Nov 1992 16:56:47 GMT
- Organization: Baylor College of Medicine, Houston, Tx
- Lines: 45
- Distribution: world
- Message-ID: <1edskfINN34d@gazette.bcm.tmc.edu>
- References: <Bxx3zz.IEq@csfb1.fir.fbc.com>
- Reply-To: mparsons@fleming.csc.bcm.tmc.edu (Mark Parsons)
- NNTP-Posting-Host: fleming.csc.bcm.tmc.edu
- Originator: mparsons@fleming.csc.bcm.tmc.edu
-
-
- In article <Bxx3zz.IEq@csfb1.fir.fbc.com>, lhall@csfb1.fir.fbc.com (Lawrence Hall) writes:
- |> Etsuko Shimabukuro writes :
- |>
- |> [ I am looking for the the way to do
- |> [ "select * from table where some condition" in a database in A-server,
- |> [ ^^^^^ ^^^^^
- |> [ then transfer the data into a different database in B-server.
- |> [ Is there any way to do this kind of things without using
- |> [ Open-client Library???
- |>
- |> The easiest way to accomplish this inter-server move of data is as follows :
- |>
- |> Server A
- |>
- |> Select * into table-x from table where some condition
- |>
- |> bcp database..table-x out x.data -S AServer (appropriate bcp args here)
- |>
- |> bcp target_database..table-y in x.data -S BServer ( appropriate bcp args)
-
- Yeah, I was going to suggest the bcp method, too. But there are two
- 'bugs'?? Please correct me if I'm wrong . . . .
-
- One: Using bcp will not allow you to do incremental inserts/transfers, i.e.,
- bcp 'out' will not allow you to select which rows(via a 'where'
- clause) to copy out. Therefore, in a system where you're doing
- incremental inserts/transfers, bcp will pull 'out' more than what
- you want, and insert all of this into the BServer(some/most of
- which will have been copied in on the last bcp). Of course,
- if you put your inserts into a (temp) table, and those are the
- only entries in the (temp) table, then the bcp suggestion would
- work just fine.
-
- Two: I was assuming that the original poster wanted to do something
- from within the front-end or server, i.e., not have to get out
- into the operating system to access bcp. Sure, you could do
- a rpc/system call, but I thought he might be looking at a
- way to do it all from within the front-end and/or server.
-
- |> The Secretary will disavow all knowledge.
-
- Heck! Everyone disavows knowledge of me!! ;-)
-
- Mark
-