Yes. I have a table already created. I had to look again to be sure of the fields. I was mistaken from before. The table has 1 NOT NULL field - it's the Identity column. You gave code to ignore that column in the -- Physical Table section - and that works perfectly.
The next two columns are not in the xml spreadsheet. The xml spreadsheet's 1st column is the pre-created table's 4th column.
identity column, not exist in ss, not exist in ss, text4 col.
When I run the SP, the identity column increments as it should, the two not exist columns contain NULL, as expected, and the text4 col plus the remaining 117 columns have data from the xml spreadsheet.
What I'd like to have is the ability to pass in the data for the two 'not exist' columns so that all the data goes into the 'pre-created' table.
I have this so far...
In the SP above @Debug tinyint=0, I have...
In the SELECT after BEGIN TRY, I have...
-- Check valid excel file name is given
And because these two fields are needed, I have added the appropriate RAISERROR code.
What I need help on, is where do I insert these variables so that they will 'insert' into the 'pre-create' table in the appropriate columns.