Forum Discussion

Jeremy's avatar
Jeremy
New Contributor
16 years ago

Clob to String in Groovy

Hi,

I am trying to convert a clob from the database into a String so that I can assert against what was passed in. 

I am struggling trying to get this in to convert in Groovy.  Any ideas how I could accomplish this?

Thanks

2 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    Hmm.. how are you getting the CLOB? Can you show the SQL query?

    regards!

    /Ole
    eviware.com
  • Jeremy's avatar
    Jeremy
    New Contributor
    I am getting the value with a simple query
    SELECT LETTER FROM LETTER WHERE ID = '12345'

    It is grabbing the Clob object.  I can do a count on this object and it returns the correct number associated with the stored text length.