Wrox Programmer Forums
|
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS 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, 2006, 12:45 PM
Registered User
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default dts problem

text file


ProductName,ProductPrice
Polo,49.95
Khaki,29.95
Cardigan,19.99
HomeComing,99.99
Wedding,199.99


destination

Productid (primary key)
product name
product price


how to create dts package i am facing key vilotion problem


 
Old October 2nd, 2006, 01:07 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

set your productID to Auto Increment, when you run the DTS map productname and price to the right columsn, dont map anything to the pk field (SQL will fill it in automatically).

--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
 
Old October 2nd, 2006, 01:37 PM
Registered User
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks i want to do my own job but i set auto increment property but dont know why still is a problem

 
Old October 2nd, 2006, 01:43 PM
Registered User
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i found enable to insert null data

 
Old October 2nd, 2006, 02:00 PM
Registered User
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

CAN YOU HELP



 
Old October 2nd, 2006, 02:17 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

What are you importing your data from? CSV?

If you are getting the error "Unable to Insert 'NULL' into column ProductID, column does not allow for Nulls. Insert Fails.'

It means either A)You have not set the column to auto inc or B)You are trying to insert data into that field that is Null.

Consider this:
I have a DTS on my SQL Server that has 3 steps

Step 1: Truncate Table X
    -Table X has 4 fields
        -pk (integer, pk, auto inc)
        -column1 varhcar
        -column2 varchar
        -column3 varchar
Step 2: DataPump from a CSV file
     -On my transformation tab for the data task, my CSV has 3 columns and my Destination has 4, align the correct source with the correct destination.
Step 3: Copy this data to another table based upon the pk.

hth




--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
 
Old October 2nd, 2006, 02:56 PM
Registered User
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks i was doing silly mistake


 
Old October 2nd, 2006, 03:20 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Glad you worked it out.

--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.





Similar Threads
Thread Thread Starter Forum Replies Last Post
DTS Performance Problem abob SQL Server DTS 0 September 6th, 2005 04:06 AM
Problem in DTS pranoy SQL Server DTS 0 July 26th, 2005 12:52 AM
DTS Column Mapping Problem hortoristic SQL Server 2000 2 August 2nd, 2004 03:21 PM
DTS problem :( meemee SQL Server 2000 1 March 4th, 2004 06:49 AM
DTS Problem [email protected] SQL Server DTS 0 January 7th, 2004 05:54 AM





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