-
1
- #1
A number of customers recently have been requesting sweeping price changes, I know there's a way to edit prices using SQL but I'm not sure how to do so.
I've figured out how to select specific menu items based on conditionals, but I don't know how to format the UPDATE needed to increase prices by a set amount.
EDIT: Okay, I actually just figured this out lol. It seems like my conditional in the UPDATE was returning false, so it wasn't changing anything at all. I found a more succinct way to format it.
Here's what I used.
UPDATE micros.mi_price_def
SET preset_amt_1 = preset_amt_1 + .25
WHERE mi_seq IN (
SELECT mi_seq FROM micros.mi_def
WHERE mi_slu_seq IN ('101','102','1036','1037','103','1035','1034','104','1060','200','201','1041','302','303')
)
I've figured out how to select specific menu items based on conditionals, but I don't know how to format the UPDATE needed to increase prices by a set amount.
EDIT: Okay, I actually just figured this out lol. It seems like my conditional in the UPDATE was returning false, so it wasn't changing anything at all. I found a more succinct way to format it.
Here's what I used.
UPDATE micros.mi_price_def
SET preset_amt_1 = preset_amt_1 + .25
WHERE mi_seq IN (
SELECT mi_seq FROM micros.mi_def
WHERE mi_slu_seq IN ('101','102','1036','1037','103','1035','1034','104','1060','200','201','1041','302','303')
)