February 28, 2011 at 7:59 am
I have a .txt file, I am suppose to put the data in the .txt file into a table in a database.
I generally deal such type of task using Import Export Wizard (or) SSIS.
But in this perticular .txt file there is no row delimeter "{CR}{LF}".
Can any one suggest me the ways to put the row delimeter "{CR}{LF}" after every 40 charecters (As per the Spects) in that .txt file.
So that I can load the data into the Data Base Table.
February 28, 2011 at 8:12 am
I am not aware of any "handy" tool to exactly what you want.
If it were me I would write a little .net utility to read the file and write it back out to another file in the correct format. It would take maybe 20 lines of code to do this.
The probability of survival is inversely proportional to the angle of arrival.
February 28, 2011 at 8:29 am
I dont think you have to do anything like that, just make you SSIS flat file source , "Fixed width".
February 28, 2011 at 8:23 pm
If all the "fields" in the file line up vertically, one of the best bets is to make a "BCP Format File" and use BULK INSERT to load the file.
--Jeff Moden
Change is inevitable... Change for the better is not.
March 1, 2011 at 10:17 am
Is there anything special with the character #40?
In this case you can copy and paste the content to Microsoft Word or Outlook and do a Replace replacing this character with the same character followed by CR/LF. To get special characters in Word or Outlook, in the Replace window click More button and then Special button. I use this feature to say, replace commas with CR/LF or CR/LF with commas.
YV
Regards,Yelena Varsha
March 2, 2011 at 11:09 pm
Yelena Varshal (3/1/2011)
Is there anything special with the character #40?
Hex or decimal?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply