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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace a zero with a one

Status
Not open for further replies.

DJN

Technical User
Jun 29, 2001
100
GB
Hi all. I have some 20,000 records where the 6th character needs to be changed from a 0 to a 1. It is the 6th character every time. Any ideas greatly appreciated.


David
 
Here is some psuedo code to try...

UPDATE Table1 SET Field2 = MID(Field2,1,5) & IIF(MID(Field2,6,1) = '0', '1', MID(Field2,6,1)) & MID(Field2,7);

SJM

Steve Medvid
"IT Consultant & Web Master"
 
Thanks Steve. Works a treat.

David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top