monkeyx Posted December 1, 2006 Share Posted December 1, 2006 Can anyone let me know if it possible to formulate an insert querythat that can use both select and values, so that I can get certaindata from the another table and have fixed values for some of the fields in the insert query?I guess one way would be to do an insert for select statement, then anupdate for fixed values.If it is possible will someone please post an example.Thanks,monkeyx Quote Link to comment Share on other sites More sharing options...
gluck Posted December 1, 2006 Share Posted December 1, 2006 You can create some thing like this:ex: you have table A with nameA and you wanna insert into nameB table BSelect concat("insert nameB into B values", nameA) From A;it will print insert stmts for all available values and you can then run the result it in batch mode; Quote Link to comment Share on other sites More sharing options...
fenway Posted December 3, 2006 Share Posted December 3, 2006 You can run an INSERT INTO ... SELECT WHERE, but only for existing records. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.