5 Replies Latest reply: May 19, 2014 3:20 AM by Karunpreet Soni RSS

    'Invalid Expression Error'

    Karunpreet Soni

      Hello Everyone,

       

      I am using Count function in my script also I am using Group By with it, but I am always getting the same invalid expression error. Please help me with it, as its urgent

      My script goes like this

      NOCONCATENATE

      FINAL_RESULT:

      LOAD TEST_ID,

           RESULT_ID,

           RESULT_AUTH_DT,

           RESULT_ENTRY_DT,

           COMPONENT_NAME,

           RESULT_TYPE,

           RESULT_STAT,

           RESULT_TEXT,

           RESULT_UNIT,

           RESULT_VALUE,

           SERVICE_INDICATOR,

           SAMPLE_ID,

           TEST_STAT,

           TEST_STARTED_DT,

           TEST_COMPLETED_DT,

           TEST_AUTH_DT,

           SAMPLE_POINT_ID,

           SAMPLE_ID_TEXT,

           SAMPLE_STAT,

           SAMPLE_DT,

           SAMPLE_RECEIVE_DT,

           COMPLETED_DT,

           SAMPLE_AUTH_DT,

           SAMPLE_COLLECTED_ADDR,

           DESC,

           PRODUCT_ID,

           PRODUCT_VERSION,

           SAMPLE_POINT_DESC,

           FLOOR(NUM(SAMPLE_DT)) AS [%Link_DATE_Num],

        IF(SERVICE_INDICATOR='AESTHETIC',(COUNT(IF(RESULT_VALUE >15, RESULT_VALUE))/(COUNT(TEST_ID)))) AS AESTHETIC_SERVICE_INDICATOR

      FROM

      [...\RESULT.qvd]

      (qvd)

      group by TEST_ID,

           RESULT_ID,

           RESULT_AUTH_DT,

           RESULT_ENTRY_DT,

           COMPONENT_NAME,

           RESULT_TYPE,

           RESULT_STAT,

           RESULT_TEXT,

           RESULT_UNIT, 

           SERVICE_INDICATOR,

           SAMPLE_ID,

           TEST_STAT,

           TEST_STARTED_DT,

           TEST_COMPLETED_DT,

           TEST_AUTH_DT,

           SAMPLE_POINT_ID,

           SAMPLE_ID_TEXT,

           SAMPLE_STAT,

           SAMPLE_DT,

           SAMPLE_RECEIVE_DT,

           COMPLETED_DT,

           SAMPLE_AUTH_DT,

           SAMPLE_COLLECTED_ADDR,

           DESC,

           PRODUCT_ID,

           PRODUCT_VERSION,

           SAMPLE_POINT_DESC;