Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
Jeff Young on 02/11/2013 11:45 AM wrote:
Try this:Does SQL support SUBSTR on an numeric?
SELECT f1.f2.etc.
from Datafile
where substr(OrderQty, 1, 1) = x'40'
Replace the f1,f2,etc with field names from the file, but not the
OrderQty which SQL will see as invalid data.
You could write a UDF to read this column
select columna, columnb, myRpgUdfToConvertThisToNumeric(columnc)...
Hopefully that won't process it before it passes it out to the UDF.
<<SNIP>>
If you can overlay the numeric with a character by the use of a view
perhaps you clean it up with a common table expression first.
Not that you want to hear this but I just have to pipe in that if
you created this file with SQL's DDL instead of DDS you wouldn't be
having this issue.
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.