I'm trying to parse strings and am trying to refer to an alias in the SWQL query.
In the following query, I can refer to the alias IP without issue. However, the alias from the CHARINDEX expression gives an exception: Cannot resolve property P1.
SELECT N.IPAddress AS IP
, N.DnsBackward
, CHARINDEX('.',IP,1)-1 AS P1
, ToString(P1)
FROM IPAM.IPNode AS N
Is this a bug? If not, what determines when an alias can be referenced? Is there another way to accomplish this?