2 Replies Latest reply: Aug 11, 2011 3:56 AM by Lukas Arns RSS

    where condition in load script

    Sushil Kumar

      Hi All,

       

       

      I am facing a very silly problem.. please check out the query given below, it is fetching 0 records in qlikview while the same query gives required result when runned in PL/SQL developer.

       

      LOAD "TIME_ID",

          "TIME_DATE",

          "TIME_HOUR",

          "DAY_OF_MONTH",

          "WEEK_OF_YEAR",

          "WEEK_STARTING_DATE",

          "MONTH_OF_YEAR",

          "MONTH_NAME",

          QUARTER,

          "YEAR_OF_YEAR",

          "HALF_YEAR",

          "DAY_DATE",

          "ISO_YEAR";

      SQL SELECT *

      FROM "TIME_HR_DIM"

      where "TIME_DATE >= '01-AUG-2011'

      and "TIME_DATE" < '07-AUG-2011';

       

      Thanks..

        • where condition in load script
          Kaushik Solanki

          Hi,

           

             You have misses " at this position

           

             where "TIME_DATE >= '01-AUG-2011'

           

           

             Make sure that the format of date is same in the field.

           

             If its same then try this.

           

             LOAD "TIME_ID",

              "TIME_DATE",

              "TIME_HOUR",

              "DAY_OF_MONTH",

              "WEEK_OF_YEAR",

              "WEEK_STARTING_DATE",

              "MONTH_OF_YEAR",

              "MONTH_NAME",

              QUARTER,

              "YEAR_OF_YEAR",

              "HALF_YEAR",

              "DAY_DATE",

              "ISO_YEAR";

          SQL SELECT *

          FROM "TIME_HR_DIM"

          where "TIME_DATE" >= Date(Date#('01-AUG-2011','DD-MMM-YYYY'),'DD-MMM-YYYY')

          and "TIME_DATE" < Date(Date#('07-AUG-2011','DD-MMM-YYYY'),'DD-MMM-YYYY');

           

          Regards,

          Kaushik Solanki

          • where condition in load script

            LOAD "TIME_ID",

                "TIME_DATE",

                "TIME_HOUR",

                "DAY_OF_MONTH",

                "WEEK_OF_YEAR",

                "WEEK_STARTING_DATE",

                "MONTH_OF_YEAR",

                "MONTH_NAME",

                QUARTER,

                "YEAR_OF_YEAR",

                "HALF_YEAR",

                "DAY_DATE",

                "ISO_YEAR";

            SQL SELECT *

            FROM "TIME_HR_DIM"

            where "TIME_DATE" >= '01-AUG-2011'

            and "TIME_DATE" < '07-AUG-2011';

             

            ???