CREATE VIEW stock_record_change_request AS
SELECT
x.sr_id,
x.sr_barcode,
x.sr_changedesc,
x.sr_changegroup,
x.sr_changepri,
x.sr_changesec,
x.sr_changeter,
y.il_description,
y.il_group,
y.il_priloc,
y.il_secloc,
y.il_terloc,
x.sr_checkrqd,
x.sr_userid,
x.sr_ts
FROM stock_record x
LEFT JOIN item_list y ON x.sr_barcode=y.il_barcode
WHERE x.sr_checkrqd=”Yes”
ORDER BY x.sr_barcode;