473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

syntax for updatetext

hello,

i would like to update a column called footer in a table called
agency. i have to update about 60 different records in this table.
footer is varchar(200)

i would like to search for "<table bgcolor="#cccccc"" and replace it
with "<table "

there is stuff before and after the start of the table tag.

i looked at the books online and could not get the syntax correct.

am i using the right command? updatetext, or should i do this with a
loop?

thanks in advance.
nicholas.gadacz
Jul 20 '05 #1
3 5577
Nicholas,

This script will do what you want. Don't forget to add a WHERE clause to it
if you want it to check only a portion of your table.

update YourTable
set footer = replace(footer, '<table bgcolor="#cccccc"', '<table ')

Shervin

"First Tracks Research" <in**@ftresearch.com> wrote in message
news:4d**************************@posting.google.c om...
hello,

i would like to update a column called footer in a table called
agency. i have to update about 60 different records in this table.
footer is varchar(200)

i would like to search for "<table bgcolor="#cccccc"" and replace it
with "<table "

there is stuff before and after the start of the table tag.

i looked at the books online and could not get the syntax correct.

am i using the right command? updatetext, or should i do this with a
loop?

thanks in advance.
nicholas.gadacz

Jul 20 '05 #2


what happens if the field is ntext? how does that change the process? do
you have to use updatetext in dealing with that field type?

thanks again.

nicholas.gadacz

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #3
Yes, you must use UPDATETEXT on text, ntext and image data types. Take a
look at the sample in SQL Server Books Online.

Shervin
"nick gadacz" <in**@ftresearch.com> wrote in message
news:3f***********************@news.frii.net...


what happens if the field is ntext? how does that change the process? do
you have to use updatetext in dealing with that field type?

thanks again.

nicholas.gadacz

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
22
by: Tuang | last post by:
I'm checking out Python as a candidate for replacing Perl as my "Swiss Army knife" tool. The longer I can remember the syntax for performing a task, the more likely I am to use it on the spot if...
14
by: Sandy Norton | last post by:
If we are going to be stuck with @decorators for 2.4, then how about using blocks and indentation to elminate repetition and increase readability: Example 1 --------- class Klass: def...
0
by: Dev | last post by:
Hi Fellows, I am trying to write a User Defined Function in SQL 2000 to accept a Parameter of type Text Field and then Do a replace function to manipulate the some strings inside that text data....
19
by: Nicolas Fleury | last post by:
Hi everyone, I would to know what do you think of this PEP. Any comment welcomed (even about English mistakes). PEP: XXX Title: Specialization Syntax Version: $Revision: 1.10 $...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
4
by: Dan | last post by:
Hi all, I am creating a search table where the keywords field is made up of several text fields and this is causing me some problems. I can concatentate the text ok but i can't seem to concatenate...
5
by: Zamdrist | last post by:
I need to update/change the text in a table column of data type TEXT. It's a smaller set of records (72) where I need to append onto the end a string of text, the same for all records. I don't...
3
by: Artie | last post by:
I have a question on the UPDATETEXT function (SQL 2000) The below query works and only updates the record where p.pub_id = pr.pub_id. I just don't quite understand why only 1 record is updated...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.