Re: Bad data
From: Allan Mitchell (allan_at_no-spam.sqldts.com)
Date: 03/01/04
- Next message: Allan Mitchell: "Re: variable in transaction"
- Previous message: Allan Mitchell: "Re: Design question [Global Variables and VB]"
- In reply to: Mike: "Bad data"
- Next in thread: Mike: "Re: Bad data"
- Reply: Mike: "Re: Bad data"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 1 Mar 2004 17:32:50 -0000
#1 is a classic problem when moving date data. Everybody has there own
limits and none of them ever seem to meet :-(
Have you tried an Active Script transform and DEFAULT the data in this
column if it is Out Of Range.
#2 The Quotes should not be entered into the table as well. Have you a
sample row from the text file and your table structure?
-- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Mike" <anonymous@discussions.microsoft.com> wrote in message news:488201c3ffa4$c3ae5f10$a501280a@phx.gbl... > I am creating a DTS process that will extract data from a > text file and place it into sql server. The data comes > from a Paradox database and outputted into a text file. > The file is delimited with a pipe (|) and text has double > quotes "". > > Issue number 1. > One problem I'm noticing, there are many dates in the file > that have invalid dates such as 02-04-0203. So when I try > to load them into a datetime field in SQL it gives an > error. How can that be avoided, temporarily I changed the > field type to be a varchar, but that doesn't seem > efficient or like the right thing to do. > > Issue number 2. > The second problem is that somewhere in the file, the > double quotes must be off, because when I try to tell sql > server that the text is delimited by a | and "" it gives > an error. So my work around that issue is to allow quotes > to be inserted into the fields then I have to run a > routine to remove the quotes. That again seems like an > inefficient way of handling the data, but it does work. > Are there any suggestions on if I should alter this > process? What is a better way to handle this data which > seems to have bad data in it? Is there any way to pre- > clean the data from the textfile so it will go into the > table without quotes?
- Next message: Allan Mitchell: "Re: variable in transaction"
- Previous message: Allan Mitchell: "Re: Design question [Global Variables and VB]"
- In reply to: Mike: "Bad data"
- Next in thread: Mike: "Re: Bad data"
- Reply: Mike: "Re: Bad data"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|