
SELECT * FROM [ERP].[dbo].[AccGL] where [InvDate] BETWEEN '2020-01-01' and '2020-03-31';

SELECT * FROM [ERP].[dbo].[AdCompany];

SELECT * FROM [ERP].[dbo].[AdGroup];

SELECT * FROM [ERP].[dbo].[AdUser];

SELECT * FROM [ERP].[dbo].[CostingHeader] where [TransactionDate] BETWEEN '2020-01-01' and '2020-03-31';
SELECT x.* FROM [ERP].[dbo].[CostingDetail] x left join [ERP].[dbo].[CostingHeader] y on y.CostingCode=x.CostingCode  where y.TransactionDate BETWEEN '2020-01-01' and '2020-03-31';

SELECT * FROM [ERP].[dbo].[IvBalance];

SELECT * FROM [ERP].[dbo].[IvBalLoc];

SELECT * FROM [ERP].[dbo].[IvBalLocCost];

SELECT * FROM [ERP].[dbo].[IvClass];

SELECT * FROM [ERP].[dbo].[IvCyCnt];

SELECT * FROM [ERP].[dbo].[IvDrumTag];

SELECT * FROM [ERP].[dbo].[IvFGCostHis];

SELECT * FROM [ERP].[dbo].[IvItemRemark];

SELECT * FROM [ERP].[dbo].[IvLocation];

SELECT * FROM [ERP].[dbo].[IvMas];

SELECT * FROM [ERP].[dbo].[IvMas_Barcode];

SELECT * FROM [ERP].[dbo].[IvMasPack];

SELECT * FROM [ERP].[dbo].[IvMthEnd];

SELECT * FROM [ERP].[dbo].[IvMthEndLot];

SELECT * FROM [ERP].[dbo].[IvStatus];

SELECT * FROM [ERP].[dbo].[IvStockCard];

SELECT * FROM [ERP].[dbo].[IvSubClass];

SELECT * FROM [ERP].[dbo].[IvTrxBatch] where TrxDtTime BETWEEN '2020-01-01' and '2020-03-31';

SELECT x.* FROM [ERP].[dbo].[IvTrxBatchDetail] x left join [ERP].[dbo].[IvTrxBatch] y on y.BatchNo=x.BatchNo  where y.TrxDtTime BETWEEN '2020-01-01' and '2020-03-31';

SELECT * FROM [ERP].[dbo].[IvTrxBatchNonInv] where TrxDtTime BETWEEN '2020-01-01' and '2020-03-31';

SELECT x.* FROM [ERP].[dbo].[IvTrxBatchDetailNonInv] x left join [ERP].[dbo].[IvTrxBatchNonInv] y on y.BatchNo=x.BatchNo  where y.TrxDtTime BETWEEN '2020-01-01' and '2020-03-31';

SELECT * FROM [ERP].[dbo].[IvTrxHistory] where TrxDtTime BETWEEN '2020-01-01' and '2020-03-31';

SELECT * FROM [ERP].[dbo].[IvTrxHistoryRollback] where TrxDtTime BETWEEN '2020-01-01' and '2020-03-31';

SELECT * FROM [ERP].[dbo].[IvType];

SELECT * FROM [ERP].[dbo].[IvWarehouse];

SELECT * FROM [ERP].[dbo].[MsReason];

SELECT * FROM [ERP].[dbo].[MsUOM];

SELECT * FROM [ERP].[dbo].[POBuyer];

SELECT * FROM [ERP].[dbo].[POBuyingTerm];

SELECT * FROM [ERP].[dbo].[POCategory];

SELECT * FROM [ERP].[dbo].[POOrder] where PODt BETWEEN '2020-01-01' and '2020-03-31';

SELECT * FROM [ERP].[dbo].[POItemByVendor];

SELECT x.* FROM [ERP].[dbo].[PODetail] x left join [ERP].[dbo].[POOrder] y on y.PONo=x.PONo  where y.PODt BETWEEN '2020-01-01' and '2020-03-31';

SELECT * FROM [ERP].[dbo].[POPurItem];

SELECT * FROM [ERP].[dbo].[POSubCategory];

SELECT * FROM [ERP].[dbo].[PrDefBOM];

SELECT * FROM [ERP].[dbo].[PrDefMas];

SELECT * FROM [ERP].[dbo].[PrDefProcess];

SELECT * FROM [ERP].[dbo].[PrDefWCenter];

SELECT * FROM [ERP].[dbo].[PrUOMConversion];

