Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS Failure when importing from .cvs file

Status
Not open for further replies.

Haybails90

Programmer
Sep 3, 2004
57
US
Hey there SQL Gurus!

I have a .cvs file containing some sales data. I'm trying to pump this into an already existing table in my database. I go through the DTS setup; when I get to the 'Select Source Tables and Views' section I click on the Transform button. Up pops the 'Column Mappings and Transformations' window. OK, the default tab is 'Column Mappings', I adjust my 'Types' and 'Precisions' appropriately. Now, here's the problem, there are three radio buttons:
1.) 'Create Destination Table'
2.) 'Delete Rows in Destination Table'
AND
3.) 'Append Rows to Destination Table'

I want this data put into an existing Table, problem is, the second two radio buttons are grayed out. So, the DTS keeps trying to create a new table.

Forgive me if this is elementary information which I should have picked up in the 'Super Beginners - Very Slow Introduction to MS-SQL Server for mentally challenged users --- 101' class, but I'm stumped (and a bit under the gun - therefore also a bit nervous, which makes me irritable) . . . and no one wants that. LOL.

Thank you in advance for any and all who can offer some assistance yet today (Jan. 21 - 12:15 CST).




Haybails90
 
what version of sql server are you using - I am using 2000 and dont see three radio buttons - where exactly do they appear ?

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
Hey dbomrrsm,

Thanx for jumping on board here ...

I'm initially testing this on my developement machine. So, I'm using Microsoft SQL Enterprise Manager Version 8.0. on an XP Pro machine.

I right click on the table, hover over 'All Tasks' and select 'Import Data ...'. This brings up the DTS Wizard. I select my .csv file as a sorce using 'Text File' and then point to my .csv file. All the delimiters are fine, I tick that the first row is headers, then click next. I select select 'OLE DB Provider for SQL Server' as Destination, and select my database (then next). The next window is the 'Select Source Tables and View' window, I click the little button in the 'Transform' column. This is where I can't get it off the 'Create Destination Table' radio button.



Haybails90
 
followed your steps exactly an in 2000 it works fine with all three radio buttons available. Are you sure you have selected the correct DB and table in the previous windows and that the table does exist.

Sorry cant be of more help.

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
sory got to go now - hope you get it sorted - if you have access to DTS then use that as it will not ask about append/create etc it will automatically append the data to an existing table.

create a text file sourse a SQL Server destination the do a transform data task between them - double click the transform task arrow/line and follow the prompts - ie select dest table etc

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
OHHHHHHH! Hey, I might be on to something here. The previous developer, whom I replaced four months ago, named this database with a period (to reflect the name of the web site it's for) ... for example, "websitename.com" is the name of the database. Could this be causing the problem? And if so, what do I need to do to fix it?


Haybails90
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top