I'm using sqlldr to load a file which has a numerical value as one of its fields.
The problem is that in some of the records the number has commas whereas in other, it doesn't.
So doing something like
num "to_number(:num, '999,999,999.99')",
loads the records with commas but not those without commas and doing
num "to_number(:num)",
loads only those without commas.
Is there a way to tell Oracle (sqlldr) that the comma is optional?
Best Answer
Here you go:
Obviously you may need to fiddle with the
fields terminated by ',' enclosed by '"'
part to suit your data.