8 Replies Latest reply: Mar 5, 2012 6:57 AM by Deepak Kurup RSS

    Hey i need help in the syntax

      Modified:

      crosstable (Share, Values, 6)

      LOAD 

      `bot_entity_id`,

          `bot_entity_name`,

          `channel_id`,

          `geo_id`,

          Identifier,

          `REGION_ID`,

         * Inline [ `Share_1`,

          `Share_10`,

          `Share_11`,

          `Share_12`,

          `Share_13`,

          `Share_14`,

          `Share_15`,

          `Share_16`,

          `Share_17`,

          `Share_18`,

          `Share_19`,

          `Share_2`,

          `Share_20`,

          `Share_21`,

          `Share_22`,

          `Share_23`,

          `Share_24`,

          `Share_3`,

          `Share_4`,

          `Share_5`,

          `Share_6`,

          `Share_7`,

          `Share_8`,

          `Share_9`,]

          `Share_Ind_reg1`,

          `Share_Ind_reg10`,

          `Share_Ind_reg11`,

          `Share_Ind_reg12`,

          `Share_Ind_reg13`,

          `Share_Ind_reg14`,

          `Share_Ind_reg15`,

          `Share_Ind_reg16`,

          `Share_Ind_reg17`,

          `Share_Ind_reg18`,

          `Share_Ind_reg19`,

          `Share_Ind_reg2`,

          `Share_Ind_reg20`,

          `Share_Ind_reg21`,

          `Share_Ind_reg22`,

          `Share_Ind_reg23`,

          `Share_Ind_reg24`,

          `Share_Ind_reg3`,

          `Share_Ind_reg4`,

          `Share_Ind_reg5`,

          `Share_Ind_reg6`,

          `Share_Ind_reg7`,

          `Share_Ind_reg8`,

          `Share_Ind_reg9`,

          `SUB_MARKET`;

      SQL SELECT *

      FROM `Modified`;

       

       

      i only want to transpose the columns( share_24 -to- share_1) and there values. kindly let me know the error in this syntax.

      Thanks in advance.

       

      Regards

      Sagar

        • Hey i need help in the syntax
          Deepak Kurup

          hi Sagar,

           

          I don't think this is the right approach. You can't use Load inline and sql together.

           

          Below willl be the right method.

          crosstable(Data,Value,7)

          Load

          `bot_entity_id`,

              `bot_entity_name`,

              `channel_id`,

              `geo_id`,

              Identifier,

               SUB_MARKET`;

              `REGION_ID`,

              `Share_10`,

              `Share_11`,

              `Share_12`,

              `Share_13`,

              `Share_14`,

              `Share_15`,

              `Share_16`,

              `Share_17`,

              `Share_18`,

              `Share_19`,

              `Share_2`,

              `Share_20`,

              `Share_21`,

              `Share_22`,

              `Share_23`,

              `Share_24`,

              `Share_3`,

              `Share_4`,

              `Share_5`,

              `Share_6`,

              `Share_7`,

              `Share_8`,

              `Share_9`,]

              `Share_Ind_reg1`,

              `Share_Ind_reg10`,

              `Share_Ind_reg11`,

              `Share_Ind_reg12`,

              `Share_Ind_reg13`,

              `Share_Ind_reg14`,

              `Share_Ind_reg15`,

              `Share_Ind_reg16`,

              `Share_Ind_reg17`,

              `Share_Ind_reg18`,

              `Share_Ind_reg19`,

              `Share_Ind_reg2`,

              `Share_Ind_reg20`,

              `Share_Ind_reg21`,

              `Share_Ind_reg22`,

              `Share_Ind_reg23`,

              `Share_Ind_reg24`,

              `Share_Ind_reg3`,

              `Share_Ind_reg4`,

              `Share_Ind_reg5`,

              `Share_Ind_reg6`,

              `Share_Ind_reg7`,

              `Share_Ind_reg8`,

              `Share_Ind_reg9`,

              `SUB_MARKET`;

          SQL SELECT *

          FROM `Modified`;

           

          Add the transforming data in the end and specify the end point of the field for which you dont need the transformation in the crosstable command.

           

           

          I hope you got my point.

           

           

          Deepak

            • Hey i need help in the syntax

              Hi Deepak

               

              Dude thanks for your reply but i am still facing problem in running the syntax.

               

              Regards

              Sagar Gupta

                • Hey i need help in the syntax
                  Deepak Kurup

                  Hi Sagar,

                   

                  Above code had some syntax error.. i have rectified in the below code

                   

                   

                  crosstable(Data,Value,7)

                  Load

                  `bot_entity_id`,

                      `bot_entity_name`,

                      `channel_id`,

                      `geo_id`,

                      Identifier,

                       SUB_MARKET,

                      `REGION_ID`,

                      `Share_10`,

                      `Share_11`,

                      `Share_12`,

                      `Share_13`,

                      `Share_14`,

                      `Share_15`,

                      `Share_16`,

                      `Share_17`,

                      `Share_18`,

                      `Share_19`,

                      `Share_2`,

                      `Share_20`,

                      `Share_21`,

                      `Share_22`,

                      `Share_23`,

                      `Share_24`,

                      `Share_3`,

                      `Share_4`,

                      `Share_5`,

                      `Share_6`,

                      `Share_7`,

                      `Share_8`,

                      `Share_9`,

                      `Share_Ind_reg1`,

                      `Share_Ind_reg10`,

                      `Share_Ind_reg11`,

                      `Share_Ind_reg12`,

                      `Share_Ind_reg13`,

                      `Share_Ind_reg14`,

                      `Share_Ind_reg15`,

                      `Share_Ind_reg16`,

                      `Share_Ind_reg17`,

                      `Share_Ind_reg18`,

                      `Share_Ind_reg19`,

                      `Share_Ind_reg2`,

                      `Share_Ind_reg20`,

                      `Share_Ind_reg21`,

                      `Share_Ind_reg22`,

                      `Share_Ind_reg23`,

                      `Share_Ind_reg24`,

                      `Share_Ind_reg3`,

                      `Share_Ind_reg4`,

                      `Share_Ind_reg5`,

                      `Share_Ind_reg6`,

                      `Share_Ind_reg7`,

                      `Share_Ind_reg8`,

                      `Share_Ind_reg9`,

                      `SUB_MARKET`;

                  SQL SELECT *

                  FROM `Modified`;

                   

                   

                   

                  Deepak