Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9
This is the forum to discuss the Wrox book Professional SQL Server 2005 Integration Services by Brian Knight, Allan Mitchell, Darren Green, Douglas Hinson, Kathi Kellenberger, Andy Leonard, Erik Veerman, Jason Gerard, Haidong Ji, Mike Murphy; ISBN: 9780764584350
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 2nd, 2009, 11:09 PM
Registered User
 
Join Date: Mar 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 19 Case Study Problem

I am having a problem with the OLE DB Destination task for the Data Flow Lockbox Detail Data Load. The task can not insert the rows into the BankBatchDetail table because the BankBatchDtlD column is null. There are no column mappings for this column and the BankBatchDtlID is a PK for this table. Is this value derived or is it an identity column?

BTW..I think the script to create the BankBatch table requires the use of a identity column for BankBatchID.

Thank you for your in advance for your help.
  #2 (permalink)  
Old May 14th, 2009, 03:58 PM
Wrox Author
 
Join Date: Mar 2006
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Correction

The issue is the identity field was not on the script file. Either add the identity field or run this to drop the existing bank batch detail table and replace with correct structure.

Code:
USE [CaseStudy]
GO
DROP TABLE BankBatchDetail
GO
CREATE TABLE [dbo].[BankBatchDetail](
[BankBatchDtlID] [int] IDENTITY(1,1) NOT NULL,
[BankBatchID] [int] NOT NULL,
[RawInvoiceNbr] [nvarchar](50) NULL,
[RawAccountNbr] [nvarchar](50) NULL,
[ReferenceData1] [nvarchar](50) NULL,
[ReferenceData2] [nvarchar](50) NULL,
[MatchedInvoiceID] [int] NULL,
[MatchedCustomerID] [int] NULL,
[MatchedDate] [datetime] NULL,
[PaymentAmount] [money] NULL,
CONSTRAINT [PK_BankBatchDtlID] PRIMARY KEY CLUSTERED 
(
[BankBatchDtlID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, 
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, 
ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[BankBatchDetail] WITH NOCHECK ADD CONSTRAINT [FK_BankBatchDetail_BankBatchID] FOREIGN KEY([BankBatchID])
REFERENCES [dbo].[BankBatch] ([BankBatchID])
GO
ALTER TABLE [dbo].[BankBatchDetail] CHECK CONSTRAINT
[FK_BankBatchDetail_BankBatchID]
GO
ALTER TABLE [dbo].[BankBatchDetail] WITH CHECK ADD CONSTRAINT
[FK_BankBatchDetail_CustomerID] FOREIGN KEY([MatchedCustomerID])
REFERENCES [dbo].[Customer] ([CustomerID])
GO
ALTER TABLE [dbo].[BankBatchDetail] WITH CHECK ADD CONSTRAINT
[FK_BankBatchDetail_InvoiceID] FOREIGN KEY([MatchedInvoiceID])
REFERENCES [dbo].[Invoice] ([InvoiceID])
GO
Thanks,
Douglas


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error running CH 19 case study. dw60025 BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 2 April 2nd, 2009 10:18 PM
Ch13 Case Study 2 alecwood BOOK: Beginning Access 2003 VBA 0 October 18th, 2007 05:40 AM
Chapter 15 Case Study Sample paul2010 SQL Server DTS 1 November 1st, 2005 05:18 PM
Professional ASP XMl Case study 3 problem ammo1981 Classic ASP XML 0 January 27th, 2004 10:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.