[FIXED] 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
Answer Checked By - David Marino (sql.easybugfix Volunteer)

Related Posts

Post a Comment