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 |
|
csphard
Posting Yak Master
113 Posts |
Posted - 2003-07-15 : 18:15:40
|
| My goal is to delete information from one table based on a comparisonof 2 tables. first i thought i would delete some information using a where clause that compared to tables. Then i realize it did not know where to delete fromdelete from due_evals d, emp_information_test ewhere d.datetobefiled between '01/01/2003' and '02/28/2003'and d_evals.empid = e.empidand e.bureau in ('375')and d.payloc_comp_date is nulland d.eval_type = 'Probation'second i thought i would update a field in the table with the word delete where the criteria matches. Then delete using a where clause searching for the word delete in that fieldupdate due_evals set hr_updated_by = 'delete'where due_evals.datetobefiled between '01/01/2003' and '02/28/2003'and due_evals.empid = emp_information_test.empidand emp_information_test.bureau in ('375')and due_evals.payloc_comp_date is nulland due_evals.eval_type = 'Probation' |
|
|
chadmat
The Chadinator
1974 Posts |
|
|
|
|
|