sql - How to use Replace with % -


i need exclude text "<==#" end (like %)

"testdescription  <==# info "dynamic text" ==>" 

i tried use replace % not work

select replace ( testfield, '<==# %', '') table  

the following want:

 select left(testfield, charindex('<==#', testfield) - 1) 

there no reason use wildcards this. want left part of string before substring.


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -