Update query in SQL: command not ended properly

Issue

update fare_strategy set sales_date_to = ’07-SEP-22’ 
  where dep_date_to is not null 
  and market_id in 
   (select market_id 
     from fare_strategy_markets 
     where set_type = ‘STANDARD’
   );

In the following query, I’m getting error as SQL command not properly ended.

Solution

try to change like this

update fare_strategy set sales_date_to = '07-SEP-22' where dep_date_to is 
not null  and market_id in (select market_id from 
fare_strategy_markets where set_type = 'STANDARD');

Answered By – Uday Dodiya

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published