3 Replies Latest reply: Jul 18, 2017 6:02 AM by Graeme Smith RSS

    How can i perform operation on the field which is created by "as" clause ?

    Muhammad Mattiullah

      Hello Community ,

      I need your help i want that How can i perform operation on the field which is created by "as" clause ?

      The query is given below :

      LOAD

          Slug,

          Block,

          hour(time#("Time",'hh:mm:ss:ff')) as [Extracted Hours],

          if([Extracted Hours]=0,Count([Extracted Hours])) as [00:00 - 01:00],

          if([Extracted Hours]=1,Count([Extracted Hours])) as [01:00 - 02:00],

          Count(Slug) as "Story Repeat"

      FROM

      Source File

      Group By Slug,Block,"Extracted Hours";

       

      In this query i created a new field named as "Extracted Hours" and i want to use the value of this field but i am getting error that "Extracted Hour" field not exist.

      Kindly suggest me how could i use ?

      Thanks in Advance.

      Regards