Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RE: Easy Update Statement.... 1

Status
Not open for further replies.

allyne

MIS
Feb 9, 2001
410
US
Hi Everyone,

This should be easy....but...

I have a table called Page that holds our .tif files and looks something like this.

Document_ID =
CD659B99-6A80-48E1-98CC-7710D36CDBF3
B1960F5F-FDB1-42F8-8259-419D0F83A621

File_Name =
B77E7A74-CA7A-46B4-BD41-F57C1980A119.tif
FF1EE28F-6B04-485C-B744-AF5C756C3B19.tif

What I need to do is Update the File_Name Field to a .jpg. This table has millions of rows in it. So what I want to do and of course this errors out is to have something like this.

Update Page
Set Right(File_Name,3) = 'jpg'
From Page

Any Suggestions?

Thanks for all your help!
 
Maybe a simple replace???

Code:
Update Page 
Set    File_Name = Replace(File_Name, '.tif','.jpg')
Where  File_Name Like '%.tif'


-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Hmmm....I knew it was easy! I should have thought about that! It's Friday and I'm Fried!

Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top