home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / database / sybase / 349 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  2.4 KB

  1. Path: sparky!uunet!stanford.edu!bcm!mparsons
  2. From: mparsons@fleming.csc.bcm.tmc.edu (Mark Parsons)
  3. Newsgroups: comp.databases.sybase
  4. Subject: RE: "Select" from one server to ther other server
  5. Date: 18 Nov 1992 16:56:47 GMT
  6. Organization: Baylor College of Medicine, Houston, Tx
  7. Lines: 45
  8. Distribution: world
  9. Message-ID: <1edskfINN34d@gazette.bcm.tmc.edu>
  10. References: <Bxx3zz.IEq@csfb1.fir.fbc.com>
  11. Reply-To: mparsons@fleming.csc.bcm.tmc.edu (Mark Parsons)
  12. NNTP-Posting-Host: fleming.csc.bcm.tmc.edu
  13. Originator: mparsons@fleming.csc.bcm.tmc.edu
  14.  
  15.  
  16. In article <Bxx3zz.IEq@csfb1.fir.fbc.com>, lhall@csfb1.fir.fbc.com (Lawrence Hall) writes:
  17. |> Etsuko Shimabukuro writes :
  18. |> 
  19. |> [     I am looking for the the way to do 
  20. |> [    "select * from table where some condition" in a database in A-server,
  21. |> [      ^^^^^               ^^^^^
  22. |> [     then transfer the data into a different database in B-server.
  23. |> [    Is there any way to do this kind of things without using 
  24. |> [     Open-client Library???
  25. |> 
  26. |> The easiest way to accomplish this inter-server move of data is as follows :
  27. |> 
  28. |> Server A
  29. |> 
  30. |>     Select * into table-x from table where some condition
  31. |> 
  32. |> bcp database..table-x out x.data -S AServer (appropriate bcp args here)
  33. |> 
  34. |> bcp target_database..table-y in x.data -S BServer ( appropriate bcp args)
  35.  
  36. Yeah, I was going to suggest the bcp method, too.  But there are two
  37. 'bugs'??  Please correct me if I'm wrong . . . .
  38.  
  39. One:  Using bcp will not allow you to do incremental inserts/transfers, i.e.,
  40.       bcp 'out' will not allow you to select which rows(via a 'where'
  41.       clause) to copy out. Therefore, in a system where you're doing
  42.       incremental inserts/transfers, bcp will pull 'out' more than what
  43.       you want, and insert all of this into the BServer(some/most of 
  44.       which will have been copied in on the last bcp).  Of course,
  45.       if you put your inserts into a (temp) table, and those are the
  46.       only entries in the (temp) table, then the bcp suggestion would 
  47.       work just fine.
  48.  
  49. Two:  I was assuming that the original poster wanted to do something
  50.       from within the front-end or server, i.e., not have to get out
  51.       into the operating system to access bcp.  Sure, you could do 
  52.       a rpc/system call, but I thought he might be looking at a 
  53.       way to do it all from within the front-end and/or server.
  54.  
  55. |> The Secretary will disavow all knowledge. 
  56.  
  57. Heck! Everyone disavows knowledge of me!! ;-)
  58.  
  59. Mark
  60.