Hi folks,
i have a field that contains guid's. They represent a user's PunkBuster GUID.
Is it possible to create an index, on this field, which only index's the last 8 characters of the guid?
The reason i'm asking is that you cannot to a full text search like => '*abcdef'
. (at least I believe I read that somewhere ... was it Pro Full-Text Search In Sql 08?)
Possible solutions (which i'm not too fond of, are) :-
- New table field ->
NVARCHAR(8)
. This contains the last 8 characters of the guid. Add an index on this field. - New table filed ->
UNIQUE IDENTIFIER
. Reverse the guid, then save it in this field. Then i can do an FTS on the guid, but reverse the query that was requested, then search on it -> 'fedcba*'
Now both ways would work. But i don't want to add EXTRA data to the table .. espcially if it's the same data, just 'viewed' differently.
I've got the feeling that most people might say i should store the guid in reverse, because what happens if someone wants to search for the last 5 chars of a guid OR the last 12 chars of a guid?
So assuming we don't want to do any of those, for the purpose of this discussion, can we create a index on some partial data, in a field?