Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error" ...The OLE DB Source.Outputs[OLE DB Source Output].Columns[XXXXXXXX] on the non-error output has no corresponding output

Ive spent hours trying to fix this issue. For the column that's giving me the problem i am using a scalar-function in sql server to grab the name. The function is correct and works fine. I then use a stored procedure to use with ssis. The column that is giving me the error is stating it has no corresponding output column on the error output. Everything seems to be fine. I have done the following per previous recommendations:

  1. Deleted source and destination and remapped everything
  2. Changed DelayValidation property to true
  3. Changed maximum error count to 100
  4. Unchecked and rechecked Available External Columns in source

These were recommendations per previous forums.

I am an intern and want to get this on my own without having to ask my manager. I have spent countless hours trying to fix the problem.

Any suggestions?

EDITING TO ADD VALUE TO QUESTION

The following is my query in my OLE DB source

SELECT *
FROM RExtenstionBase R
LEFT OUTER JOIN AExtensionBase A
ON R.ASN = A.SN
AND R.ARN = A.R

This query gives me the fields I need from Dynamics CRM.

The following is my stored procedure call in the OLE DB Command:

EXEC InsertRepairs ?,?,?,?,?,?,?,?,?,?

The following is my stored procedure script:

USE [MSCRM_RC]
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[InsertRepairs] 
    -- Add the parameters for the stored procedure here

    @ROID nvarchar(100),
    @AType nvarchar(100),
    @ARN nvarchar(100),
    @DateReceived datetime,
    @RForRR nvarchar(100),
    @C nvarchar(100),
    @SN nvarchar(100),
    @ASN nvarchar(100),
    @Performed nvarchar(100),
    @COR decimal


AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
    DECLARE @newID AS UNIQUEIDENTIFIER
    SET @newID = NEWID()

INSERT INTO [dbo].[A_RBase] /***BASE TABLE ALWAYS THE SAME ***/
           ([A_RCRIDID] /*Always change this tho */
           ,[CreatedOn]
           ,[CreatedBy]
           ,[ModifiedOn]
           ,[ModifiedBy]
           ,[CreatedOnBehalfBy]
           ,[ModifiedOnBehalfBy]
           ,[OwnerId]
           ,[OwnerIdType]
           ,[OwningBusinessUnit]
           ,[statecode]
           ,[statuscode]
           ,[ImportSequenceNumber]
           ,[OverriddenCreatedOn]
           ,[TimeZoneRuleVersionNumber]
           ,[UTCConversionTimeZoneCode])
     VALUES
           (@newID
           ,GETUTCDATE() -- CreatedOn
           ,'XXXXXXXXXXXXXXXXXXXXXXX' -- CreatedBy
           ,GETUTCDATE()                            -- ModifiedOn
           ,'XXXXXXXXXXXXXXXXXXXXXXX'   -- ModifiedBy
           ,NULL                                    -- CreatedOnBehalf
           ,NULL                                    -- Modified''
           ,'XXXXXXXXXXXXXXXXXXXXXXX'   -- OwnderId
           ,8
           ,'XXXXXXXXXXXXXXXXXXXXXXX'
           ,0                                       -- statecode
           ,1                                       -- statuscode
           ,5                                       -- ImportSequenceNumber
           ,NULL                                -- Overrid
           ,0                                       -- TimeZoneRule 
           ,NULL)                                   -- UTCConversion




INSERT INTO [dbo].[A_RExtensionBase]
           ([A_RCRID]
        ,[A_Name]
           ,[A_AType]
        ,[A_ARN]
           ,[A_DateReceived]
           ,[A_RForRR]
        ,[A_C]
        ,[A_SN]
        ,[A_ASN]
           ,[A_Performed]
           ,[A_COR])
     VALUES
           (@newID,
         @ROID,
         @AType,
         @ARN,
            @DateReceived,
            @RForRR,
         @C,
         dbo.Lookup_SNID_GUID(@SN)
         @ASN,
            @Performed ,
         @COR)


END

The following is my scalar-valued function:

USE [MSCRM_RC]
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


ALTER FUNCTION [dbo].[Lookup_SNID_GUID] 
(
      -- Add the parameters for the function here
      @SN_Name nvarchar(100)
)
RETURNS UNIQUEIDENTIFIER
AS
BEGIN
      -- Declare the return variable here
      DECLARE @SN_GUID UNIQUEIDENTIFIER
      SELECT @SN_GUID = SNID

      FROM SNExtensionBase
      WHERE name = (@SN_Name)

      RETURN @SN_GUID
END
like image 915
J.S. Orris Avatar asked Jan 08 '14 20:01

J.S. Orris


2 Answers

Apparently this is a common bug with SSIS packages. I got it to eliminate the error by drilling into the OLE DB Source, clicking on the columns tab, finding the Available External Column that was included in the error message, and then unchecking the check box and rechecking it. ERROR SOLVED!

like image 168
J.S. Orris Avatar answered Nov 10 '22 22:11

J.S. Orris


I came across with the bug "error output has no corresponding output" quite often when adding a new column to a table that needs to be processed by an existing SSIS package. This bug came along with an error message saying that a "Value does not fall within the expected range".

A newly added column needed to be processed by an existing SSIS Package. The expected behavior is that SSIS will recognize that there is a new column and select this column on the columns page of the OLEDB Source Task SSIS to be processed. However, when opening the OLEDB Source Task for the first time after having modified the table I got twice the following error message: "Value does not fall within the expected range." The error message showed up when opening the editor and when opening the Columns page of the editor. Within the Advanced Editor of the OLEDB Source Task the new column showed up in the OLEDB Source Output Columns Tree, but not in the OLEDB Source Error Output Columns Tree. This is the actual underlying problem of the error message. Unfortunately, there seems to be no way to add the missing column manually.

To solve the problem, remove and re-add the newly added column on the Columnns Page of the normal Editor as mentioned by Jeff.

Probably, it is worth to be mentioned that the data source of the OLEDB Source task was a modified MDS View. Microsoft CRM Dynamics is using views, too. That leads me to the conclusion, that using views as a data source may produce either of the above mentioned errors, when modifying datatypes or adding/removing columns.

Related Thread: How to fix SSIS : "Value, does not fall within expected range"?

The described workaround refers to Visual Studio 2008 Version 9.0.30729.4462 QFE with Mircorsoft.NET Framework 3.5 SP1. The database is SQL Server 2008 R2 (SP2).

like image 29
Marcus Belz Avatar answered Nov 10 '22 21:11

Marcus Belz