1 Reply Latest reply: Feb 8, 2013 10:05 AM by Steve Baldwin RSS

    incremental load, delete old field and replacing it with new field, same name

      Dear all,

       

      I have an incremental load running every week, which is just adding data on the bottom of the qvx.

      it is my intention to add a flag field, in order to detect which data is the most recent one, so to easily make some selections in the qvw.

       

      Therefore I thought of the following:

      Loading the new data from the server, adding a field and populating it with 1s

      Loading then the "old" data from the qvx, dropping the field (so I get rid of the 1s from the previous week) and ultimately append to this the freshly loaded data from the server (with the 1s)

       

      But "of course" it goes wrong, as when I drop the field with the 1s, it drops also the newly created one from the server...

       

      here is the script:

       

      Master:
      
      
      LOAD
      *,
      Today() AS DayStamp,
      1 as LatestMaster;
      SQL SELECT *
      FROM SERVER.GOAM;
      LOAD *
      FROM \\folder\Master.qvx (qvx);
      DROP FIELD LatestMaster;
      STORE Master INTO \\folder\Master.qvx (qvx);
      
      

       

      Much appreciated if you can help me out here; though I an thinking that probably I am going a long way to simply be able to select the values with the latest DayStamp...

       

      thank you!