I have the following T-SQL if statement:
if @changeType = 'ChangeFrom'
begin
print 开发者_运维问答'yep'
end
else
begin
print 'nope'
end
If @changeType = 'ChangeFrom'
I get yep.
If @changeType = 'ChangeTo'
I get nope.
If @changeType ='ChangeFromfsjkfh'
I get yep! Whats going on there?
What length have you declared the @ChangeType variable as - it looks like it's getting truncated?
精彩评论