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

Update end of field

Status
Not open for further replies.

rekhatr10

Programmer
Joined
Apr 2, 2004
Messages
67
Location
US
Hi Everyone,


I have to update drugs table

Date looks like this
DRugName Strength
O-Cal-D 250 mg-125 u
Os Cal 500 with D 500 mg-200 iu
Os-Cal with D 500 mg-125 u

I have to replace u with unit and iu with internation unit. How can I write a update statment without taking data in front of u

Thank you
RR
 
Is all the data in that format, i.e. a few digits, 'mg-' and then a few more digits and then either ' iu' or ' u', note the space before the iu or u

if so you could do it by using replace:
Code:
update drugs
set dbname = replace(dbname, ' u', ' iu')

"I'm living so far beyond my income that we may almost be said to be living apart
 
Hmckillop

Thank you very much. It worked!!


RR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top