10 Replies Latest reply on Apr 5, 2012 2:11 PM by K3NetSolutions

    Retrieve xml-data from text-column


      I've a table which has a field (datatype "text") that contains a xml-file. After some try and error I found out that the only way to fetch the complete xml-file from that table is to use the "FOR XML" clause of ms sql. But my next problem is, that the colum containing the xml-file is named something like "XML_F52E2B61-18A1-11D1-B105-00805F49916B" which is an invald identifier for cf.


      Is there a way to access that column by its id instead of its name or what's the best way to access this column?


      The SQL statement I'm using is:


      SELECT XmlPackage
      FROM LogK3OnChange
      WHERE DealerID = IsNull(<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.dealerid#">, DealerID)
      AND LogID = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.logid#">