cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Multi-column In predicates are not supported in the DELETE condition.

cmilligan
Contributor II

I'm trying to delete rows from a table with the same date or id as records in another table. I'm using the below query and get the error 'Multi-column In predicates are not supported in the DELETE condition'.

delete from cost_model.cm_dispatch_consolidated
 
where delivery_date in (select delivery_date from cost_model.cm_dispatch_stats)
    or order_nbr in (select order_nbr from cost_model.cm_dispatch_stats)

What's strange is I do this against another table with no issues. Below is the one that is running fine.

delete from cost_model.cm_order_consolidated 
 
where delivery_date in (select delivery_date from cost_model.cm_order_stats)
    or order_nbr in (select order_nbr from cost_model.cm_order_stats)

3 REPLIES 3

-werners-
Esteemed Contributor III

strange error message as it is supported, as you already noticed.

I'd check what the subqueries return, my guess is that the issue might be there.

UmaMahesh1
Honored Contributor III

It might be because of nulls in the column you are defining. Can you please check if you have nulls in the working table and in the non working table and get back ?

Cheers..

shubhaskar
New Contributor II

Had the same issue. Please check the subquery returned value there must be something wrong with that.

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!