October 24, 2018 at 12:51 pm
I have a data flow (in SSIS 2016) and in the Lookup I am matching on the first three columns. However when I go to the OLE for the Lookup Match Output, I am getting the error that no column information was returned. I can click "Build Query" and it shows the table I am trying to write to.. and when I click on the link between the look up and the OLE, I have data. So do not understand what is going on.
Any idea's on what I should be looking for the problem?
Here is the update:
UPDATE ztb_matdoc
SET Transaction_Type = ?, Document_Type = ?, Posting_DM = ?, Entry_DM = ?, Changed_On_DM = ?, Ref_Doc_Num = ?, Movement_Type = ?, Mat_Num = ?,
Plant = ?, Storage_Loc = ?, Batch_Num = ?, Special_Stock_Indicator = ?, Vendor_Num = ?, Customer_Num = ?, Sales_Order_Num = ?, Sales_Order_Item = ?, Debit_Credit_Indicator = ?, Currency_Key = ?,
Amount_in_Local_Currency = ?, Debit_Credit_Revaluation = ?, Valuation_Type = ?, Qty = ?, UOM = ?, PO_Num = ?, PO_Item = ?, Ref_Doc_Fiscal_Yr = ?, Doc_Num_Of_Ref_Doc = ?, Item_Num_Of_Ref_Doc = ?,
Item_Txt = ?, Goods_Recipient = ?, Cost_Center = ?, Fiscal_Yr = ?, Company_CD = ?, Accounting_Doc_Num = ?, Accounting_Doc_Item = ?, Receving_Issuing_Plant = ?, Movement_Indicator = ?,
Reason_For_Mvmt = ?, Profit_Center = ?
WHERE (Mat_Doc_Num = ?) AND (Mat_Doc_Yr = ?) AND (Mat_Doc_Item = ?)
October 24, 2018 at 2:21 pm
With that many parameters, you need to be rather sure about which one is which in your mapping. Probably worth three or four re-looks at that kind of thing.
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
October 25, 2018 at 3:00 pm
So here is the table I am trying to write to, the first three rows are the Key and is in the Where stmt
CREATE TABLE [dbo].[ztb_matdoc](
[Mat_Doc_Num] [nvarchar](10) NOT NULL,
[Mat_Doc_Yr] [nvarchar](4) NOT NULL,
[Mat_Doc_Item] [nvarchar](4) NOT NULL,
[Transaction_Type] [nvarchar](2) NULL,
[Document_Type] [nvarchar](2) NULL,
[Posting_DM] [nvarchar](8) NULL,
[Entry_DM] [nvarchar](8) NULL,
[Changed_On_DM] [nvarchar](8) NULL,
[Ref_Doc_Num] [nvarchar](16) NULL,
[Movement_Type] [nvarchar](3) NULL,
[Mat_Num] [nvarchar](18) NULL,
[Plant] [nvarchar](4) NULL,
[Storage_Loc] [nvarchar](4) NULL,
[Batch_Num] [nvarchar](10) NULL,
[Special_Stock_Indicator] [nvarchar](1) NULL,
[Vendor_Num] [nvarchar](10) NULL,
[Customer_Num] [nvarchar](10) NULL,
[Sales_Order_Num] [nvarchar](10) NULL,
[Sales_Order_Item] [nvarchar](6) NULL,
[Debit_Credit_Indicator] [nvarchar](1) NULL,
[Currency_Key] [nvarchar](5) NULL,
[Amount_in_Local_Currency] [nvarchar](255) NULL,
[Debit_Credit_Revaluation] [nvarchar](1) NULL,
[Valuation_Type] [nvarchar](10) NULL,
[Qty] [nvarchar](255) NULL,
[UOM] [nvarchar](3) NULL,
[PO_Num] [nvarchar](10) NULL,
[PO_Item] [nvarchar](5) NULL,
[Ref_Doc_Fiscal_Yr] [nvarchar](4) NULL,
[Doc_Num_Of_Ref_Doc] [nvarchar](10) NULL,
[Item_Num_Of_Ref_Doc] [nvarchar](4) NULL,
[Item_Txt] [nvarchar](255) NULL,
[Goods_Recipient] [nvarchar](12) NULL,
[Cost_Center] [nvarchar](10) NULL,
[Fiscal_Yr] [nvarchar](4) NULL,
[Company_CD] [nvarchar](4) NULL,
[Accounting_Doc_Num] [nvarchar](10) NULL,
[Accounting_Doc_Item] [nvarchar](3) NULL,
[Receving_Issuing_Plant] [nvarchar](4) NULL,
[Movement_Indicator] [nvarchar](1) NULL,
[Reason_For_Mvmt] [nvarchar](4) NULL,
[Profit_Center] [nvarchar](10) NULL,
CONSTRAINT [PK_ztb_matdoc] PRIMARY KEY CLUSTERED
(
[Mat_Doc_Num] ASC,
[Mat_Doc_Yr] ASC,
[Mat_Doc_Item] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
October 25, 2018 at 3:01 pm
This is from the Data Flow Path Editor (Metadata)
Name | Data Type | Precision | Scale | Length | Code Page | Sort Key Position | Comparison Flags | Source Component |
Mat_Doc_Num | DT_WSTR | 0 | 0 | 10 | 0 | 0 | OLE DB Source | |
Mat_Doc_Yr | DT_WSTR | 0 | 0 | 4 | 0 | 0 | OLE DB Source | |
Mat_Doc_Item | DT_WSTR | 0 | 0 | 4 | 0 | 0 | OLE DB Source | |
Transaction_Type | DT_WSTR | 0 | 0 | 2 | 0 | 0 | OLE DB Source | |
Document_Type | DT_WSTR | 0 | 0 | 2 | 0 | 0 | OLE DB Source | |
Posting_DM | DT_WSTR | 0 | 0 | 8 | 0 | 0 | OLE DB Source | |
Entry_DM | DT_WSTR | 0 | 0 | 8 | 0 | 0 | OLE DB Source | |
Changed_On_DM | DT_WSTR | 0 | 0 | 8 | 0 | 0 | OLE DB Source | |
Ref_Doc_Num | DT_WSTR | 0 | 0 | 16 | 0 | 0 | OLE DB Source | |
Movement_Type | DT_WSTR | 0 | 0 | 3 | 0 | 0 | OLE DB Source | |
Mat_Num | DT_WSTR | 0 | 0 | 18 | 0 | 0 | OLE DB Source | |
Plant | DT_WSTR | 0 | 0 | 4 | 0 | 0 | OLE DB Source | |
Storage_Loc | DT_WSTR | 0 | 0 | 4 | 0 | 0 | OLE DB Source | |
Batch_Num | DT_WSTR | 0 | 0 | 10 | 0 | 0 | OLE DB Source | |
Special_Stock_Indicator | DT_WSTR | 0 | 0 | 1 | 0 | 0 | OLE DB Source | |
Vendor_Num | DT_WSTR | 0 | 0 | 10 | 0 | 0 | OLE DB Source | |
Customer_Num | DT_WSTR | 0 | 0 | 10 | 0 | 0 | OLE DB Source | |
Sales_Order_Num | DT_WSTR | 0 | 0 | 10 | 0 | 0 | OLE DB Source | |
Sales_Order_Item | DT_WSTR | 0 | 0 | 6 | 0 | 0 | OLE DB Source | |
Debit_Credit_Indicator | DT_WSTR | 0 | 0 | 1 | 0 | 0 | OLE DB Source | |
Currency_Key | DT_WSTR | 0 | 0 | 5 | 0 | 0 | OLE DB Source | |
Amount_in_Local_Currency | DT_WSTR | 0 | 0 | 255 | 0 | 0 | OLE DB Source | |
Debit_Credit_Revaluation | DT_WSTR | 0 | 0 | 1 | 0 | 0 | OLE DB Source | |
Valuation_Type | DT_WSTR | 0 | 0 | 10 | 0 | 0 | OLE DB Source | |
Qty | DT_WSTR | 0 | 0 | 255 | 0 | 0 | OLE DB Source | |
UOM | DT_WSTR | 0 | 0 | 3 | 0 | 0 | OLE DB Source | |
PO_Num | DT_WSTR | 0 | 0 | 10 | 0 | 0 | OLE DB Source | |
PO_Item | DT_WSTR | 0 | 0 | 5 | 0 | 0 | OLE DB Source | |
Ref_Doc_Fiscal_Yr | DT_WSTR | 0 | 0 | 4 | 0 | 0 | OLE DB Source | |
Doc_Num_Of_Ref_Doc | DT_WSTR | 0 | 0 | 10 | 0 | 0 | OLE DB Source | |
Item_Num_Of_Ref_Doc | DT_WSTR | 0 | 0 | 4 | 0 | 0 | OLE DB Source | |
Item_Txt | DT_WSTR | 0 | 0 | 255 | 0 | 0 | OLE DB Source | |
Goods_Recipient | DT_WSTR | 0 | 0 | 12 | 0 | 0 | OLE DB Source | |
Cost_Center | DT_WSTR | 0 | 0 | 10 | 0 | 0 | OLE DB Source | |
Fiscal_Yr | DT_WSTR | 0 | 0 | 4 | 0 | 0 | OLE DB Source | |
Company_CD | DT_WSTR | 0 | 0 | 4 | 0 | 0 | OLE DB Source | |
Accounting_Doc_Num | DT_WSTR | 0 | 0 | 10 | 0 | 0 | OLE DB Source | |
Accounting_Doc_Item | DT_WSTR | 0 | 0 | 3 | 0 | 0 | OLE DB Source | |
Receving_Issuing_Plant | DT_WSTR | 0 | 0 | 4 | 0 | 0 | OLE DB Source | |
Movement_Indicator | DT_WSTR | 0 | 0 | 1 | 0 | 0 | OLE DB Source | |
Reason_For_Mvmt | DT_WSTR | 0 | 0 | 4 | 0 | 0 | OLE DB Source | |
Profit_Center | DT_WSTR | 0 | 0 | 10 | 0 | 0 | OLE DB Source | |
Look_Mat_Doc_Num | DT_WSTR | 0 | 0 | 10 | 0 | 0 | Lookup | |
Look_Mat_Doc_Yr | DT_WSTR | 0 | 0 | 4 | 0 | 0 | Lookup | |
Look_Mat_Doc_Item | DT_WSTR | 0 | 0 | 4 | 0 | 0 | Lookup |
October 25, 2018 at 3:04 pm
sgmunson - Wednesday, October 24, 2018 2:21 PMWith that many parameters, you need to be rather sure about which one is which in your mapping. Probably worth three or four re-looks at that kind of thing.
I am not seeing anything that looks wrong.. so I posted (above) both the table I am writing too, and the data coming from the Lookup.
October 26, 2018 at 8:12 am
dwilliscp - Thursday, October 25, 2018 3:04 PMsgmunson - Wednesday, October 24, 2018 2:21 PMWith that many parameters, you need to be rather sure about which one is which in your mapping. Probably worth three or four re-looks at that kind of thing.I am not seeing anything that looks wrong.. so I posted (above) both the table I am writing too, and the data coming from the Lookup.
Then is it possible that there are simply no matching rows for the data that has been supplied for the lookup? When all else fails, check your inputs. You'll want to do that manually, and then verify that the SQL that actually runs is indeed looking things up correctly. You may need to use SQL Profiler to watch this run.... in order that you can see what actually happens.
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
November 2, 2018 at 6:04 am
Lookups are case sensitive unless you set the No Cache option.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply