Thursday, January 5, 2017

Convert JDE Julian date to Calendar date PL/SQL


convert Julian date to Calendar date Oracle


select to_char(to_date(GLDGJ+1900000,'YYYYDDD'), 'MM/DD/YYYY') as adate , gldgj from  PRODDTA.F0911 where gldgj>116360

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)