I am trying to use the select mid command in SQL Server 7, only to learn that it's not supported--Does anyone know how to do this? Here's what I'm trying to do.
I want to break a 10-digit phone number into area code, prefix, and last four digits. In Oracle SQL I would type:
select left(PhoneNumber,3) as 'AreaCode, mid(PhoneNumber,4,3) as 'Prefix', right(PhoneNumber,4) as 'Last4Digits'.
However when I try to do this in SQL Server Query Analyzer, I receive a notice that 'mid' is not a function.
Help!
Thanks in advance.
I want to break a 10-digit phone number into area code, prefix, and last four digits. In Oracle SQL I would type:
select left(PhoneNumber,3) as 'AreaCode, mid(PhoneNumber,4,3) as 'Prefix', right(PhoneNumber,4) as 'Last4Digits'.
However when I try to do this in SQL Server Query Analyzer, I receive a notice that 'mid' is not a function.
Help!