Stuart McLachlan
stuart at lexacorp.com.pg
Tue Oct 5 07:14:01 CDT 2010
Don't know, but my gut feeling is that a single pass has got to be way more efficient that 540 of them. Why not try it on a subset of the records and see how long it takes. -- Stuart On 5 Oct 2010 at 7:12, jwcolby wrote: > Stuart, > > Would this really work? Given that it is simultaneously updating 540+ > fields for 50 million rows, would it ever finish? > > I could have my assistant dynamically create this sql statement if you > think this is a viable alternative. > > John W. Colby > www.ColbyConsulting.com > > On 10/4/2010 6:39 PM, Stuart McLachlan wrote: > > At 1/2 hour / field, it should only take about 11.25 days :-) > > > > But my question is, do you have to do it a single field at a time? > > can't you update all the fields in a single pass? Something like: > > > > Update mytable set > > field1 = case field1 > > when " " then Null > > else field1 > > end, > > field2 = case field2 > > when " " then Null > > else field2 > > end, > > field3 = case field3 > > when " " then Null > > else field3 > > end, > > ... > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > >