Question

Is there an ability to import fixed width file to oracle? Preferably through .net(c#) for catching errors during import and showing them to user.

P.S. File has 5 types of rows. For example 1 row has 5 columns, 2-nd has 50 columns.

Was it helpful?

Solution

If you are able to generate or place the files on the database host (or a file share that the database host can access), you can use Oracle externally-defined tables, which let you use a SQL*Loader-like description of the file to make it appear as a table to the Oracle RDBMS for selects, joins, etc. After the first access to the file, an exceptions file will be generated on the filesystem that contains the errors - you could even bind a second table to this file to show the errors.

The "tables" will be SELECT-only however.

OTHER TIPS

If you want to use .net/c# then you'll probably need to write your own methods to do it.. but if you want to use standard tools, then SQL*Loader is what you want.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top