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..

Uma Mahesh D

shubhaskar
New Contributor II

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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group