Update giving different SQL

TimPierce

Reputable Poster
Hi List,

I have an update statement in a NER that is giving a different SQL Statement (obtained from jdedebug.log) in two different environments.

The ER Update is exactly the same but one environment is adding an extra SQL line checking the IOLOTS field (as below). There are table triggers on the F4108 but it doesn't look like these are adding the extra line. Where else could the IOLOTS line have come from?

Development Environment

UPDATE TESTDTA.F4108
SET IOMMEJ=0,
IOUSER='TPIERCE',
IOPID='N550003',
IOUPMJ=107061,
IOTDAY=104138.000000,
IOJOBN='ARROWCLT10',
IOLRP1='FIN',
IOBBDJ=0,
IOSBDJ=0,
IOU1DJ=0
WHERE ( IOLOTN = 'TEST7 '
AND IOITM = 103805.000000
AND IOMCU = ' MAL1' )
AND ( IOLOTS NOT BETWEEN ' ' AND ' ' )

Production Environment

UPDATE TESTDTA.F4108
SET IOMMEJ=0,
IOUSER='TPIERCE',
IOPID='N550003',
IOUPMJ=107061,
IOTDAY=104138.000000,
IOJOBN='ARROWCLT10',
IOLRP1='FIN',
IOBBDJ=0,
IOSBDJ=0,
IOU1DJ=0
WHERE ( IOLOTN = 'TEST7 '
AND IOITM = 103805.000000
AND IOMCU = ' MAL1' )
 
Solved.

There was a rogue line of security that was adding an extra line at the end of the SQL statement.
 
Hi,

I'd suggest you to check :

1. If DV and PD are on different servers, then check
that they're on the same DB release, JDE Tools level,
compiler release and same OS level.
2. If not, then check that the NER itself is identical
in DV and PD; you can use ER Compare from OMW or print
both to flat text files and then compare them.
3. Finally, if both NER are the same, check that the
NER has been built and deployed on the second environment.
 
Solved.

There was a rogue line of security that was adding an extra line at the end of the SQL statement.
Hi, I know its been quite sometime but could you please let me know how you resolved this. Thank you!
 
It should be a security statemens. Check P00950 security row for F4108 and LOTS field by user/role.
Hi, I know its been quite sometime but could you please let me know how you resolved this. Thank you!
 
Thank you very much. I was able to resolve this, I checked the user role assigned on P95921 which had row security restricting the access of all the MCUs, thereby adding extra lines in the SQL statement.
 
Back
Top