0 Replies Latest reply: Jan 29, 2018 4:56 AM by Grant Johnson RSS

    Stop empty dataset from overwriting a dataset

    Grant Johnson

      Hi,

       

      I am trying to stop an older dataset from being overwritten by an empty dataset.

       

      I am using this statement to load my data, just unsure where to build in the If statement to do a row count before loading it in my report.  I am not using a QVD to load the data, just the below query...hope this makes sense?

       

      I am just unsure when it actually loads the data, if I can use an if statement with the rowno() >0 check after this query, or where to insert it?

       

      "Sheet_Passes":

      SQL SELECT distinct

      "Resource_Code",

      "Item_Name",

      "Description",

      "End_Date",

      "Sheet_Passes",

      "Quantity",

      "X_flex" as Flex_Account,

          "X_group",

          "X_location",

          "X_masterfamily" as Master_Planning_Family,

          "X_org_code" as Location

      FROM "PDP8_Reports".divfood."ASCP_Sheet_Passes" Left Join "PDP8_Reports".dbo."ASCP_Cube_UDC" on item_name=X_item;