Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have some data which I would like to 'trim' where anything after the 'full stop' is removed so bbc.co.uk would simple be bbc
I treid using the code below but that didn't seem to work.
left
(HostName, index(HostName, '.') -1) as HostNameShort
Any suggestions?
Thanks
try this:
left(HostName,index(HostName,'.')-1) as HostNameShort
Is that not the same as I wrote? I think you may have missed the 'left' at the top of my code 🙂
you're right, I didn't see that left at the top o_O
then try with trim, I'm guessing you may have some spaces around the ends.
left(trim(HostName),index(trim(HostName),'.')-1) as HostNameShort