2 Replies Latest reply: Oct 14, 2011 5:17 AM by Sunil Chauhan RSS

    Load XML File, Multiple Tables, Link Variables

      Here is an example of an XML load. I got an error originally when each table had the same variable name (loops). I changed Varname to Var2 to load but in reality these tables should be joined by this variable. How do I join without getting the error?

       

       

      QUESTION:
      LOAD SERVICE,
          VARNAME AS VAR2,
          QUESTION_TEXT,
          %Key_HEADER_8B8B72D6FCC98357    // Key to parent table: DATA_EXPORT/HEADER
      FROM C:\QlickView\Dashboard\PG6512_20111007_32225.xml (XmlSimple, Table is [DATA_EXPORT/HEADER/QUESTION_MAP/QUESTION]);

       

      'ANALYSIS/RESPONSE':
      LOAD VARNAME,
          VALUE,
          %Key_PATIENTLEVELDATA_E1A59225A73AF151    // Key to parent table: DATA_EXPORT/PATIENTLEVELDATA
      FROM C:\QlickView\Dashboard\PG6512_20111007_32225.xml (XmlSimple, Table is [DATA_EXPORT/PATIENTLEVELDATA/ANALYSIS/RESPONSE]);

        • Re: Load XML File, Multiple Tables, Link Variables
          Dennis Hoogenboom

          Hi There.

           

          Did you try this:

           

           

          QUESTION:
          LOAD SERVICE,
              VARNAME,
              QUESTION_TEXT,
              %Key_HEADER_8B8B72D6FCC98357    // Key to parent table: DATA_EXPORT/HEADER
          FROM C:\QlickView\Dashboard\PG6512_20111007_32225.xml (XmlSimple, Table is [DATA_EXPORT/HEADER/QUESTION_MAP/QUESTION]);
          
          Join (QUESTION)
          LOAD VARNAME,
              VALUE,
              %Key_PATIENTLEVELDATA_E1A59225A73AF151    // Key to parent table: DATA_EXPORT/PATIENTLEVELDATA
          FROM C:\QlickView\Dashboard\PG6512_20111007_32225.xml (XmlSimple, Table is [DATA_EXPORT/PATIENTLEVELDATA/ANALYSIS/RESPONSE]);
          
          

           

          ?

            • Load XML File, Multiple Tables, Link Variables
              Sunil Chauhan

              name VARNAME as var2 in scond table then join to first table.

               

              use below code

               

              QUESTION:
              LOAD SERVICE,
                  VARNAME AS VAR2,
                  QUESTION_TEXT,
                  %Key_HEADER_8B8B72D6FCC98357    // Key to parent table: DATA_EXPORT/HEADER
              FROM C:\QlickView\Dashboard\PG6512_20111007_32225.xml (XmlSimple, Table is [DATA_EXPORT/HEADER/QUESTION_MAP/QUESTION]);

               

              'ANALYSIS/RESPONSE':

              join(QUESTION)
              LOAD VARNAME as VAR2,
                  VALUE,
                  %Key_PATIENTLEVELDATA_E1A59225A73AF151    // Key to parent table: FROM C:\QlickView\Dashboard\PG6512_20111007_32225.xml (XmlSimple, Table is [DATA_EXPORT/PATIENTLEVELDATA/ANALYSIS/RESPONSE]);