문제

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.

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top