I have an inherited table that is going to be used for reporting (will not be updated). It contains over 150 columns. In each of the columns a row might have a "real" value, but could also have a blank or null. I would like to set each of the blank values to null. I can do that with the following type of query:
update mytable
set mycolumn = NULL
where len(mycolumn) = 0
Is there a way (with code I'm guessing) to avoid running a separate query for each of the 150+ columns in my database?
Thanks for your help
update mytable
set mycolumn = NULL
where len(mycolumn) = 0
Is there a way (with code I'm guessing) to avoid running a separate query for each of the 150+ columns in my database?
Thanks for your help