Get Delivery Number from Sales order number
SELECT wda.delivery_id,wdd.* FROM
ONT.OE_ORDER_HEADERS_ALL ooha,
ONT.OE_ORDER_LINES_ALL oola,
WSH.WSH_DELIVERY_ASSIGNMENTS wda,
WSH.WSH_DELIVERY_DETAILS wdd
WHERE
wdd.SOURCE_HEADER_ID= ooha.HEADER_ID
AND wdd.DELIVERY_DETAIL_ID = wda.DELIVERY_DETAIL_ID
AND ooha.HEADER_ID=oola.HEADER_ID
AND wdd.SOURCE_LINE_ID=oola.LINE_ID
AND ooha.order_number= && /* Give the Sales Order Number */
AND ooha.org_id = &&; /*Give the Org Id */
SELECT wda.delivery_id,wdd.* FROM
ONT.OE_ORDER_HEADERS_ALL ooha,
ONT.OE_ORDER_LINES_ALL oola,
WSH.WSH_DELIVERY_ASSIGNMENTS wda,
WSH.WSH_DELIVERY_DETAILS wdd
WHERE
wdd.SOURCE_HEADER_ID= ooha.HEADER_ID
AND wdd.DELIVERY_DETAIL_ID = wda.DELIVERY_DETAIL_ID
AND ooha.HEADER_ID=oola.HEADER_ID
AND wdd.SOURCE_LINE_ID=oola.LINE_ID
AND ooha.order_number= && /* Give the Sales Order Number */
AND ooha.org_id = &&; /*Give the Org Id */
No comments:
Post a Comment