Hi,
i am using ado.net source in ssis to get data from cache database. I have defined two variables startdate and enddate and want to pass it using parameter into the sql query. But in ado.net source there is no parameter mapping tab. I need help to do it.
Below is my get part code.
select distinct convert(int,0) as CalendarID, d.ItemNumber as ProductCode, convert(int,0) as ProductSK, Isnull(a.Customer,0) as CustomerNumber, convert(int,0) as CustomerSK, convert(nvarchar,a.Supplier) as SupplierNumber, convert(int,0) as SupplierSK, convert(nvarchar,b.Salesman1) as SalesRepID, convert(int,0) as SalesRepSK, isnull(i.CreatedBy,'Unknown') as CashierID, convert(int,0) as CashierSK, isnull(b.InvoiceNumber,'Unknown') as TransactionNumber, -- in the source some invoice number are blank. a.relOrderNo as OrderNumber, -- from order line item a.LineItem1 as SequenceID , b.Location as BranchID, convert(int,0) as BranchSK, $$^WWWDATE(b.OrderDate) as InvoiceDateGr, convert(int,0) as PaymentMethodSK, isnull(b.Zahlungsweg,'Unknown') as PaymentMethodID, isnull(a.UnitSalesPrice,0) as SellingPrice, isnull(a.UnitSalesPrice,0) as SellingPriceUsed, isnull(a.Cost,0) as CostPrice, isnull(a.AdditionDiscount1,0) as DiscountAmount, case when a.ComplaintSparePart = 0 then a.Quantity when a.ComplaintSparePart is null then a.quantity-- if Complaintsparepart is 0 and is null then sales else 0 end as SalesQuantity, case when a.ComplaintSparePart = 0 then a.NetSalesPrice when a.ComplaintSparePart is null then a.NetSalesPrice -- if Complaintsparepart is 0 and is null then sales else 0 end as SalesValue, isnull(a.Remarks,0) as SellingPackSize, isnull(a.QuantityUnit,0) as UOS, P.Consistof as PackID, -- in the source system all are null convert(nvarchar,d.createdby) as BuyerID, convert(int,0) as BuyerSK, case when a.ComplaintSparePart = 1 then a.Quantity else 0 end as ReturnQuantity , -- if Complaintsparepart is 1 then Return quantity case when a.ComplaintSparePart = 1 then a.NetSalesPrice else 0 end as ReturnValue, --if Complaintsparepart is 1 then Return value b.OrderType as IdentifierID, -- 0 is customer order update it from ordertype dimension convert(int,0) as IdentifierSK, isnull(a.ComplaintReason,'Unknown') as ReturnReasonCode, convert(int,0) as ReturnReasonSK, a.datecreated as DateCreated from user.INAUFP a left outer join user.INAUF b on a.relOrderNo = b.OrderNo left outer join user.INKUNDE c on a.Customer = c.CustomerNumber left outer join user.INART d on a.itemnumber = d.itemnumber left outer join User.InARTPACK p on d.ItemNumber = p.ItemNumber left outer join user.infibcashiercare i on a.customer = i.CustomerNumber where a.invoicenumber<>0and a.datecreated >= ? and a.datecreated >= ?