3 Replies Latest reply: May 31, 2016 4:40 PM by Yeo Poh sai RSS

    load script if [Reporting Code] < 00500 use date and [Reporting Code] > 00500 use date1

    Yeo Poh sai

      Hi All


      Below is my simple QV doc script :-


      SET vDevelopment = 0;

      IF $(vDevelopment) = 0 THEN

      SET vRAWPath =   'D:\AUTO\'; //local folder

      SET vFile50 = 'FS_ADL';


      END IF







      'TDSS' as SOURCE_GL,

      '60' as SOURCE,

      date#(MakeDate(@53:57T, @50:52T ,@58:59T),'DD/MM/YYYY') as date,

      makedate(@53:57T,@50:52T,1) as date1,

      AutoNumberHash128(@58:77T,'60') As Link_GL_Key,

      @124:129T  as [Reporting Code],

      if(@102:103T = '-',@86:101T*-1,@86:101T)*-1 as [Amount]   

      FROM $(vRAWPath)$(vFile50).txt (ansi, fix, no labels, header is 0, record is line);




      left keep (GL_TABLE)

      load [Reporting Code],

      If([Reporting Code]>=1 and [Reporting Code]<=19,'rEVENUE') as [rEVENUE]

      resident GL_TABLE;



      My requirement is to create a new feild name = date2 , the condition as below :-



      field = date for reporting code 10000 - 99999

      field = date1 for reporting code 00001 - 00500



      Can some one advise me how to write the expression ?