dbTalk Databases Forums  

text file to sql server

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss text file to sql server in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John
 
Posts: n/a

Default text file to sql server - 11-15-2004 , 01:01 PM






I have a text file that is 25 fields long and contains
about 150,000 records. The text file comes from an export
of paradox data. The data isn't scrubbed very well, when
i tried to take it directly from text file to database,
gave errors such as invalid column, etc. That is because
there are places in the file that the double quotes don't
match up, dates are incorrect format, etc. I tried to fix
most of it manually but then realized that the errors were
endless. What is the best way to get this data to sql
server despite the errors?

Thanks,

John

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: text file to sql server - 11-15-2004 , 01:33 PM






You are goint to have to scrub it no matter the method.

You can do this in a whole raft of ways i.e. reading each line as 1 string and then in an Active Script transform scrubbing it to
name but one.

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


"John" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have a text file that is 25 fields long and contains
about 150,000 records. The text file comes from an export
of paradox data. The data isn't scrubbed very well, when
i tried to take it directly from text file to database,
gave errors such as invalid column, etc. That is because
there are places in the file that the double quotes don't
match up, dates are incorrect format, etc. I tried to fix
most of it manually but then realized that the errors were
endless. What is the best way to get this data to sql
server despite the errors?

Thanks,

John



Reply With Quote
  #3  
Old   
John
 
Posts: n/a

Default Re: text file to sql server - 11-15-2004 , 03:08 PM



Problem with scrubbing it is next week when they export it
again, same situation. I guess I'll tell them to scrub it
from their side. Suggestions?


Quote:
-----Original Message-----
You are goint to have to scrub it no matter the method.

You can do this in a whole raft of ways i.e. reading each
line as 1 string and then in an Active Script transform
scrubbing it to
Quote:
name but one.

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


"John" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message news:650801c4cb45$7f89dd60$a601280a (AT) phx (DOT) gbl...
I have a text file that is 25 fields long and contains
about 150,000 records. The text file comes from an
export
of paradox data. The data isn't scrubbed very well,
when
i tried to take it directly from text file to database,
gave errors such as invalid column, etc. That is
because
there are places in the file that the double quotes
don't
match up, dates are incorrect format, etc. I tried to
fix
most of it manually but then realized that the errors
were
endless. What is the best way to get this data to sql
server despite the errors?

Thanks,

John


.


Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: text file to sql server - 11-15-2004 , 03:32 PM



In this situation then you have two options

1. Go to a lot of trouble your end and scrub the file no matter how rubbish the data is.
2. Tell the other end to stop messing you around and give you a proper feed. !!

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


"John" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Problem with scrubbing it is next week when they export it
again, same situation. I guess I'll tell them to scrub it
from their side. Suggestions?


-----Original Message-----
You are goint to have to scrub it no matter the method.

You can do this in a whole raft of ways i.e. reading each
line as 1 string and then in an Active Script transform
scrubbing it to
name but one.

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


"John" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message news:650801c4cb45$7f89dd60$a601280a (AT) phx (DOT) gbl...
I have a text file that is 25 fields long and contains
about 150,000 records. The text file comes from an
export
of paradox data. The data isn't scrubbed very well,
when
i tried to take it directly from text file to database,
gave errors such as invalid column, etc. That is
because
there are places in the file that the double quotes
don't
match up, dates are incorrect format, etc. I tried to
fix
most of it manually but then realized that the errors
were
endless. What is the best way to get this data to sql
server despite the errors?

Thanks,

John


.





Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.