Posted on 2011-09-14
Last Modified: 2012-05-12

how can write an update statement that would search in the churchName field that has "church" word and updated to this word

Update ChurchTbl
set ChurchTbl.ChurchName = (select ChurchTbl.ChurchName from ChurchTbl
where ChurchTbl.ChurchName like '%church%')

for example:


Ada Congregational Church
Community Reformed Church
Forest Hills Bible Chapel
Keystone Community Church

the output I need is this:


Ada Congregational Chr
Community Reformed Chr
Forest Hills Bible Chapel
Keystone Community Chr

Question by:lulu50
LVL 73

Accepted Solution

sdstuber earned 500 total points
ID: 36536971
Update ChurchTbl
set ChurchTbl.ChurchName = replace(ChurchName,'Church','Chr')
where ChurchName like '%Church%'

LVL 21

Expert Comment

ID: 36536984
UPDATE ChurchTbl SET ChurchName = REPLACE(ChurchName, 'Church', 'Chr')



Author Closing Comment

ID: 36537969

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now