Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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.
Reply With Quote
  #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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:18 PM.


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