Replace "["

  • Dear all,

    I am trying to replace [ for nothing.

    If this was not a reserved character I could do it like this:

    replace (string, "[","")

    But sql is saying that this is column.

    Can someone help?

    Thank you

  • Sorry. My bad. I was putting " instead of '

    Thank you

  • Are you able to retrieve the result with the following? It works for me on SQL2016

    Select Replace ('abc[def', '[','')
    will return
    abcdef

  • river1 - Friday, October 27, 2017 8:06 AM

    Dear all,

    I am trying to replace [ for nothing.

    If this was not a reserved character I could do it like this:

    replace (string, "[","")

    But sql is saying that this is column.

    Can someone help?

    Thank you

    Looks like you are using double quotes (") instead of single quotes (').

  • Oh, he figured it out already.  Need more caffeine.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply