Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SQL? Copy Columns from one to blank Columns in New

LEGEND ,
Mar 17, 2009 Mar 17, 2009
I have a table that was created long ago with no Identity. Now that I'm
in SQL 2008 and want to do FTS (Full Text Search), it doesn't see this
table.

So what I'm trying to do is copy two Columns from one table into a new
table that has an Identity applied to the ID.

I tried below but it wants to create a new table called Table2 and I
just want it to update the table I already Designed.

SELECT column1,column2,column3
INTO Table2
FROM Table1

How should I really do this?

Thanks.
TOPICS
Server side applications
424
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 19, 2009 Mar 19, 2009
I knew this was going to be simple but for some reason it was being
obstinate.

Below is what worked in case anyone is looking for an answer

insert into table2
select column1,column2,column3
from table1

Art wrote:
> I have a table that was created long ago with no Identity. Now that I'm
> in SQL 2008 and want to do FTS (Full Text Search), it doesn't see this
> table.
>
> So what I'm trying to do is copy two Columns from one table into a new
> table that has an Identity applied to the ID.
>
> I tried below but it wants to create a new table called Table2 and I
> just want it to update the table I already Designed.
>
> SELECT column1,column2,column3
> INTO Table2
> FROM Table1
>
> How should I really do this?
>
> Thanks.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 19, 2009 Mar 19, 2009
LATEST
Use INSERT. If you want to maintain the Identity values from the ID in the
new database you will need to use:
SET IDENTITY_INSERT table ON
Insert records
SET IDENTITY_INSERT table OFF

"Art" <lee_*nospamification@artjunky.com> wrote in message
news:gpp326$2ld$1@forums.macromedia.com...
>I have a table that was created long ago with no Identity. Now that I'm in
>SQL 2008 and want to do FTS (Full Text Search), it doesn't see this table.
>
> So what I'm trying to do is copy two Columns from one table into a new
> table that has an Identity applied to the ID.
>
> I tried below but it wants to create a new table called Table2 and I just
> want it to update the table I already Designed.
>
> SELECT column1,column2,column3
> INTO Table2
> FROM Table1
>
> How should I really do this?
>
> Thanks.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines