SteveEClarke (9/16/2013)
HI,Is it possible to achieve the following ;
I have a table with say ... 200 Fields and I want to check each field for a value and possibly update if a match is found.
something like...
FOR EACH "FieldWithinMyTable" as FieldChecker
IF FieldChecker = 'FoundIt' then
update FieldChecker with new fielddata
ENDIF
NEXT
Would need a lot more details about your tables and such before anybody can offer much advice here. Please take a few minutes and read the first link in my signature. I am pretty sure we can come up with a solution that doesn't require looping but hard to know for sure until we have some details to work with.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/