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 |
|
collie
Constraint Violating Yak Guru
400 Posts |
Posted - 2009-08-03 : 08:20:11
|
| Hi,I need to insert into table Results all candidates from table Candidates. However, if a candidate_id already exists in table Results then i mustn't insert that candidate.How can i do that?ThanksWhisky-my beloved dog who died suddenly on the 29/06/06-I miss u so much. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-08-03 : 08:32:41
|
| insert into all_candidates(columns)select columns from candidate as cwhere not exists(select * from all_candidate where candidate_id =c.candidate_id )MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|