Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
Hi. How can the field be both 1 and 17 at the same time? Dont you mean this?
WHERE "DET_TransTypeID"='1' or "DET_TransTypeID"='17';
Hi. How can the field be both 1 and 17 at the same time? Dont you mean this?
WHERE "DET_TransTypeID"='1' or "DET_TransTypeID"='17';
This column has several numbers in it to deliniate Transaction Type; a 1 is an invoice and 17 is a credit. I do not need or want any other data from this table. It will then be joined with other data.
The current QVD that has all of this data pulled together is 1.5GB. I am trying to elimiate unneccesary data.
Ok then maybe you need to do a Group By DET_AcctID to get the accounts that have both the transactions, 1 and 17.