Hi,
I'm trying to create a table on runtime, but this new table has to have the same definition as the source table.
My problem is this:
i'm importing a file to a table, but i wanto to send the file information to a temporary table and then merge with my final table.
the difficult part is that i have this mechanism very automated, and i can configure the columns that i want to send to the final table... and if someone adds columns to the new table, my process has to copy the information from the file, to the temporary table and after that send it to the final table. the temporary table isnt managed by anyone, and the process has to create the new columns.
So, my idea is to drop the temp table on the end of my process and create every time that i run my process...
i tried to run my query as ExecuteNonQuery, but i have an select on it that makes the compiler raise an error, and if i try to run as ExecuteReader i have the same problem on "select" (Incorrect syntax near the keyword 'select'.)
can anyone help on this?
BTW im using C#. this is suppose to be a windows services.