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

Data manipulation with in tables 1

Status
Not open for further replies.

DANZIG

Technical User
Mar 8, 2001
142
US
Hello,
I'm working with a table that I use a vbs script to populate and discovered I want to remove a peice of information from a particular field. I know how to do string manipulation in vbs but what is the sql methodology for doing something similar?

IE a filed named uptime contains vaules like 23 Days. I would like to write something in sql to query for the record with the Days trailer and remove it. So a record would go from 23 Days to 23.

Any examples I can learn from would be appreciated.


Thanks, Danzig
 
How does this work for you? Good luck!
Code:
UPDATE YourTable
SET YourColumn = Replace(YourColumn, ' Days', '')
WHERE YourColumn LIKE '% Days'


--John [rainbow]
-----------------------------------
Behold! As a wild ass in the desert
go forth I to do my work.
--Gurnie Hallock (Dune)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top