Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Work with data from another table

Author  Topic 

Bouben
Starting Member

1 Post

Posted - 2011-12-03 : 16:10:28
Hello,

is there some simple syntax in SQL Server with which I would be able to express that I want to work
with data of some table?


(I want to make a procedure which will help me to create a new table with new (modified) data using data from another table.)

Thank you

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-12-03 : 17:45:06
select *
into mynetable
from ...

That will create a table with the results of a query.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-03 : 22:54:23
quote:
Originally posted by Bouben

Hello,

is there some simple syntax in SQL Server with which I would be able to express that I want to work
with data of some table?


(I want to make a procedure which will help me to create a new table with new (modified) data using data from another table.)

Thank you



the procedure will be like


CREATE PROC ProcName
AS
SELECT * INTO NewTableName
FROM ....
....


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -