MS SQL Server pads shorter string to the length of the longer string with spaces before comparison. The same as VFP does in SQL statements with SET ANSI ON.
>Did I miss something between 2005 and 2008 R2 regarding comparing string values for where clauses and joins?
>
>I seemed to remember when I was learning TSQL coming from VFP that you had to be careful in you remote views and I was always defensively using LIKE instead of = and throwing % around at the end of strings to compare and RTRIM ing just about any CHAR column
>
>Anyway, as I'm converting a bunch of VFP views to a SQL backend I'm finding even though the SQL tables hardly ever use VARCHAR and the data was converting without trimming I can say
>
>WHERE table.cname = ?vp_name and not worry about spaces etc even if vp_name is 'Joe ' and the cname col is char(5) (these may not be the best examples but I am very surprised it seems to behave more like VFP now than it used to.
>
>Am I remembering a problem that never existed or did something change in TSQL?
--sb--