Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Search and update all fields that contains string

Author  Topic 

maevr
Posting Yak Master

169 Posts

Posted - 2008-01-08 : 04:35:41
I hava at large database and I need to search all tables for the string 'NaN' and replace it to null to enable conversion.

Is there any way to do this so that i do not need to write an update query for every column?

Would appretiate an example if anyone knows how to manage this.

Thanks!

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-01-08 : 04:40:02
this might help http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

maevr
Posting Yak Master

169 Posts

Posted - 2008-01-08 : 06:54:34
Thanks!
I altered it to do an update and it worked.
Go to Top of Page
   

- Advertisement -