Steps
- Collect the Part Numbers and Prices from the supplied PDF or Excel files
- Combine both M250 and RR300 Part numbers and prices into one list
- Filter out unique part numbers to remove duplicate parts that are applicable to both engines and use XLOOKUP to aggregate prices
- Use Excel to create list for SQL Update Statement
- Copy the range into Word to replace tabs with spaces (Remember to remove last apostrophe)
- Use the new list in the following update statements
Price Update Statement
UPDATE erp_inventory SET price = CASE part_number WHEN 'PN' THEN price END; Example UPDATE erp_inventory SET price = CASE part_number WHEN '23007202' THEN 250 WHEN '23035874' THEN 75 END;
Update Price Date
1. Find the epoch date for the date
2. Copy the PN values from the previous SQL Update step 4 (Remember to remove last apostrophe)
3. Update the price_date value for each newly updated part in the erp_inventory table
Price Date Update Statement
UPDATE erp_inventory
SET price_date = date
WHERE part_number IN ('PN','PN');
Example
UPDATE erp_inventory
SET price_date = 1754888400
WHERE part_number IN ('23007202','23035874');