Home > Blockchain >  Update query in SQL: command not ended properly
Update query in SQL: command not ended properly

Time:09-02

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.

CodePudding user response:

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');
  • Related