select price_id,* from customer where customer_id in ('A33505CFEC024AE1B36CD0D617943CB7','F63CD951C3704D31A794D6B166AF601C') select * from txn_sales_order_header where order_no='SOMN3000540-240719' --12fe4d8d-a3ec-4a58-8d59-5c1f33d0a117 select * from txn_sales_order_header where ord_hdr_id='12fe4d8d-a3ec-4a58-8d59-5c1f33d0a117' select * from txn_sales_order_details where product_id='CE9F9A2D9A2F4DFD82FF269168AEC8DA' order by product_id select * from product_item where item_id='CE9F9A2D9A2F4DFD82FF269168AEC8DA' select * from mst_product_uom where product_uom_id in ('0ce971d4ad024828817b3cb94279ddee','0ce971d4ad024828817b3cb94279ddee') --delete from mst_product_price where item_id='CE9F9A2D9A2F4DFD82FF269168AEC8DA' and price_code_id='887B00D3-7923-4EAE-994C-A4BCC36E0C08' and price_id='0DB7311D-7432-45AD-AB07-D2D341018C73' select * from mst_product_price where item_id='CE9F9A2D9A2F4DFD82FF269168AEC8DA' and price_code_id='ED16F98F9C1E46EFA0395304345734AE' select * into DMS_Ecosystem_Backup_Table..mst_product_price_20240719v2 from mst_product_price where item_id='CE9F9A2D9A2F4DFD82FF269168AEC8DA' and price_code_id='887B00D3-7923-4EAE-994C-A4BCC36E0C08' select 1 from txn_sales_order_details d inner join txn_sales_order_header h on d.ord_hdr_id=h.ord_hdr_id inner join customer c on h.customer_id=c.customer_id inner join product_item p on d.product_id=p.item_id left join warehouse wh on d.warehouse_id=wh.warehouse_id left join warehouse wh_ori on c.branch_id=wh_ori.branch_id and right(wh_ori.warehouse_id,1) = 'M' left join mst_product_price pp on c.price_id=pp.price_code_id and p.item_id=pp.item_id --left join mst_product_uom uom1 on uom1.product_uom_id=p.stock_uom_id --left join mst_product_uom uom2 on uom2.product_uom_id=p.alt_uom_id where d.ord_hdr_id='07ccf76c-6efd-4215-b71b-11fb89226b93' exec sp_executesql N' exec web_spTxnSalesOrderApprovalMasterDataRetriveList @member_id,@org_id,@hdr_id, @type',N'@member_id nvarchar(12),@org_id nvarchar(6),@hdr_id nvarchar(36),@type nvarchar(10)',@member_id=N'SNEKKU-admin',@org_id=N'SNEKKU',@hdr_id=N'07ccf76c-6efd-4215-b71b-11fb89226b93',@type=N'SalesOrder'