Re: SQL 2000 DTS Transfer TEXT file to a Table



Hello Ivan,

So if you don't care if the string is 21 or 22 characters in length but in any event it will be terminated with a {CR}{LF} then would defining the file as comma delimied not work for you? You should see the string come through as a single column.



Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Both 21 & 22 characters are accepted.

It is a single column string.

Besides, I am already using delimited string with CRLF as the Row
Terminator.

Ivan

"Allan Mitchell" <allan@xxxxxxxxxxxxxxxxxx>
???????:f0343b03225e18c831b87756a950@xxxxxxxxxxxxxxxxxxxxxxx

Hello Ivan,

So are you expecting 21 or 22 characters in a row?

Is this a single column string?

For this I would usually specify a delimited string with CRLF as the
Row Terminator. It works for me.

Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com
I have checked the data using HEX Editor and found it had no
problem.

I have check the data again and found the problem.

The text files contain the strings with 21-22characters

When DTS read the string with 21 characters, it cannot read the next
string with 22 characters.

So, the missing strings are only the one with the previous strings
had 21 characters.

Is there anything I set wrong?

Ivan

"Allan Mitchell" <allan@xxxxxxxxxxxxxxxxxx>
???????:f0343b03221c48c830f0886628e0@xxxxxxxxxxxxxxxxxxxxxxx
Hello Ivan,

are the rows terminated correctly (Use a HEX Editor).? Can you
narrow the file down to get to the first row that starts to get
missed?

Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com
Dear all,

I am using SQL 2000 SP4.

I want to use DTS to transfer a text file to a SQL table.

The text file contain one string and I transfer it to a column.

However, I found that sometimes, some records are missed.

The length of the records are the same.

Does anyone encounter similar problem?

Best Regards,
Ivan


.



Relevant Pages

  • Re: Prothon should not borrow Python strings!
    ... """It does not make sense to have a string without knowing what encoding ... same cul de sac as Python. ... Prothon_String_As_ASCII // raises error if there are high characters ... Python's split between byte strings and Unicode strings is ...
    (comp.lang.python)
  • Re: Letter to US Sen. Byron Dorgan re unpaid overtime
    ... put them in stupid places. ... Programming is difficult (as you must surely appreciate, ... > strings will be in the range 1...1000 characters. ... impose an artificially small limit on string length." ...
    (comp.programming)
  • Re: Fast UTF-8 strlen function
    ... >> Is there a fast UTF-8 string length function floating around? ... Length in bytes, or length in characters? ... For UTF-8, the main basic "change" you have to make to your string routines ... then I could individually look up the characters in my UNICODE ...
    (alt.lang.asm)
  • Re: Byte Array to String
    ... retrieved text will mismatch the original characters. ... encoding the characters. ... Dim strFileData as String ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: A note on personal corruption as a result of using C
    ... impossible to write effective string validation routines by definition ... (Note that a string literal may contain embedded null characters; ... without resorting to abusive language. ... In practice, programmers typically use "struct" ...
    (comp.programming)