× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I have a text file with a date in a fixed position, I need to convert as much as possible from the file to a table. This works almost fine:

SELECT decimal(substring(txt, 5, 7)) as codigo,
cast(substring(txt, 84, 4) || '-' || substring(txt, 88, 2) || '-' || substring(txt, 90, 2) as date) as fecha
FROM libr.file

It goes Ok until it finds a wrong date. (19570229 is the first problem) this is in record 2,035, the SQL gives a SQL0180 and it stops. It will be Ok to skip the record. Is there a way to tell SQL to skip the wrong date? or a way to select all records with wron dates?
It is a one time convertion.

TIA

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-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.