1 Reply Latest reply: Oct 21, 2016 11:29 AM by Sunny Talwar RSS

    How select data from only one table in chart

    Christian Cutruneo

      Hi,

      I have this 2 tables in Data Load

       

      [V_Physical]:

      LOAD

        [Field1] AS [Field1],

        [Field2] AS [Field2],

        [Field3] AS [Field3];

      SQL SELECT

      "Field1",

        "Field2",

        "Field3"

      FROM "DB"."dbo"."Table1"

      WHERE "Field2" = 'Physical'

       

       

      [V_Financial]:

      LOAD

        [Field1] AS [Field1],

        [Field2] AS [Field2],

        [Field3] AS [Field3];

      SQL SELECT

      "Field1",

        "Field2",

        "Field3"

      FROM "DB"."dbo"."Table1"

      WHERE "Field2" = 'Financial'

       

      How can I put on a chart only the data in Table V_Physical?

       

      Thanks

        • Re: How select data from only one table in chart
          Sunny Talwar

          Add flags in your script:

           

          [V_Physical]:

          LOAD

            [Field1] AS [Field1],

            [Field2] AS [Field2],

            [Field3] AS [Field3],

            'V_Physical' as Table_Flag;

          SQL SELECT

          "Field1",

            "Field2",

            "Field3"

          FROM "DB"."dbo"."Table1"

          WHERE "Field2" = 'Physical';

           

           

          [V_Financial]:

          LOAD

            [Field1] AS [Field1],

            [Field2] AS [Field2],

            [Field3] AS [Field3],

            'V_Financial' as Table_Flag;

          SQL SELECT

          "Field1",

            "Field2",

            "Field3"

          FROM "DB"."dbo"."Table1"

          WHERE "Field2" = 'Financial';

           

          And then you can use set analysis to use data from one of the tables

          {<Table_Flag = {'V_Physical'}>}