3 Replies Latest reply: Aug 1, 2013 10:22 AM by Anton Gustle RSS

    SQL Load statement question

    Jennie Elliott

      I am trying to optimize qvd's and need to pull info from a SQL table but only transactions that are have an ID of 1 17. My code is below:

       

      TransactionDetails:
      SQL SELECT "DET_AcctID",
          "DET_Amount",
          "DET_BackOrderQty",
          "DET_BRDSysID",
          "DET_BridgeSessionID",
          "DET_CC_AddressID",
          "DET_CC_ApprovalCode",
          "DET_CC_CardType",
          "DET_CC_DebitCreditFlag",
          "DET_CC_SwipeFlag",
          "DET_CCP_SysID",
          "DET_CGS_CompleteFlag",
          "DET_CGSCostAmt",
          "DET_Closing_TransFlag",
          "DET_ContractID",
          "DET_CRLSysID",
          "DET_Deposited",
          "DET_Description",
          "DET_Detail_CGSID",
          "DET_DetID",
          "DET_DetSubtypeID",
          "DET_DetTypeID",
          "DET_DSRSysID",
          "DET_EstimateGrpID",
          "DET_ExpDateTime",
          "DET_FET",
          "DET_GenRef",
          "DET_Hours",
          "DET_LineItemTypeID",
          "DET_MechID",
          "DET_MercTransactionID",
          "DET_OnHandFlag",
          "DET_PackageID",
          "DET_PartID",
          "DET_PrintFlag",
          "DET_Qty",
          "DET_Qty_Costed",
          "DET_SalesPersonID",
          "DET_SiteID",
          "DET_SortID",
          "DET_TransID",
          "DET_TransTypeID",
          "DET_UnitCostBase",
          "DET_UnitCostLast",
          "DET_VendBRDSysID"
      FROM "databasename".dbo.Details
      WHERE "DET_TransTypeID"='1' and '17';

      Store * FROM TransactionDetails Into [C:\QlikView\QlikView Production\QVDocuments\SourceDocuments\QVD\VH2\TransactionDetails.csv] (txt);

       

      I have tried many variations to get it to pull only this data, I can get it to do 1 or 17 but not both of them together.

       

      Having a brain meltdown on this one...any help is much appreciated.

       

      JM