Re: move table

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



thanks bob,
this will only happen once. i onle need to move the tables from one db to
another one time.

I am condensing my webs, and realized that stuff was too spread out.

thanks again


"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:%23WVDkj%23fGHA.1260@xxxxxxxxxxxxxxxxxxxxxxx
Oh, yes. No problem.
INSERT INTO newdb..table SELECT * FROM olddb..table

Why do you need this to happen via asp? This does not seem like an
activity that should happen often enough to need to to be triggered by an
asp page. Why wouldn't you use a DTS package to move the table and data?

Oh, you can use the wizard to create a DTS package which can be triggered
to run via ASP:
http://www.sqldts.com/default.aspx?207,1

But again, unless you are creating an online substitute for Enterprise
Manager, I would be hesitant about tying up IIS resources with this
activity.


Jeff wrote:
ok. so if i create the tables in the target db, i should be able to
move the data between diff db's??


"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:%23rpQmX5fGHA.4900@xxxxxxxxxxxxxxxxxxxxxxx
Jeff wrote:
I need to move the enitre table, Indexes, constraints,
relationships, everything. worse case senario, i could build the
tables, and just move the data, but would rather do it all at once.

There's no way to do this in one fell swoop, short of restoring a
backup.

ok. so if i create the tables in the target db, i should be able to
move the data between diff db's??






"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:eKaM3$3fGHA.3364@xxxxxxxxxxxxxxxxxxxxxxx
Jeff wrote:
I am using mssql db and access it via SQL server management
studio. is it possible to move a table from 1 db on my server to
another
db on my server?

if it can't be done through that program, can it be done with
script? like select * from tablea

and close the connection, then open the connection of the second
db.. and select it into there??

It depends on what you need to move: just the data? or do you need
the resulting table to have all the metadata as well? Indexes,
constraints, relationships, etc.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap
so I don't check it very often. If you must reply off-line, then
remove the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so
I don't check it very often. If you must reply off-line, then remove
the "NO SPAM"

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"



.



Relevant Pages

  • Re: Data Project - Running SP via ADO
    ... Microsoft MVP -- ASP/ASP.NET ... Please reply to the newsgroup. ... This email account is my spam trap so I ...
    (microsoft.public.data.ado)
  • Re: Writing a GUID to a SQL table
    ... I strongly suspect that it is SQL Server, ... >> Please reply to the newsgroup. ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.db)
  • Re: VBSCript execute MS SQL Stored Procedure Return Value
    ... Microsoft MVP -- ASP/ASP.NET ... Please reply to the newsgroup. ... This email account is my spam trap so I ...
    (microsoft.public.scripting.vbscript)
  • Re: using ado drivers with 64 bits software
    ... experts in one of the Access groups. ... Microsoft MVP -- ASP/ASP.NET ... Please reply to the newsgroup. ... This email account is my spam trap so I ...
    (microsoft.public.data.ado)
  • Re: Error in asp page
    ... This is because you need to turn Simple File Sharing off. ... >> quicker response by posting to the newsgroup. ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.general)