Wednesday, 15 July 2015

database - Quick way to space fill column 256 chars SQL-Server 2012 -



database - Quick way to space fill column 256 chars SQL-Server 2012 -

so have file i'm creating using sql server 2012.

many of columns optional or unused, , in place of characters there asked zero-fill numeric columns, , space-fill alphanumeric columns.

now have column called cdd , it's 256 characters long.

is there simpler way can fill column other pressing space bar 256 times in single quotes?

the file fixed width have have 256 spaces in column import correctly. looking @ replicate , stuff, don't create sense beingness column doesn't have original string replace.

replicate works zeros how can validate spaces? column doesn't expand if there actual character in it...does sql-server collapsing of white space in way?

in add-on replicate can utilize

select space(256);

as far "the column expanding", column not appear expanded in ssms unless click on 'results in text' (instead of grid). if utilize len function homecoming 0, datalength homecoming either actual number of spaces requested varchar column, or defined length of char column. either way, if re-create output text editor, see indeed string of empty spaces.

sql database sql-server-2012 fill replicate

No comments:

Post a Comment