SELECT * FROM [ERP].[dbo].[SaCDN] where DocDate BETWEEN '2020-01-01' and '2020-03-31';
SELECT x.* FROM [ERP].[dbo].[SaCDNDetail] x left join [ERP].[dbo].[SaCDN] y on y.DocNo=x.DocNo  where y.DocDate BETWEEN '2020-01-01' and '2020-03-31';

SELECT * FROM [ERP].[dbo].[SaComment];

SELECT * FROM [ERP].[dbo].[SaCurrency];

SELECT * FROM [ERP].[dbo].[SaCurrRate];

SELECT * FROM [ERP].[dbo].[SaCust];

SELECT * FROM [ERP].[dbo].[SaCustomerType];

SELECT * FROM [ERP].[dbo].[SaCustType];

SELECT * FROM [ERP].[dbo].[SaDisGroup];

SELECT * FROM [ERP].[dbo].[SaDO] where DODate BETWEEN '2020-01-01' and '2020-03-31';
SELECT x.* FROM [ERP].[dbo].[SaDODetail] x left join [ERP].[dbo].[SaDO] y on y.DONo=x.DONo  where y.DODate BETWEEN '2020-01-01' and '2020-03-31';

SELECT * FROM [ERP].[dbo].[SaInvoice] where InvDate BETWEEN '2020-01-01' and '2020-03-31';
SELECT x.* FROM [ERP].[dbo].[SaInvoiceDetail] x left join [ERP].[dbo].[SaInvoice] y on y.InvNo=x.InvNo  where y.InvDate BETWEEN '2020-01-01' and '2020-03-31';

SELECT * FROM [ERP].[dbo].[SaItemCust];

SELECT * FROM [ERP].[dbo].[SaPaymentTerm];

SELECT * FROM [ERP].[dbo].[SaPOSOpenAmount];

SELECT * FROM [ERP].[dbo].[SaProject] where ProjDate BETWEEN '2020-01-01' and '2020-03-31';
SELECT x.* FROM [ERP].[dbo].[SaProjectDtl] x left join [ERP].[dbo].[SaProject] y on y.ProjID=x.ProjID  where y.ProjDate BETWEEN '2020-01-01' and '2020-03-31';
SELECT x.* FROM [ERP].[dbo].[SaProjectLabour] x left join [ERP].[dbo].[SaProject] y on y.ProjID=x.ProjID  where y.ProjDate BETWEEN '2020-01-01' and '2020-03-31';

/*[SaQuoAttachFile]*/

SELECT * FROM [ERP].[dbo].[SaSalesRep];
SELECT * FROM [ERP].[dbo].[SaShift];
SELECT * FROM [ERP].[dbo].[SaShipVia];

SELECT * FROM [ERP].[dbo].[SaSO] where SODate BETWEEN '2020-01-01' and '2020-03-31';
SELECT x.* FROM [ERP].[dbo].[SaSODetail] x left join [ERP].[dbo].[SaSO] y on y.SONo=x.SONo  where y.SODate BETWEEN '2020-01-01' and '2020-03-31';

SELECT * FROM [ERP].[dbo].[SaSOQuote] where QuoteDate BETWEEN '2020-01-01' and '2020-03-31';
SELECT x.* FROM [ERP].[dbo].[SaSOQuoteDetail] x left join [ERP].[dbo].[SaSOQuote] y on y.QuoNo=x.QuoNo  where y.QuoteDate BETWEEN '2020-01-01' and '2020-03-31';

SELECT * FROM [ERP].[dbo].[SaSOType];
SELECT * FROM [ERP].[dbo].[SaTaxGroup];
SELECT * FROM [ERP].[dbo].[SaVendorType];

SELECT * FROM [ERP].[dbo].[SvCust];

SELECT * FROM [ERP].[dbo].[SvJob] where JsDate BETWEEN '2020-01-01' and '2020-03-31';
SELECT x.* FROM [ERP].[dbo].[SvJobDetail] x left join [ERP].[dbo].[SvJob] y on y.ServiceID=x.ServiceID  where y.JsDate BETWEEN '2020-01-01' and '2020-03-31';

SELECT * FROM [ERP].[dbo].[SvMaintenanceContract] where ContractDate BETWEEN '2020-01-01' and '2020-03-31';
SELECT x.* FROM [ERP].[dbo].[SvMaintenanceContractDetail] x left join [ERP].[dbo].[SvMaintenanceContract] y on y.ContractNo=x.ContractNo  where y.ContractDate BETWEEN '2020-01-01' and '2020-03-31';
SELECT x.* FROM [ERP].[dbo].[SvSche] x left join [ERP].[dbo].[SvMaintenanceContract] y on y.ContractNo=x.ContractNo  where y.ContractDate BETWEEN '2020-01-01' and '2020-03-31';
