esther s via SQLMonster.com (fo***@SQLMonster.com) writes:
there are one table with a column with 16 varchar, eg. ________1245678( _
stands for space.).the database size is 15 MB.
when using bcp,
right-aligned data will be display.
Can i change it to left-aligned, eg. 12345678________?
i have use the store procedure with "ltrim" to cut off the spacing, Can
i use another methods to change it??
It isn't clear me, do you want to strip the leading spaces when bulking
out, or do you get leading spaces when you load a file? In the latter
case, it would help to have the table definition, and a sample of the
data file.
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp