Friday, February 24, 2012

Copy'n data from one table to the other

I want to copy an entire tables data into a new table but this code does not work need some help

SELECT condcode,brief_desc,condtext
INTO CD_ConditionCode, CD_BriefDesc, CD_Description
FROM [frds2\gtprod].gtgrandstestuja.dbo.[condcode]

The INTO clause is where you define the target table.

You would do something like:

Code Snippet

SELECT condcode,brief_desc,condtext
INTO dbo.MyNewTable
FROM [frds2\gtprod].gtgrandstestuja.dbo.[condcode]

The table will be populated with the columns listed in the SELECT.

No comments:

Post a Comment