[posted and mailed, please reply in news]
Colin Hale (co*******@radiusplc.co.uk) writes:
This is driving me bananas. Can't find any info on this anywhere....
SQL 2000 seems to replace double space with a single space when I set
a varchar field to " " (2spaces), it only stores " " (1space). Why
on earth would microsoft do this? If I save 2 spaces - I WANT TO SEE
2 SPACES!!!!
Can anyone help? Is this a database setting? Is this due to using
varchar?
Could you please post a repro that demonstrates the problem? That is
a script with a CREATE TABLE statement, INSERT statements of the data.
Or if you add the data through some client code, please include
that client code.
I get double spaces from this script:
CREATE TABLE a(a varchar(10))
go
INSERT a VALUES ('a a')
go
select * from a
--
Erland Sommarskog, SQL Server MVP,
so****@algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp