I expected all of the following SQL queries to return no results:
select 1 where '-' > 'A' collate Latin1_General_BIN
select 1 where '-' > 'A' collate SQL_Latin1_General_CP1_CI_AS
select 1 where '-B' > 'AB' collate Latin1_General_BIN
select 1 where '-B' > 'AB' collate SQL_Latin1_General_CP1_CI_AS
select 1 where N'-' > N'A' collate Latin1_General_BIN
select 1 where N'-' > N'A' collate SQL_Latin1_General_CP1_CI_AS
select 1 where N'-B' > N'AB' collate Latin1_General_BIN
select 1 where N'-B' > N'AB' collate SQL_Latin1_General_CP1_CI_AS
But the very last one returns 1. Something about the two characters and using nvarchar and the collation cause -B to be greater than AB, but only in this one query. Why is that?