本文发表在 rolia.net 枫下论坛Now there are some data in invvendor.CATALOGCODE, i want to move it to inventory.il1. for one itemnum in inventory, there are more than one invvendor records.
For example: for inventory.itemnum=1, there are 3 related records: invvendor.catalogcode=a, invvendor.catalogcode=b, invvendor.catalogcode=c.
Now I want to change inventory.il1="a,b,c"
SQL> desc inventory;
Name Null? Type
------------------------------- -------- ----
ITEMNUM NOT NULL VARCHAR2(30)
LOCATION NOT NULL VARCHAR2(8)
BINNUM VARCHAR2(8)
VENDOR VARCHAR2(8)
MANUFACTURER VARCHAR2(8)
MODELNUM VARCHAR2(8)
CATALOGCODE VARCHAR2(30)
MINLEVEL NOT NULL NUMBER(15,2)
MAXLEVEL NOT NULL NUMBER(15,2)
CATEGORY NOT NULL VARCHAR2(4)
ORDERUNIT VARCHAR2(8)
ISSUEUNIT VARCHAR2(8)
CONVERSION NOT NULL NUMBER(15,2)
ORDERQTY NOT NULL NUMBER(15,2)
STDCOST NOT NULL NUMBER(10,2)
AVGCOST NOT NULL NUMBER(10,2)
LASTCOST NOT NULL NUMBER(10,2)
LASTISSUEDATE DATE
ISSUEYTD NOT NULL NUMBER(15,2)
ISSUE1YRAGO NOT NULL NUMBER(15,2)
ISSUE2YRAGO NOT NULL NUMBER(15,2)
ISSUE3YRAGO NOT NULL NUMBER(15,2)
ABCTYPE VARCHAR2(1)
CCF NOT NULL NUMBER
SSTOCK NUMBER(15,2)
DELIVERYTIME NOT NULL NUMBER
LDKEY NUMBER
IL1 VARCHAR2(10)
IL2 VARCHAR2(10)
IL3 VARCHAR2(10)
IL4 DATE
IL5 NUMBER(15,2)
IL6 VARCHAR2(1)
IL7 VARCHAR2(1)
IL8 VARCHAR2(1)
IL9 VARCHAR2(1)
IL10 VARCHAR2(1)
GLACCOUNT VARCHAR2(20)
CONTROLACC VARCHAR2(20)
SHRINKAGEACC VARCHAR2(20)
INVCOSTADJACC VARCHAR2(20)
SOURCESYSID VARCHAR2(10)
OWNERSYSID VARCHAR2(10)
EXTERNALREFID VARCHAR2(10)
APISEQ VARCHAR2(50)
INTERID VARCHAR2(50)
MIGCHANGEID VARCHAR2(50)
SENDERSYSID VARCHAR2(50)
ROWSTAMP NOT NULL VARCHAR2(40)
SQL> desc invvendor;
Name Null? Type
------------------------------- -------- ----
ITEMNUM NOT NULL VARCHAR2(30)
VENDOR VARCHAR2(8)
MANUFACTURER VARCHAR2(8)
MODELNUM VARCHAR2(8)
CATALOGCODE VARCHAR2(30)
LDKEY NUMBER
IV1 VARCHAR2(10)
IV2 VARCHAR2(10)
IV3 VARCHAR2(1)
IVCO1 VARCHAR2(10)
IVCO2 DATE
IVCO3 NUMBER(15,2)
TAX1CODE VARCHAR2(8)
TAX2CODE VARCHAR2(8)
TAX3CODE VARCHAR2(8)
BIDPRICE NOT NULL NUMBER(10,2)
BIDDATE DATE
PROMDELIVERYTIME NOT NULL NUMBER
TAX4CODE VARCHAR2(8)
TAX5CODE VARCHAR2(8)
LASTCOST NUMBER(10,2)
LASTDATE DATE
CATALOGWEBPAGE VARCHAR2(124)
SOURCESYSID VARCHAR2(10)
OWNERSYSID VARCHAR2(10)
EXTERNALREFID VARCHAR2(10)
APISEQ VARCHAR2(50)
INTERID VARCHAR2(50)
MIGCHANGEID VARCHAR2(50)
SENDERSYSID VARCHAR2(50)
ORDERUNIT VARCHAR2(8)
CONVERSION NUMBER(15,2)
ISDEFAULT NOT NULL VARCHAR2(1)
ROWSTAMP NOT NULL VARCHAR2(40)更多精彩文章及讨论,请光临枫下论坛 rolia.net
For example: for inventory.itemnum=1, there are 3 related records: invvendor.catalogcode=a, invvendor.catalogcode=b, invvendor.catalogcode=c.
Now I want to change inventory.il1="a,b,c"
SQL> desc inventory;
Name Null? Type
------------------------------- -------- ----
ITEMNUM NOT NULL VARCHAR2(30)
LOCATION NOT NULL VARCHAR2(8)
BINNUM VARCHAR2(8)
VENDOR VARCHAR2(8)
MANUFACTURER VARCHAR2(8)
MODELNUM VARCHAR2(8)
CATALOGCODE VARCHAR2(30)
MINLEVEL NOT NULL NUMBER(15,2)
MAXLEVEL NOT NULL NUMBER(15,2)
CATEGORY NOT NULL VARCHAR2(4)
ORDERUNIT VARCHAR2(8)
ISSUEUNIT VARCHAR2(8)
CONVERSION NOT NULL NUMBER(15,2)
ORDERQTY NOT NULL NUMBER(15,2)
STDCOST NOT NULL NUMBER(10,2)
AVGCOST NOT NULL NUMBER(10,2)
LASTCOST NOT NULL NUMBER(10,2)
LASTISSUEDATE DATE
ISSUEYTD NOT NULL NUMBER(15,2)
ISSUE1YRAGO NOT NULL NUMBER(15,2)
ISSUE2YRAGO NOT NULL NUMBER(15,2)
ISSUE3YRAGO NOT NULL NUMBER(15,2)
ABCTYPE VARCHAR2(1)
CCF NOT NULL NUMBER
SSTOCK NUMBER(15,2)
DELIVERYTIME NOT NULL NUMBER
LDKEY NUMBER
IL1 VARCHAR2(10)
IL2 VARCHAR2(10)
IL3 VARCHAR2(10)
IL4 DATE
IL5 NUMBER(15,2)
IL6 VARCHAR2(1)
IL7 VARCHAR2(1)
IL8 VARCHAR2(1)
IL9 VARCHAR2(1)
IL10 VARCHAR2(1)
GLACCOUNT VARCHAR2(20)
CONTROLACC VARCHAR2(20)
SHRINKAGEACC VARCHAR2(20)
INVCOSTADJACC VARCHAR2(20)
SOURCESYSID VARCHAR2(10)
OWNERSYSID VARCHAR2(10)
EXTERNALREFID VARCHAR2(10)
APISEQ VARCHAR2(50)
INTERID VARCHAR2(50)
MIGCHANGEID VARCHAR2(50)
SENDERSYSID VARCHAR2(50)
ROWSTAMP NOT NULL VARCHAR2(40)
SQL> desc invvendor;
Name Null? Type
------------------------------- -------- ----
ITEMNUM NOT NULL VARCHAR2(30)
VENDOR VARCHAR2(8)
MANUFACTURER VARCHAR2(8)
MODELNUM VARCHAR2(8)
CATALOGCODE VARCHAR2(30)
LDKEY NUMBER
IV1 VARCHAR2(10)
IV2 VARCHAR2(10)
IV3 VARCHAR2(1)
IVCO1 VARCHAR2(10)
IVCO2 DATE
IVCO3 NUMBER(15,2)
TAX1CODE VARCHAR2(8)
TAX2CODE VARCHAR2(8)
TAX3CODE VARCHAR2(8)
BIDPRICE NOT NULL NUMBER(10,2)
BIDDATE DATE
PROMDELIVERYTIME NOT NULL NUMBER
TAX4CODE VARCHAR2(8)
TAX5CODE VARCHAR2(8)
LASTCOST NUMBER(10,2)
LASTDATE DATE
CATALOGWEBPAGE VARCHAR2(124)
SOURCESYSID VARCHAR2(10)
OWNERSYSID VARCHAR2(10)
EXTERNALREFID VARCHAR2(10)
APISEQ VARCHAR2(50)
INTERID VARCHAR2(50)
MIGCHANGEID VARCHAR2(50)
SENDERSYSID VARCHAR2(50)
ORDERUNIT VARCHAR2(8)
CONVERSION NUMBER(15,2)
ISDEFAULT NOT NULL VARCHAR2(1)
ROWSTAMP NOT NULL VARCHAR2(40)更多精彩文章及讨论,请光临枫下论坛 rolia.net