Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

FN-FORUM: T-SQL Question

date posted 8th March 2006 15:35

Well it's probably a general SQL question really.

I have a very small table with two simple rows, an id and a sentence of
text.

I have a small problem in that the text has been added online (ages ago) and
some of the text has " instead of " (I assume output escaping wasn't
considered!)

So my question is... How can I create a query to do a batch update of all
the records that contain these elements?

The query I have so far is just a simple update query that looks like this:

UPDATE table
SET text = '"text inside quote marks..."'
WHERE text like '%"%'

However, I've found out there other tables affected by this problem and it
will take me an awwwwwful long time to update them all with writing out
single UPDATE queries.

Oh and the table has no relationship (thank the lord!!!)

TIA

Stephen.




Messages by Day
March 31st 2006
March 30th 2006
March 29th 2006
March 28th 2006
March 27th 2006
March 26th 2006
March 25th 2006
March 24th 2006
March 23rd 2006
March 22nd 2006
March 21st 2006
March 20th 2006
March 19th 2006
March 18th 2006
March 17th 2006
March 16th 2006
March 15th 2006
March 14th 2006
March 13th 2006
March 12th 2006
March 11th 2006
March 10th 2006
March 9th 2006
March 8th 2006
March 7th 2006
March 6th 2006
March 5th 2006
March 4th 2006
March 3rd 2006
March 2nd 2006
March 1st 2006


Messages by Month
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000