Skip to main content
Participating Frequently
June 23, 2011
Question

How to Parse CLOB varialbe in Coldfusion 9

  • June 23, 2011
  • 1 reply
  • 1265 views

Hi,

I am trying to parse CLOB variable in Coldfusion 9. Can you please help.

Below is the peice of code I wrote but getting exception(

Encountered "(. Incorrect Select Statement, Expecting a 'FROM', but encountered '(' instead, A select statement should have a 'FROM' construct.
).

ITEM_ATRS_LIST is a CLOB variable.

<cfquery   
            name = "AssignedProducts"  
            dbtype="query" >  
                select
                    ap_id, ap_version_id, service_type, state, main_item_id, ap_id_dominant, status, end_date, order_action_id
                    <cfoutput query="AttributeResultSet">
                            ,GET_ATR_VALUE(ITEM_ATRS_LIST, '#AttributeResultSet.ItemAtrsListVal#') #AttributeResultSet.QueryVal#
                    </cfoutput>
                    <!--- <cfoutput query="AttributeResultSet">
                        , #AttributeResultSet.QueryVal#
                    </cfoutput> --->
                from AllProducts
                where end_date > #Now()#
                      and state in ('AS')
        </cfquery>

    This topic has been closed for replies.

    1 reply

    Inspiring
    June 23, 2011

    This is a database limitation.  For the most part, you can't run functions against clob datatypes.  You'll have to get the entire record and parse it afterwards.

    LVSRRCAuthor
    Participating Frequently
    June 27, 2011

    Thanks you very much.

    I have another question:

    We upgraded Coldfusion 8 to Coldfusion 9. But while calling one particular

    function it is giving below error. But it was not giving in Coldfusion 8.

    Can you please help.

    The value returned from the fnSearchAudit function is not of type query. If

    the component name is specified as a return type, it is possible that either

    a definition file for the component cannot be found or is not accessible.

    Inspiring
    June 27, 2011

    Does the returntype attribute for that function say "query".

    What does the function return?