I can't check it at this moment, but I don't think any recent MS SQL (that is 7.0 and up) does this for varchars. I'm sure I would notice. It does change an empty string to a string containing the right number of spaces for char(N) columns, but there it can't do anything better. If I still remember this node tomorrow when I am at work and can try things I'll test it and post an update.
Update: Yep, I was right:
create table foo (svarchar varchar(10), schar char(10)) insert into foo (svarchar, schar) values ('', '') insert into foo (schar) values ('') select '>' + svarchar + '<', '>' + schar + '<' from foo
Jenda
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne
In reply to Re^4: Writing It Myself, DWIM, and Expectations
by Jenda
in thread Writing It Myself, DWIM, and Expectations
by jest
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |