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 |
helixpoint
Constraint Violating Yak Guru
291 Posts |
Posted - 2012-05-01 : 14:29:15
|
I need to a select that pulls back all fields with a specific ID from table A and do an insert into the same table with specific fields from that select.SELECT Ofa_Batch_Dtls_Pk, Batch_Loc_Fk, Batch_No, Inserted_Dt, Updated_DtFROM OFA.tblOFA_BATCH_DTLSWHERE (Ofa_Batch_Dtls_Pk = 122315)DaveHelixpoint Web Developmenthttp://www.helixpoint.com |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-01 : 14:32:41
|
[code]insert into OFA.tblOFA_BATCH_DTLSSELECT Ofa_Batch_Dtls_Pk, <someothervalue>,<someothervalue>,...FROM OFA.tblOFA_BATCH_DTLSWHERE (Ofa_Batch_Dtls_Pk = 122315)[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|