|
pavlos
Yak Posting Veteran
Greece
58 Posts |
Posted - 05/27/2012 : 20:19:08
|
Hey guys, I want to delete data from a table where it exists in another table. I have a budget table and a data table. I want to delete the rows of the data table where they exist in the budget table.
The data and budget table consists off date, storecode, value.
I have tried this delete from data where date in (select date from budget) and storecode in (select storecode from budget)
but this deletes all dates and storecodes where they exist in the budget I want to delete the rows that have the budget and storecode together.
EG.
delete from data where date and storecode in (select date,storcode from budget)
I cant put where clauses in the select statement.
hope this makes sense |
|