filtering dataset and pu the result in another datatable.
-
hi i have a dataset which consists of one tables. i need to filter this data set and store it in another table. how can i do this?
Easy
Select * into newtable from oldtable where 1 = 2 -- create empty table
insert into newtable select * from oldtable where ....Although you can do
select * into newtable from oldtable where..
this is bad practice as it locks the system tables for the duration of the query.Bob Ashfield Consultants Ltd
-
hi i have a dataset which consists of one tables. i need to filter this data set and store it in another table. how can i do this?
First decide which tehcnology you want to use, SQL or C# and then place the question on appropriate forum. Do not cross-post. It's considered rude. Another question here: http://www.codeproject.com/script/Forums/View.aspx?fid=1649&msg=2814662[^]
The need to optimize rises from a bad design. My articles[^]