Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making mass price edits using SQL 1

Status
Not open for further replies.

_choof

MIS
Sep 18, 2019
21
US
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')
)
 
before do an update, execute a select for criteria.

3rd party integrations for Simphony/RES/9700

saftware.dev@gmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top