MySQL Forums
Forum List  »  Newbie

Re: Help with structuring a nested query
Posted by: Laura M J Stewart
Date: August 23, 2022 02:56PM

Select all the records from table sql_store.order_statuses but populate current ‘Name’ column value in a new column called ‘New_Name’ and change values like below.
WHEN name = 'Processed' THEN 'P'
WHEN name = 'Shipped' THEN 'S'
WHEN name = 'Delivered' THEN 'D'

Basically, I have to add a new column with the one letter representing the values in the original column.
Please help, thank you!

Options: ReplyQuote


Subject
Written By
Posted
Re: Help with structuring a nested query
August 23, 2022 02:56PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.