• Welcome to the upgraded JDELIST forum and thank you for your patience.
    Please restrict discussions and issues regarding the new forum software to the Off Topic forum. We will be monitoring that forum for issues.
    If you have trouble logging in, please reset your password using the forgotten password form: https://www.jdelist.com/community/index.php?lost-password/
    If you are unable to successfully reset your password, please contact us: Click here!
    We hope that you enjoy the upgraded forum.
  • Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

JDE Table Data Back up and Restore ( Modified Table structure)

OmmSai99

Member
Hi,

I have a requirement to modify an existing table with 5 new columns to added to that.
we need the existing data back up and after table modification need to restore the existing data back up ( with Null Values into the new columns)

Could you suggest the best way to do this . with sample SQLs for data back up and restore with new table structure.

We are into E9.1


Thanks
 

goxxxxx

Member
Hi, see attached sample SQL to do it.
--------------------
--- PRODDTA.F55M0001
--------------------

create table PRODDTA.F55M0001_20181203 as select * from PRODDTA.F55M0001

select count(*) from PRODDTA.F55M0001_20181203
select count(*) from PRODDTA.F55M0001

desc PRODDTA.F55M0001

--- create table from JDE

INSERT INTO PRODDTA.F55M0001 (SIKCOO ,SIDOCO ,SIDCTO ,SILNID ,SILITM ,SI55MDNN ,SI55MDND ,SI55MTDN ,SI55MGRWT,SI55MITWT,SI55MVLG ,SI55MIMT ,SI55MHUC ,SI55MRNTP,SI55MLIHU,SI55MVANM,SI55MOCC ,SI55MLN ,SI55MQI ,SIURCD ,SIURDT ,SIURAT ,SIURAB ,SIURRF ,SIUSER ,SIPID ,SIJOBN ,SIUPMJ ,SIUPMT ,SI55UFS01,SI55UFS02,SI55UFS03,SI55UFS04,SI55UFS05,SI55UFS06,SI55UFS07,SI55UFS08,SI55UFN09,SI55UFN10,SI55UFN11,SI55UFN12,SI55UFN13,SI55UFN14,SI55UFN15,SI55UFN16,SI55UFD17,SI55UFD18,SI55UFF19,SI55UFF20
,SI56SRCDT,SI56DS0019,SI56DS0020,SIUK02)
SELECT
SIKCOO ,SIDOCO ,SIDCTO ,SILNID ,SILITM ,SI55MDNN ,SI55MDND ,SI55MTDN ,SI55MGRWT,SI55MITWT,SI55MVLG ,SI55MIMT ,SI55MHUC ,SI55MRNTP,SI55MLIHU,SI55MVANM,SI55MOCC ,SI55MLN ,SI55MQI ,SIURCD ,SIURDT ,SIURAT ,SIURAB ,SIURRF ,SIUSER ,SIPID ,SIJOBN ,SIUPMJ ,SIUPMT ,SI55UFS01,SI55UFS02,SI55UFS03,SI55UFS04,SI55UFS05,SI55UFS06,SI55UFS07,SI55UFS08,SI55UFN09,SI55UFN10,SI55UFN11,SI55UFN12,SI55UFN13,SI55UFN14,SI55UFN15,SI55UFN16,SI55UFD17,SI55UFD18,SI55UFF19,SI55UFF20,
' ' as SI56SRCDT,0 as SI56DS0019, ' ' as SI56DS0020, 0 as SIUK02
FROM PRODDTA.F55M0001_20181203

select count(*) from PRODDTA.F55M0001_20181203
select count(*) from PRODDTA.F55M0001

----drop table PRODDTA.F55M0001_20181203
 
Top