Home All Groups Group Topic Archive Search About

Copying table & data (2000 - 2005)

Author
31 Aug 2006 9:15 PM
modhak
Hi All

I have a table in SQL Server 2000. I want to copy the data to my SQL
Server 2005. Is there anyway I can do it.

This table in 2000 SQL server has foriegn key constraints. I do not
want to import the other tables. Just the data.

Please let me know.

Thanks

Author
31 Aug 2006 9:29 PM
Arnie Rowland
If you have it set up as a linked server, then:

INSERT INTO [SQL2005Server].[MyDatabase].[Schema].Table
   SELECT
        Column1
      , Column2
      , Column3
      , etc
   FROM [SQL2000Server].[OtherDatabase].dbo.Table
   WHERE {any criteria here}

This assumes that you have SELECT permission on the SQL 2000 server, and INSERT permission on the SQL 2005 server.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


Show quote
<mod***@gmail.com> wrote in message news:1157058919.886633.124740@i3g2000cwc.googlegroups.com...
> Hi All
>
> I have a table in SQL Server 2000. I want to copy the data to my SQL
> Server 2005. Is there anyway I can do it.
>
> This table in 2000 SQL server has foriegn key constraints. I do not
> want to import the other tables. Just the data.
>
> Please let me know.
>
> Thanks
>

AddThis Social Bookmark Button