Did you add exclusions in where clause for when cuscl is NOT null? When searching for the records that are null--are you saying eq to ' '? Not eq to null? Hope this helps. -----Original Message----- From: michael.ellis@xxxxxxxxxxxxxxx [mailto:michael.ellis@xxxxxxxxxxxxxxx] Sent: Tuesday, December 28, 2004 12:12 PM To: mapics-l@xxxxxxxxxxxx Subject: help with an SQL to fix MAPICS file Hopefully someone on the MAPICS group knows SQL enough to help me debug my problem: I am having someone update Customer Class fields in our LIVE environment to get the data correct. We do not have the luxury of refreshing the test environment frequently. I prefer not to copy the MBBFREP from the live environment (ZZ) to the test environment (ZD). What I want to do is simply update MBBFREP (customer master) in the test environment with the value of the CUSCL field from the live environment, ignoring all other fields and handling the possible differences between the files (customers added or deleted in live or in test since the last refresh). HERE'S THE SQL I'm trying to use: update amflibd/mbbfrep a set a.cuscl= (select b.cuscl from amflibz/mbbfrep b where a.comno=b.comno and a.cusno=b.cusno and b.comno=11) HERE'S THE ERROR I'm getting: Null values not allowed in column or variable CUSCL. I've tried adding exclusions in my where clause for when the CUSCL IS NULL, etc., but nothing I'm doing is working. There are some records in ZZ that have blank in the customer class field, but when I SQL to find those with NULL values, I get nothing -- as in no records seem to contain NULL. Am I doing somthing in my subquery that would cause the result rows to be empty? Everything I've tried indicates there should be results. Any suggestions would be greatly appreciated. Thanks. Michael G. Ellis Information Systems International, Inc. A Global ERP Consulting Firm 815-398-1670 x23 Choose ISI consultants to ensure consistently top quality implementation services at all levels of your organization. "We should be known by what we belong to - not by what belongs to us." -- Unknown _______________________________________________ This is the MAPICS ERP System Discussion (MAPICS-L) mailing list To post a message email: MAPICS-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/mapics-l or email: MAPICS-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/mapics-l.
This mailing list archive is Copyright 1997-2013 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact