How to change the ragged right CR/LF position in .txt file (ie using UltraEdit) before importing in SQL Server? -
How to change the ragged right CR/LF position in .txt file (ie using UltraEdit) before importing in SQL Server? -
i provided ragged right unix text file cr/lf position of lines appears set @ 100. provided column layout document takes file out position 150. there way alter cr/lf position 150? if import sql server using format provided, since linefeed @ 100, sql server grabs first 50 characters of next line.
i can offer 2 solutions.
using column mode move caret column 151 according status bar in first line of file. there 150 characters left of caret position. click in menu column on menu item column mode turn on mode. click in menu column on menu item insert/fill columns, come in single character # , execute command. you see character # on lines inserted @ column 151. click in menu column on menu item delete columns, come in 1 , execute command. click in menu column on menu item column mode turn off mode.now lines in file have 150 characters. might want go end of file using ctrl+end , delete 150 spaces in lastly line if line not contain else.
you can enable show line endings in menu view check lines visually.
this solution easiest method little files.
using perl regular look replaces insert @ top of file 150 spaces, select 150 spaces using ctrl+shift+home , cutting them ctrl+x clipboard. run perl regular look replace all top of file $ search string (means end of line) , paste ctrl+v 150 spaces replace edit field replacing existing in edit field. lines have 150 or more characters. run 1 more perl regular look replace top of file ^(.{150}).*$ search string , \1 replace string.the sec perl regular look using marking grouping first 150 characters of each line referenced \1 maintain them removes other inserted spaces each line column 151 end of line.
this solution improve big files , of course of study works other editors supporting perl regular look replaces.
sql-server ultraedit
Comments
Post a Comment