Welcome Guest Login SignUp

Home

Technical

Functional

CNC

AS400

DB2

    Citrix

JDE News

Live Radio

Feedback

JDE Forum Comments/Reviews/Queries
1440 day(s) ago   #224
Name: Nick
Category: Technical
Location: Singapore
Date: 2016-06-15 20:46:38
Replies(0)

Status:
  #224

SQL to Compare Records in two Different Environments for a Table

We found it very handy in finding records for a table that are available in one environment but not in a different environment using EXCEPT clause.

SELECT * FROM [JDE_DEVELOPMENT].TESTCTL.F951000
EXCEPT
SELECT * FROM [JDE_PRODUCTION].PRODCTL.F951000

It can also be used to do the insert of those records that are missing by adding an INSERT INTO statement.

INSERT INTO [JDE_PRODUCTION].PRODCTL.F951000
SELECT * FROM [JDE_DEVELOPMENT].TESTCTL.F951000
EXCEPT
SELECT * FROM [JDE_PRODUCTION].PRODCTL.F951000

Note that MINUS clause can also be used as alternative to EXCEPT.
Post Comments/Queries
Email:*
Name:*
Details:*
 
   
* Required Entry Field(s).  * Your comments may subject to varification.  * Your email ID will not appear in the forum.
 
Disclaimer: Most of the posts in this blog cater solutions/suggestions/workaround to issues for specific tools release or JDE E1 version and are just information only. Please be carefule while applying it in your environment. JDEthread will not be responsible for any data loss or spec corruption (if any).
Copyright © 2010 - 2020 JDEthread.in