|
How 'bout:
where CHAR(thictl) = FCDKEY8
On 17-Mar-2014 10:57 -0700, J Franz wrote:
Well I spoke too soon...
The visual studio client editor won't pass the DIGITS keyword.
How can I do something like this: cast(thictl as char)= FCDKEY8
but where result of cast has leading zeros ? Must be code Visual
Studio will accept.
btw - FCDKEY8 does have non numeric characters in some records -
it's a generic sorting field of Content Manager, and only the
records that have our control number in FCDKEY8 should be selected
(and they have leading zeros like '002021234'
J Franz on Monday, March 17, 2014 1:16 PM wrote:
Appreciate all the responses. It appears the derived column in
the join stmt was the killer (trying to join from number to text
field (and prob 7 year old code)) - this is 15 lines into the SQL
stmt and executes 1 - 2 minutes
...
FROM DT LEFT JOIN EKD0312S8
ON FCDKEY8 =
CHAR(INSERT( CHAR(THICTL)
, 1
, 0
, (REPEAT('0'
, LENGTH(THICTL) - CHARACTER_LENGTH(THICTL)
)
)
)
, 9)
AND FCDCODE LIKE 'GBILL%'
... more stmts <ed: ¿predicates?>
was changed to (executes 1 - 2 seconds)
...
FROM DT LEFT JOIN EKD0312
ON digits(THICTL) = FCDKEY8
AND FCDCODE LIKE 'GBILL%'
... more stmts <ed: ¿predicates?>
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.