Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Character Change

Author  Topic 

dtrivedi
Posting Yak Master

153 Posts

Posted - 2010-11-12 : 08:33:45
We are trying to add gift card discriptions for our SKU's for the holiday sale
We want the description to read

select * from tblpsku00 where sku_style = '0046541'


Column Name Pos_desc
YAMAHA GUITAR GIGMAKER *Gift Card $30*

The description in this column is the one that we want to change
the 24th character is '*' so we want to replace everything after that
i have about 50 skus that need to be done

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-11-12 : 08:38:04
What do you want to replace with?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

dtrivedi
Posting Yak Master

153 Posts

Posted - 2010-11-12 : 08:42:42
we want to replace everything after the 23rd charracter string to a specific statement '* Gift Card $100*' so in this example *Gift Card $30* needs to be replaced with '* Gift Card $100*' I have 50 skus all of them don't have an orginial description yet thats why we want to replace onwards from the 23rd character
does that make sense?
Go to Top of Page

dtrivedi
Posting Yak Master

153 Posts

Posted - 2010-11-12 : 08:51:41
maybe something like this ??



select pos_desc, translate(translate(pos_desc,'abcdefghijklmnopqrstuvw *Gift Card $30*')
from tblpsku00 where sku_style = '0046541'
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-11-15 : 04:52:32
quote:
Originally posted by dtrivedi

maybe something like this ??



select pos_desc, translate(translate(pos_desc,'abcdefghijklmnopqrstuvw *Gift Card $30*')
from tblpsku00 where sku_style = '0046541'


Noet that this site is for MS SQL Server. For Oracle questions, post at www.orafaq.com

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -