Hi,
I was wondering if it is possible to update one table with another tables values depending on a where condition, such as a insert into or using a join as a subquery.
I have successfully got a windows application to do what I want it to do but it involves a lot of extra work (for the data, not me) and takes a long time
It's simply :
Pseudo Code
string data = //Select required field from 'table1' adding a comma between each result.
string[] split = data.Split(',');
foreach (string record in split)
{
string newData = //Select required field from 'table2' where fld1 = 'newData'
//Insert 'newData' into 'table1' where fld1 = 'data'
}
This works but I have 88,000 records so far and each day that'll grow. At the moment this script can do about 2 - 4 records per seconds, so even at the most optimistic ((88000 / 4) * 60) *60) - will take over 6 hours to complete.
I need this to be updated at the very least daily, every 12 hours if possible. Which means this works, for now. After I hit about 175000 it will take more than 12 hours
So as I asked before is there some sort of SQL query that will do the same job but, hopefully, faster