Is not SQL 2005 not 100% percent compitable with .NET ?
Books say that trailing spaces are ignored when comparing two strings in SQL. This is true when the comparision is made from SQL editor. But from C# code this is not true and the comparion yeilded false just becaause of one trailing whitespace characteer .
Jignesh TrivediPosted Dec 5, 2013, 12:39 AM
hi,
trailing space is only ignored in sql when data type is nvarchar or varchar... because is not stored trailing white space...
declare @d varchar(50) = 'tejas '
declare @i varchar(50) = 'tejas'
if(@d=@i)
print 'match'
else
print 'not match'
this is always return match....
while .NET there is string data type it always store what ever you assign...
rachel smithPosted Dec 5, 2013, 12:04 AM