all groups > sql server dts > november 2006 >
You're in the

sql server dts

group:

Some Flat File Records Missing Carriage Return



Some Flat File Records Missing Carriage Return cdun2
11/28/2006 7:00:32 AM
sql server dts: Hello,

I have a series of fixed width flat files where the character length of
each record is 384. The problem is that there is not a carriage return
after the ends of some of the records. There is research under way to
find out just exactly why this happens, but in the meantime, I need to
find a way to discover the occurances of the problem, and insert the
carriage return where it needs to go.

Should I try an Active X script to approach the problem, or explore
possibilities with a batch file? Is there some other way that would be
a better approach?

If you can point me to code resources/sample scripts, that would be
greatly appreciated. Otherwise, please share any suggestions you think
would be helpful.

Thank you for your help!

cdun2
Re: Some Flat File Records Missing Carriage Return Arnie Rowland
11/28/2006 9:05:43 AM
Fixed Width Import/Export does not rely upon a carriage return, in fact, one
often is not included in the data file.

I suppose that if you are certain that every record is 384 characters in
length, you could have a script that looks at character 385, and if it is
not a char(10), char(13), or char(10)char(13), then insert one.

I would first try to determine of some variation of fixed width import would
work.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


[quoted text, click to view]

Re: Some Flat File Records Missing Carriage Return cdun2
11/28/2006 10:59:15 AM
Thank you for your help!

cdun2

[quoted text, click to view]
AddThis Social Bookmark Button