Hi All,
I was able to export menu items by using the following script.
But it only imported three rows.
We have pretty good size menu.
Any ideas, please?
Thank you all.
mxap
WITH prices AS (
SELECT *,
ROW_NUMBER() OVER(PARTITION BY mi_seq ORDER BY effective_from DESC) AS rk
FROM micros.mi_price_def WHERE effective_from <= NOW() AND (effective_to > NOW() OR effective_to IS NULL))
SELECT
p.mi_seq,
d.obj_num,
d.name_1,
p.preset_amt_1,
p.preset_amt_2,
p.preset_amt_3,
p.preset_amt_4,
p.preset_amt_5,
p.preset_amt_6,
p.preset_amt_7,
p.preset_amt_8,
p.preset_amt_9,
p.preset_amt_10
FROM
prices p
JOIN micros.mi_def d ON p.mi_seq = d.mi_seq
WHERE p.rk = 1
;output to C:\MICROS\temp\Menu_items.csv
I was able to export menu items by using the following script.
But it only imported three rows.
We have pretty good size menu.
Any ideas, please?
Thank you all.
mxap
WITH prices AS (
SELECT *,
ROW_NUMBER() OVER(PARTITION BY mi_seq ORDER BY effective_from DESC) AS rk
FROM micros.mi_price_def WHERE effective_from <= NOW() AND (effective_to > NOW() OR effective_to IS NULL))
SELECT
p.mi_seq,
d.obj_num,
d.name_1,
p.preset_amt_1,
p.preset_amt_2,
p.preset_amt_3,
p.preset_amt_4,
p.preset_amt_5,
p.preset_amt_6,
p.preset_amt_7,
p.preset_amt_8,
p.preset_amt_9,
p.preset_amt_10
FROM
prices p
JOIN micros.mi_def d ON p.mi_seq = d.mi_seq
WHERE p.rk = 1
;output to C:\MICROS\temp\Menu_items.csv