SQL Server 2000 - LastName >= 'Robertson'
I want to be able to search a list of people and return everyone whose LastName >= 'Robertson'. I thought about creating a temp table with an Identity and then inserting the records in alphabetical order into that table. Then find the closest match, and selecting where IdentityField >= ClosestMatch's identity.
Is there an easier way to do this?
Re: SQL Server 2000 - LastName >= 'Robertson'
There is no need for a temp table. Using >= works correctly with strings. The Where clause you posted is all you need.
Re: SQL Server 2000 - LastName >= 'Robertson'
Thanks. I tried it earlier, but must have missed something. I thought it should work, but wasn't certain. I will try a broader WHERE clause and see what happens.
Thanks again!