×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Don,

Do you have an algorithm to fix the data?  I.e., how do you determine what
the value should be?

IIRC, I had a situation where a field was messed up and should have been 0.
So I could "UPDATE filename SET fieldname = 0 WHERE (fieldname < 0) OR
(fieldname > 99999)".  This worked because I knew it should not be negative
and it was a 5-digit zoned decimal field, so 99999 was the largest value it
could hold.

I haven't used SQL to fix dec data errors in a few years - so I don't know
what may have changed as to how it handles these errors.  I.e., will the SQL
command fail when it reads a dec data error?  I'm not sure on newer
releases.

Chuck

----- Original Message -----
From: "Fisher, Don" <DRF@HeiligMeyers.com>
To: <midrange-l@midrange.com>
Sent: Monday, August 27, 2001 8:17 AM
Subject: Invalid decimal data


> We have a series of files, possible all of them, containing invalid
decimal
> data in some fields.  The only two ways I can think of to identify them
are
> to create an RPG program that will interrogate each field by executing a
> Z-ADD operation and checking the error indicator or to execute an SQL
> statement using each numeric field in the selection criteria.  The
statement
> should fail upon encountering invalid decimal data.  The trouble with the
> latter method is it won't allow me to fix the data.  At least I don't
think
> so.
>
> Does anyone out there know a more pleasant and convenient way to do this?
>
> Any help, as always, will be greatly appreciated.
>
> Donald R. Fisher, III
> Project Manager
> Heilig-Meyers Furniture Company
> (804) 784-7500 ext. 2124
> Don.Fisher@HeiligMeyers.com
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
>
>



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.