Hi,
As title really!
DOMAIN\Joe.Bloggs should be Firstname: Joe and Lastname: Bloggs
I'm currently doing lots of funky substrings:
select substring(SYSTEM_USER, charindex('\', SYSTEM_USER, 0) +1, charindex('.', SYSTEM_USER) - charindex('\', SYSTEM_USER, 0) -1),
substring(SYSTEM_USER, charindex('.', SYSTEM_USER, 0) +1, len(SYSTEM_USER) - charindex('.', SYSTEM_USER, 0));
Is there a neater way?!
Thanks!