Skip to main content
Participant
August 1, 2008
Answered

Replace function

  • August 1, 2008
  • 1 reply
  • 512 views
Hi guys, first post here...

I am having a problem with my replace function in CF

<Cell><Data ss:Type="String">#Replace(QUERY.type,"1","yes/no")##Replace(QUERY.type,"2","$")#</Data></Cell>

currently it is returning yes/no1 and 2$

what I want is just yes/no if it is a '1' and $ if it is a '2'

Suggestion?

thanks!
    This topic has been closed for replies.
    Correct answer Dan_Bracuk
    If your db supports a case construct, use it in your query. Then you don't have to replace anything.

    Otherwise, after you run through your query and use querysetcell along with some if/else logic.

    1 reply

    Dan_BracukCorrect answer
    Inspiring
    August 1, 2008
    If your db supports a case construct, use it in your query. Then you don't have to replace anything.

    Otherwise, after you run through your query and use querysetcell along with some if/else logic.
    lgk2008Author
    Participant
    August 1, 2008
    wow, thanks dan!

    I used the case construct.

    thank you for your help :)