Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > SQL SERVER (TECHNET) > Wildcard with Update
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 25th July 07:15
donn
External User
 
Posts: 1
Default Wildcard with Update



SQL 7.0
Need to replace all
AB 2005-***
with
C 2005-YYY
Thinking about the following...but, the '%' is taken as a literal in 'C%-YYY'.
update table
set f1 = 'C%-YYY'
where f1 like 'AB%-***'
Thanks,
Don
  Reply With Quote


  sponsored links


2 25th July 07:15
hugo kornelis
External User
 
Posts: 1
Default Wildcard with Update



Hi Don,

Try if this works:

UPDATE MyTable
SET F1 = STUFF(F1, 1, 2, 'C')
WHERE F1 LIKE 'AB%-***'

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666