select * from po_headers_all
/* Formatted on 17-09-2011 19:25:32 (QP5 v5.115.810.9015) */
CREATE TABLE PO_HEADERS_ALL_17SEP11
AS
SELECT * FROM po_headers_all
CREATE TABLE XX_186_PO_TERMS
(
PO_NO VARCHAR2 (10),
R11_TERMS_ID NUMBER,
R11_TERMS VARCHAR2(50),
R12_TERMS_ID NUMBER,
R12_TERMS VARCHAR2(50)
)
/* Formatted on 17-09-2011 19:46:51 (QP5 v5.115.810.9015) */
UPDATE po_headers_all POH
SET POH.TERMS_ID =
(SELECT R12_TERMS_ID
FROM XX_186_PO_TERMS
WHERE PO_NO = POH.SEGMENT1 AND POH.ORG_ID = 90)
SELECT R12_TERMS_ID FROM XX_186_PO_TERMS , po_headers_all POH WHERE PO_NO=POH.SEGMENT1
SELECT TERMS_ID FROM PO_HEADERS_ALL WHERE SEGMENT1 IN ( SELECT PO_NO FROM XX_186_PO_TERMS)
AND ORG_ID IN ( 90)
/* Formatted on 17-09-2011 19:50:53 (QP5 v5.115.810.9015) */
/* Formatted on 17-09-2011 19:51:13 (QP5 v5.115.810.9015) */
UPDATE po_headers_all POH
SET POH.TERMS_ID =
(SELECT R12_TERMS_ID
FROM XX_186_PO_TERMS
WHERE PO_NO = POH.SEGMENT1 AND POH.ORG_ID = 90)
WHERE POH.SEGMENT1 IN (SELECT PO_NO FROM XX_186_PO_TERMS)
and org_id =90
/* Formatted on 17-09-2011 19:25:32 (QP5 v5.115.810.9015) */
CREATE TABLE PO_HEADERS_ALL_17SEP11
AS
SELECT * FROM po_headers_all
CREATE TABLE XX_186_PO_TERMS
(
PO_NO VARCHAR2 (10),
R11_TERMS_ID NUMBER,
R11_TERMS VARCHAR2(50),
R12_TERMS_ID NUMBER,
R12_TERMS VARCHAR2(50)
)
/* Formatted on 17-09-2011 19:46:51 (QP5 v5.115.810.9015) */
UPDATE po_headers_all POH
SET POH.TERMS_ID =
(SELECT R12_TERMS_ID
FROM XX_186_PO_TERMS
WHERE PO_NO = POH.SEGMENT1 AND POH.ORG_ID = 90)
SELECT R12_TERMS_ID FROM XX_186_PO_TERMS , po_headers_all POH WHERE PO_NO=POH.SEGMENT1
SELECT TERMS_ID FROM PO_HEADERS_ALL WHERE SEGMENT1 IN ( SELECT PO_NO FROM XX_186_PO_TERMS)
AND ORG_ID IN ( 90)
/* Formatted on 17-09-2011 19:50:53 (QP5 v5.115.810.9015) */
/* Formatted on 17-09-2011 19:51:13 (QP5 v5.115.810.9015) */
UPDATE po_headers_all POH
SET POH.TERMS_ID =
(SELECT R12_TERMS_ID
FROM XX_186_PO_TERMS
WHERE PO_NO = POH.SEGMENT1 AND POH.ORG_ID = 90)
WHERE POH.SEGMENT1 IN (SELECT PO_NO FROM XX_186_PO_TERMS)
and org_id =90
No comments:
Post a Comment