Maintenance MySQL – Stock Report Android: stock_record_history
CREATE VIEW stock_record_history AS
SELECT DISTINCT
y.sr_id,
y.sr_scandt,
y.sr_barcode,
x.il_description,
x.il_priloc,
x.il_secloc,
x.il_terloc,
x.il_group,
y.sr_qty,
y.sr_changedesc,
y.sr_changegroup,
y.sr_changepri,
y.sr_changesec,
y.sr_changeter,
y.sr_userid,
y.sr_deviceid,
y.sr_ts
FROM item_list x, stock_record y
WHERE y.sr_barcode=x.il_barcode;