I'm looking for a way to dynamically import approximately 11000 tables from an iSeries database to initially populate a SQL Server. I need to pull in Column Headings as well as data. I've come up with an approach to create all tables as .csv and have successfully imported a table although manually. I'm looking for some guidance on automating this from the SQL side. I've done some research but have yet to find a way to pull these tables in (Bulk Import only brings data?).
Any help, comments ideas are greatly appreciated.
EDIT - I have been able to place the created .csv tables on a Network drive which takes the iSeries out of the equation. My question would now be is there a way for the SQL Server to create and load many tables from csv files that are located on a network drive?
Answer by Chris_R ·
@ThomasRushton thanks for the reply. If I'm reading that correctly it looks as though the table name needs to be specified. "To create new_table from a remote source table, specify the source table using a four-part name in the form linked_server.catalog.schema.object in the FROM clause of the SELECT statement"