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)
 Need INSERT Query Help...

Author  Topic 

Sanatan
Starting Member

19 Posts

Posted - 2009-06-17 : 11:45:49
I am trying to setup a new user profile based on another user profile. I need to insert data into a profile table for the new user X similar to profile data retrieved from the same table for user Y.

Table Schema
User Col1 Col2 Col3
Y v1 v2 v3 <- Currently Exists
X v1 v2 v3 <- Wants to add

How do I achieve that in a query.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-17 : 12:12:42
Just use:-

INSERT INTO Schema
SELECT 'X',Col1,Col2,Col3
FROM Schema
WHERE User='Y'
Go to Top of Page
   

- Advertisement -