Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with sql delete join

Status
Not open for further replies.

snookie147

Programmer
Joined
Feb 15, 2008
Messages
2
Location
BE
Hello,
I want to use a delete sql with a join command in it, but I can't get it working...need some help on this one. What is wrong with the sql statement below? (I get an Microsoft JET Database Engine (0x80004005) error telling me that I have to indicate the table which I want to delete from).

Here is the wrong sql:

sql ="delete from orders left join products on orders.product_id = products.id where products.type_id="&var_type_id
 
hi,
I just found the solution and I want to share it with you. The sql that works is:

sql ="delete orders.* from orders left join products on orders.product_id = products.id where products.type_id="&var_type_id
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top