Link to home
Start Free TrialLog in
Avatar of Answering4uAnt
Answering4uAntFlag for United Kingdom of Great Britain and Northern Ireland

asked on

SQL Update and Replace across ENTIRE table

Right, this may not be possible but i'll ask anyway.

Is it possible to write a SQL statement to just say update entire table and replace ALL occurances of x with y across all columns.
If it can't be done, then i'll have to do it the long way round with UPDATE and REPLACE across each specific column

Thanks in Advance
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
There's no easy statement working on all columns.
You may list columns and use dynamic queries or just query column by column.
See attached.
query.txt
Avatar of Answering4uAnt

ASKER

Aneeshattingal, I was expecting it not to be possible and though it wasn't directly possible, your post did as good as I could have ever expected and did all the hard work in writing a long winded SQL update statement for me.

Cheers, you have saved me a lot of time
Points increased to 500, thanks for all your help