3 Replies Latest reply: Aug 2, 2014 2:23 PM by Lawrence Chen RSS

    Where "Date" condition is not working

      Hi Guys, does any body can tell me why this Where condition is not working?? What I need is to get the sales of this month not before this month, I tryed this but is not working, any ideas?? I attached the APP for a better understand.
      Thank you Guys!!
      ODBC CONNECT TO QV_DMT_TRANSMISIONES (XUserId is PIfLdKNKSSLGFKdIfKTaUPNKESZB, XPassword is YDEZYcVMUTMGTcUNObdGTEA);
      SQL
      SELECT
      CEBE,
      CIA,
      "COD_CLIENTE",
      COMMODITY,
      COUNTRY,
      "CTO_MAT",
      "CTO_USD",
      CUENTA,
      "CURRENCY",
      CUSTOMER,
      "CUSTOMER_ORIG",
      "CVE_CD",
      "CVE_SECTOR",
      DATE,
      "DIST_CHANNEL",
      "FACTURA_II",
      "IMP_USD",
      INFOTYPE,
      INVOICE,
      MARKET,
      MATERIAL,
      MODEL,
      "NOM_CUENTA",
      "NVO_PROD",
      PLANT,
      PRODUCT,
      QTY,
      "SALES_MO",
      "SALES_MXN",
      SECTOR,
      SHIP,
      TYPE,
      UM
      FROM
      "DMT_TRANSMISIONES".dbo."FACT_QV_SALES"
      WHERE DATE  > MonthStart(Today()) AND
      DATE  <= Today();