I don’t understand what what the purpose of using “^” in the second code?
Another problem is that I don’t retrieve right information in second code compare to the first code. Why?
-- First code, use adventurework DW 2008
select FirstName, LastName from DimCustomer
where LastName like '[j-N]%'
order by LastName
-- Second code, use adventurework DW 2008
select FirstName, LastName from DimCustomer
where LastName like '[^L-N]%'
order by LastName
^means where the character is not within the specified range.Which will probably explain why you don’t get the results you though you would?