How to Parse a string in SQl...not always easy...I imagine it really shouldn't have been difficult for M$ to make some T-SQL extensions, but they didn't (or at least up to 2k5...gotta look more into 2k8)
Even in REXX we had some nice features...like MASK, WORD, WORDS, etc.
So SQL Server Database devloper slaves are usually left with a myriad of slick hacks..REVERSE, CHARINDEX (to the nth degree), and ultimatley looping with logic in a User Defined Function (UDF)
In any case, we had an OP in this thread, "Parse String, Extract Multiple Parts of a Sting" ask how to parse out...
Ran across this thread
And figured I'd post this. The code below will generate update statement for all tables that have a char data type. It will then replace a quote (") with an empty sting
Guess you could automate this, but this is simple enough. Just cut and paste the results and execute that. I guess you could go on and schedule it to run nightly to do a clean up.
Hope you have a backup BEFORE you run the result set
CREATE TABLE #myTemp99 (n int IDENTITY(1,1), TABLE_NAME varchar(256), COLUMN_NAME varchar(256))
INSERT INTO #myTemp99(TABLE_NAME, COLUMN_NAME)
SELECT TABLE_NAME, COLUMN_NAME