Re: PRO*C Source to dump table to flatfile?
Date: Mon, 11 Apr 1994 06:50:57 -0500
Message-ID: <bamon-110494065057_at_amon.cc.oberlin.edu>
In article <Co0HJu.3sB_at_eskimo.com>, gshep_at_eskimo.com (Greg Sheppard) wrote:
>
> Looking for an Oracle PRO*C program with source which would, given a
> table name, check the systems tables for pertinate info and dump all data
> in the Oracle table to a flat file. Thought some dba somewhere may have
> already done this. Thanks for any pointers.
Yep. I've done it.
It's was written for a VAX/VMS, Oracle system, and may need to be modified slightly for other systems.
It's called with 7 parameters, where only the first two are required:
_at_dumptable table owner delim order_by hdr_flag omit_cols inc_cols
param1 = table name param2 = table owner param3 = delimeter (COMMA or TAB) param4 = order by clause param5 = header_flag (Do you want a header line with column names Y or N) param6 = columns to omit param7 = columns to include
where param3 defaults to COMMA if not specified
and param4 is in the format:
col1_name,col2_name,...,coln_name
to be used as
ORDER BY param4
and param6 and param7 are in the format:
('col1_name','col2_name',...,'coln_name') to be used as
AND COLUMN_NAME NOT IN param6 AND COLUMN_NAME IN param7
and, the user running dumptable must have access to the table and columns, as indicated by rows in ACCESSIBLE_COLUMNS
Too much code to post, though, so write if you want to see it.
Jennifer R. Amon PHONE: (216) 775-6987 Houck Computing Center FAX: (216) 775-8573 Oberlin College Oberlin, OH 44074 INTERNET: bamon_at_ocvaxc.cc.oberlin.edu _____________________________________________________________________Received on Mon Apr 11 1994 - 13:50:57 CEST