sql query

Results 1 to 3 of 3

Thread: sql query

  1. #1
    bobby Guest

    Default sql query

    i want to copy a table from <BR>server called trevor <BR>dbase = ape<BR>table = lookups into <BR><BR>into a server<BR>called mags <BR>dbase calles k&k<BR>table calles lookups<BR><BR> the strucure of the tables are the same but<BR> i dont know how to do a x-database insert let alone<BR> a cross server<BR><BR>thanks in advance<BR><BR>

  2. #2
    Sateesh Guest

    Default RE: sql query

    what r u trying to transfer whether the table along with the structure and data or only data, u can use the BCP for both the purpose if it is just a data tranfer u can even do with asp, u open two connections one for the first database and the other for the other database, using the first connection retrieve all the data to the inserted into the second database and put it inside a loop so that for each record you do an insert operation using the other connection in the second database, like<BR><BR><BR>&#039Open connection 1<BR>&#039Open connection 2<BR>&#039Open the recordset using connection 1 whose data has to <BR>&#039be duplicated in the other database.<BR><BR>loop the opened recordet like<BR>do until rs.eof<BR> &#039now using the second connection insert the data into <BR> &#039the database that you want the data to get transfered.<BR> conn2.execute ("insert into tablename values "& rs.fields(0)&" .....)<BR>rs.move next<BR>loop

  3. #3
    bobby Guest

    Default RE: sql query

    im trying to do it in sql not vb, <BR>and im trying to move just the data not the code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts