15 Replies Latest reply: May 10, 2013 2:54 PM by Brian Garside RSS

    How to use ApplyMap & RENAME for GUID Field names to readable ones?

    Brian Garside

      I have a Table that's stores questions identified with GUID's instead of the literal questions names I need to translate them using ApplyMap and RENAME

      The problem I'm having is how do I translate field names to readable values. I dont know how to map field names to something else.

       

      the manual way to do this would be to alias all the fields....

       

      Mapping_Questions:
      Mapping LOAD frmqstnQuestionText,
      frmqstnGUID;
      SQL SELECT frmqstnQuestionText,
      frmqstnName
      FROM "master".dbo."QV_QuestionNames";

       

       

      Form_6248:
      LOAD prjrptId,
      prjrptProjectId as ProjectID,
      prjrptFormId,
      prjrptReportID,
      prjrptDate,

      "Qcabd5f36_9b83_46b8_a510_57921949b40b",
      "Q0a3bbcfd_456b_414c_93bc_64a65a3aa880",
      "Q02ccee4f_c1d4_46d2_b925_82c744287c04",
      "Q61f58659_e530_4188_b3a0_1cd9e00a06d1",
      "Qfd25bad3_13cc_42a8_99a6_6a18fcf83c32",
      "Q95e48c02_3bf0_4b78_abc4_8b7708a2720"
      ;
      SQL SELECT prjrptId,
      prjrptProjectId,
      prjrptFormId,
      prjrptReportID,
      prjrptDate,
        "Qcabd5f36_9b83_46b8_a510_57921949b40b",
        "Q0a3bbcfd_456b_414c_93bc_64a65a3aa880",
        "Q02ccee4f_c1d4_46d2_b925_82c744287c04",
        "Q61f58659_e530_4188_b3a0_1cd9e00a06d1",
      "Qfd25bad3_13cc_42a8_99a6_6a18fcf83c32",
        "Q95e48c02_3bf0_4b78_abc4_8b7708a2720"
      FROM "master".dbo."vw_6248";