Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

SWQL Single Character Wildcard / String Parsing

$
0
0

Does SWQL have a single character wildcard?  I've been working with the SDK for a while and find string parsing to be the greatest difficulty.

 

I'm still trying to find a way to work around for the lack of IP Address sorting.  SWQL functions for IP Addresses

https://thwack.solarwinds.com/ideas/10592

 

I generally find I need REGEX pattern matching MySQL :: MySQL 5.7 Reference Manual :: 3.3.4.7 Pattern Matching and a bunch of string functions MySQL :: MySQL 8.0 Reference Manual :: 12.5 String Functions that just don't exist.

 

How do people generally accomplish what is needed using only SubString and CharIndex?

 

Nesting of these functions doesn't appear to work...

    SELECT N.IPAddress AS IP

         , N.DnsBackward

         , SUBSTRING( IP

                    , 1

                    , CHARINDEX('.',IP,1)-1) AS O1

         , SUBSTRING( IP

                    , CHARINDEX('.',IP,1)+1

                    , CHARINDEX('.',IP,CHARINDEX('.',IP,1))-1) AS O2

         , SUBSTRING( IP

                    , CHARINDEX('.',IP,CHARINDEX('.',IP,1))+1

                    , CHARINDEX('.',IP,CHARINDEX('.',IP,CHARINDEX('.',IP,1)))-1) AS O3

         , SUBSTRING( IP

                    , CHARINDEX('.',IP,CHARINDEX('.',IP,CHARINDEX('.',IP,1)))+1

                    , CHARINDEX('.',IP,CHARINDEX('.',IP,CHARINDEX('.',IP,CHARINDEX('.',IP,1))))-1) AS O4

    FROM IPAM.IPNode AS N


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>