Monday, January 2, 2017

Update GLPT in F4101/F4102/F41021 - JD Edwards SQL

     
   
declare @glpt varchar(4)
declare @mcu varchar(12)
set @glpt='XX12'
set @mcu='ZZZZWFFF'

--select ibglpt,* from proddta.f4102 where ltrim(ibmcu)=@mcu
--select liglpt,* from proddta.f41021 where ltrim(LIMCU)=@mcu
--select * from proddta.f4101 where imitm in(select distinct IBLITM from proddta.f4102 where ltrim(ibmcu)=@mcu)

update proddta.f4102 set ibglpt=@glpt where ltrim(ibmcu)=@mcu
update proddta.f41021 set LIGLPT=@glpt where ltrim(LIMCU)=@mcu
update proddta.f4101 set imglpt=@glpt where imitm in(select distinct IBITM from proddta.f4102 where ltrim(ibmcu)=@mcu)

No comments: