i give up. I'm running a series of update queries with an ADODB connection, w/ SQL Server 2000. I keep hitting a connection timeout, even though I thought I set up the connection to not allow that.
My connection string is:
I'm running an update query, which does take a time on the larger tables (10million+ recs). Maybe I should split my updates field by field, but I don't mind walking away and letting it run, and I would think it's faster overall to update the fields all at once in each table.
A sample of the SQL is:
update t1 set t1.AvgUnitSz = t2.fld1, t1.TotHHs = t2.fld2, t1.AvgHHSz = t2.fld3, t1.POC = t2.fld4
from tblBaseBG t1 inner join (select bg_id, ROUND(avg(CAST(UnitSize AS DECIMAL)),2) fld1,
count(Ind_ID1) fld2, ROUND(avg(CAST(Hhcount AS DECIMAL)),2) fld3,
sum(case when POC='Y' then 1 else 0 END) fld4 from tblLL_HH_AL group by bg_id) t2
on t1.NAME = t2.bg_id;