I am trying to pull off the first part of an email before the @ symbol.
This works:
SELECT substring(email, '(\S+)(@{1})')
However I'd like to also only pull off the first 15 (or less) characters.
How can I do this?
SELECT substring(email, '(\S+)(@{1})', 15)
doesn't work.
Thanks!
LEFT(substring(email,'(\S+)(@{1})'), 15)?