Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
161 views1 page

Move Order Query Without Mover Order Number

This SQL query joins multiple tables to retrieve transaction and item information for inventory transfers from store locations to branches. Specifically, it selects the transaction ID, source, item number, description, serial number range, from location, to branch ID, and waybill number for transactions in the last 6 days where the item description contains "G%R%BOOK%" or "PRE BARCODE LABLE%".

Uploaded by

Pranav Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
161 views1 page

Move Order Query Without Mover Order Number

This SQL query joins multiple tables to retrieve transaction and item information for inventory transfers from store locations to branches. Specifically, it selects the transaction ID, source, item number, description, serial number range, from location, to branch ID, and waybill number for transactions in the last 6 days where the item description contains "G%R%BOOK%" or "PRE BARCODE LABLE%".

Uploaded by

Pranav Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

SELECT imt.

transaction_id,
imt.transaction_source_name ,
espv.item_number item_num,
espt.description item_description,
SUBSTR (isn.serial_number,
1,
INSTR (isn.serial_number, '-', 1, 1) - 1
) from_serial_no,
SUBSTR (isn.serial_number,
INSTR (isn.serial_number, '-', 1, 1) + 1
) to_serial_no,
'STORE' from_location, gcc.segment3 to_br_id_flex_value,
imt.attribute15 waybill_num
FROM INV_UNIT_TRANSACTIONS isn, inv_material_txns imt,
gl_code_combinations gcc , egp_system_items_vl espv ,
egp_system_items_tl espt
WHERE 1 = 1
AND imt.transaction_source_name is null
AND imt.transaction_id = isn.transaction_id
AND gcc.code_combination_id = imt.distribution_account_id
AND espv.inventory_item_id = imt.inventory_item_id
AND espv.organization_id = imt.organization_id
AND espt.inventory_item_id = imt.inventory_item_id
AND espt.organization_id = imt.organization_id
AND imt.CREATION_DATE > SYSDATE-6
-- and isn.TRANSACTION_ID=1848889
AND (espt.description LIKE 'G%R%BOOK%' OR espt.description LIKE '%PRE BARCODE
LABLE%')
order by transaction_id

You might also like