select * from tableA a ; inner join TableB b on a.Some_Id=b.Some_Id ; where b.Some_Id between 1 and 0xFFFFFFFFReturns 0 records !!! but :
select * from tableA a ; inner join TableB b on a.Some_Id=b.Some_Id ; where a.Some_Id between 1 and 0xFFFFFFFFReturns n records. This is a problem if you have more joins and have to use a field from any table except first. If you use 0x7FFFFFFF then it works. It doesn't help if you write in hex notation or not. I really could have a value greater than (should I say less than) 0x7FFFFFFF. Any reference to this on MSDN ? TIA.