Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 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
 
Old October 2nd, 2007, 03:45 PM
Registered User
 
Join Date: Oct 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic SSIS Bulk Inserk Package

Hi, All!
     I have an application that builds a BULK INSERT package dynamically. It is working fine. However, I would like to add a unique value to each record that is bulk inserted that is NOT part of the input file. As a matter of fact, before the BULK INSERT, a record is written to a FilesReceived table and assigned a FileID. I want all records that are successfully inserted to have this FileID. I thought about adding and Execute SQL Task and updating all records that have a NULL FileID, but can't since this is going to be a multi-thread application and there could be records in the same staging table with NULL FileID fields that are NOT from the same file. Any clue how I can add this field DURING the BULK INSERT? Thanks.

Cheers!~


Monty D. Grimmett
 
Old October 4th, 2007, 09:10 AM
Registered User
 
Join Date: Oct 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK, All. The answer is NO, you can not insert additional fields using the BULK INSERT.

However, you CAN use the OPENROWSET(BULK...) functionality to do this. This can be done within an application or within a Package either way.

Cheers~

Monty D. Grimmett





Similar Threads
Thread Thread Starter Forum Replies Last Post
Scheduling - SSIS package carumuga SQL Server DTS 0 October 10th, 2008 01:50 AM
How To Run SSIS Package uit VB How-To 4 August 12th, 2008 11:09 AM
SSIS - Package Configuration using Tables carumuga SQL Server 2005 0 July 17th, 2008 06:11 AM
Execute SSIS Package from ASP.NET ghari ASP.NET 1.0 and 1.1 Professional 0 June 11th, 2007 12:51 AM
Trigger SSIS package from Sharepoint pallavi11 SQL Server 2000 0 May 1st, 2007 05:33 PM





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