select then insert

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have a select which then returns a set of data,

As soon as I return this data I want to insert it into another table, can someone direct me how to do this?

the table i want it to go into is local and I can use an SP, however the other isn't and i cant use an SP on it

Thanks
Mark
 
Do you mean you want to create a Local System.Data.DataTable object and then
copy the contents to another System.Data.DataTable object, or do you want to
take the results of a query and then insert them into a Database Table? If
so, Select Into or Insert Into done totally server side may be the better
method. On the other hand, if you just need it locally and you aren't going
to use the Local datatable to populate a Table on the server, using the
..Copy or .Clone methods should do it for you....it'd be easier to nail down
precisely if I knew what you wanted to do with the data after you get it
into the second table and where this second table is.

HTH,

Bill
mark said:
Hi
I have a select which then returns a set of data,

As soon as I return this data I want to insert it into another table, can
someone direct me how to do this?
the table i want it to go into is local and I can use an SP, however the
other isn't and i cant use an SP on it
 
Back
Top