Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 14th, 2007, 10:46 PM
Authorized User
 
Join Date: Jul 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default Drop last character

Hi There

I would like to know how to update a field in a table by removing the last one or two characters.
I have values in a column called ID

03710/412.00**
13471/125.11A*
39020/266.02AA
02356/266.03**

I want to drop the *. some rows have two * and some only one.

Thanks

Greg

 
Old June 14th, 2007, 11:27 PM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
Default

UPDATE yourtable
SET ID = REPLACE(ID,'*','')

--Jeff Moden
 
Old June 17th, 2007, 03:21 PM
Authorized User
 
Join Date: Jul 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Jeff

Appriciate it

Greg

 
Old June 18th, 2007, 07:31 AM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 475
Thanks: 0
Thanked 9 Times in 9 Posts
Default

You bet... thank you for the feedback.

--Jeff Moden





Similar Threads
Thread Thread Starter Forum Replies Last Post
character entity into numeric character entity srkumar XSLT 1 November 22nd, 2007 04:53 AM
Only the first character jroxit Classic ASP Basics 1 January 23rd, 2006 03:41 PM
Character Mapping muki XSLT 2 November 11th, 2005 03:11 AM
drop down list values based on another drop down noor ASP.NET 1.0 and 1.1 Basics 3 July 5th, 2005 09:57 AM
Populating Drop Down based on other drop down jeffbarclay Java Databases 1 November 7th, 2003 12:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.