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.
| Author |
Topic |
|
CLages
Posting Yak Master
116 Posts |
Posted - 2004-04-20 : 07:51:42
|
| hi.How to Insert one ROW several Times changing only part of the keyI have a Table named EMPRESA(in English Company) and Other Named PLANO (in English Account) Table Empresa Codigo(key) Nome 01 ACME 02 Lages Company 03 Sql Company O would like to Insert 123456 (conta) for all EMPRESA I found in Table EMPRESA in this case would be:(key) (key)Empresa Conta Valor 01 123456 0 02 123456 0 03 123456 0 how can i do this?I think i should do a loop for by EMPRESAand for each EMPRESA, i Insert PLANO.i am not suretksCarlos Lages |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2004-04-20 : 07:55:27
|
| insert into planoselect a.codigo, 123456, 0 from empresa a |
 |
|
|
|
|
|