|
From: Steve Richter <stephenrichter@xxxxxxxxx><midrange-l@xxxxxxxxxxxxxxxxxx>,
To: Midrange Systems Technical Discussion
Date: 05/17/2019 02:48 PMview?
Subject: [EXTERNAL] Re: why data translate error when selecting from
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx>the
On Fri, May 17, 2019 at 3:34 PM Peter Dow <petercdow@xxxxxxxxx> wrote:
I'm curious why you want to stick with the LENGTH(TRIM(A.CPCSID))
instead of TRANSLATE? I would think the TRANSLATE is safer, in that
itLENGTH statement doesn't guarantee that the date is numeric. I mean,
tomay work with your data, but in the general case it wouldn't.
TRANSLATE seems harder to read and maintain. Also was thinking TRIM
should run quicker than TRANSLATE.
I am still kind of shocked that SQL will not let me safely run a CASE
statement to convert character data to decimal. The code clearly states
convert the character field to decimal when the TRIM(LENGTH()) is = 10.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.