![]() |
|
|
|
#1 |
|
Could anyone help me here I have products in a table, but I need to select a distinct list, the list contains the following:
Contract Purchase Advance Advance Hire Purchase Advance Advance Hire Purchase Arrears Finance Lease Advance In the case of the first couple of lines I need to replace only 1 instance of 'Advance' not both. Is there anyway I could do this, I know the Replace() function does not replace only one instance, i.e. Select Replace(ProductNames, 'Advance', '') from ProductList Would removed both instances, could anyone help me please? Thanks in Advance, Steve skb3 |
|
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Oct 2007
Location: London
Posts: 20
|
Is the repeated word in this case "Advance" always repeated word after word or it could be anywhere in the data?
If the repeatition is always word after word you can just modify your statement a bit like below Select Replace(ProductNames, 'Advance Advance', 'Advance') from ProductList Regards, UrStop urstop |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Prerequisites 70-745 (Business Intelligence) | Valmont | MCITP | 3 | 06-24-2008 03:03 PM |
| SQL Server 2008 delayed into Q3 2008 | darrilgibson@cox.net | MCITP | 0 | 01-27-2008 10:26 PM |
| MCITP SQL Server 2005 or SQL Server 2008 | Darrilgibson@gmail.com | MCITP | 0 | 12-19-2007 01:56 PM |
| SQL Server 2005 Migration Assistant Autonumber problem. | LarryWestMCSD | MCTS | 1 | 03-28-2007 02:08 AM |
| Re: Need Ideas For A New Server, Long Post | Gareth Church | A+ Certification | 2 | 07-27-2003 12:46 PM |