SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Excel Staging Table
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

nsithole
Starting Member

USA
9 Posts

Posted - 11/03/2013 :  09:36:03  Show Profile  Reply with Quote
When importing Excel data to Sql destination, my package executes OK.Now i get below errors on SQL destination when I create the execute SQL Task package(I want to create a staging table for error handling). I am stuck not knowing the next step/what i failed to do.


[OLE DB Destination [826]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E21 Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".


[OLE DB Destination [826]] Error: There was an error with input column "Copy of SSN" (963) on input "OLE DB Destination Input" (839). The column status returned was: "The value violated the integrity constraints for the column.".



CREATE TABLE [dbo].[ExcelStaging](
[Borrower_FirstName] [varchar](50) NULL,
[Borrower_LastName] [varchar](50) NULL,
[Borrower_Email] [varchar](50) NULL,
[SSN] [int] NOT NULL,
[Home_Phone] [varchar](50) NULL,
[Cell_Phone] [varchar](50) NULL,
[Marital_Status] [varchar](50) NULL,
[Date_of_Birth] [datetime] NULL,
[Current_Street_Address] [varchar](50) NULL,
[City] [varchar](50) NULL,
[State] [varchar](50) NULL,
[Zip] [varchar](50) NULL,
[YearAtThisAddress] [varchar](50) NULL,
[MonthlyIncome] [int] NULL,
[Bonuses] [int] NULL,
[Commission] [int] NULL,
[OtherIncome] [int] NULL,
[Rent_or_Own] [varchar](50) NULL,
[Purpose_of_Loan] [varchar](50) NULL,
[Property_Usage] [varchar](50) NULL,
[LoanAmount] [int] NULL,
[Purchase_Price] [int] NULL,
[Number_Of_Units] [int] NULL,
[Property_City] [varchar](50) NULL,
[Property_State] [varchar](50) NULL,
[Property_Zip] [varchar](50) NULL,
[Sex] [varchar](50) NULL,
[Ethnicity] [varchar](50) NULL,
[Race] [varchar](50) NULL,
[Co_Borrower_FirstName] [varchar](50) NULL,
[Co_Borrower_LastName] [varchar](50) NULL,
[Co_Borrower_Email] [varchar](50) NULL,
[CreditCardAuthorization] [varchar](50) NULL,
[Checking] [int] NULL,
[Savings] [int] NULL,
[RetirementFund] [int] NULL,
[MutualFund] [int] NULL,
[Referral] [varchar](50) NULL,
[RealEstateAgentName] [varchar](50) NULL,
[RealEstateAgentPhone] [varchar](50) NULL,
[RealEstateAgentEmail] [varchar](50) NULL,
[Loan_ID] [int] NOT NULL,
[Property_ID] [int] NOT NULL,
[Co_Borrower_SSN] [int] NOT NULL,
[Loan_Date] [datetime] NOT NULL)


Noreen sithole

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 11/03/2013 :  13:11:53  Show Profile  Reply with Quote
SSN seems to be a NOT NULL column. Check if SQL task is causing a NULL value to be inserted into it.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000