This is a public Forum  publicRSS

Topic

    Nigel Oliver
    Merging 2 text areas in a report column.Answered
    Topic posted January 11, 2018 by Nigel OliverWhiz, last edited January 11, 2018 
    65 Views, 5 Comments
    Title:
    Merging 2 text areas in a report column.
    Content:

    Hi All

    I am trying to merge 2 text area fields into one column in a report but I am getting "expecting non-blob, found blob" error.  Is what I am trying to do impossible ?

    concat('INTERNAL', co.textarea1, 'EXTERNAL', co.textarea2)

    Thanks!

    Nigel

    Best Answer

    Jess Campbell

    Hi Nigel,

    Use the to_char function to convert the text area blobs to strings.

    concat('INTERNAL', to_char(co.textarea1), 'EXTERNAL', to_char(co.textarea2))

    Jess

    Answer

     

    • Jess Campbell

      Hi Nigel,

      Use the to_char function to convert the text area blobs to strings.

      concat('INTERNAL', to_char(co.textarea1), 'EXTERNAL', to_char(co.textarea2))

      Jess

    • Jess Campbell

      If you are worried about the Custom Object part, just be sure you reference the entire field reference, including the table:

      incidents.CO$textarea1

       

    • Pavol Procka

      I like the error message though :)

    • Jess Campbell
      Harold Hicks said:

      Hi Nigel, you should get you what you are looking for as long as both of your co.textareas are in fact text area data types.  I have a sample almost identical to yours above, just not referencing a custom object (we haven't used them ourselves) and it works fine.  If there is some other nuance around using custom objects, I'm unfortunately not aware.  I would double-check your data types to make sure you are calling what you think you are calling, but this should be possible.  If you notice that the CO fields aren't text area or field data types, but contain text, just use the to_char(expr) function and you should resolve your errors.

      View original

      Hi Harold,

      The concat() function requires text strings only. Text area is stored as a Blob in the database. To concatenate text areas, we must convert them to strings using the to_char function. Try it yourself.

      Jess

    • Nigel Oliver

      OK great thanks Jess, was Struggling with that all afternoon!

      Thanks

      Nigel