Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
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 SchemaUser Col1 Col2 Col3Y v1 v2 v3 <- Currently ExistsX v1 v2 v3 <- Wants to addHow 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 SchemaSELECT 'X',Col1,Col2,Col3FROM SchemaWHERE User='Y'