;WITH group1 AS ( SELECT [CLASS] AS EXTENSION, [CLASSNAME] AS TYPE, [KEYNAME] AS KIND, [KEY] FROM SYSTEM WHERE KEYNAME = '#APPLICATION' )Second query collects "VBOX" name
, group2 AS ( SELECT [CLASS] AS EXTENSION, [CLASSNAME] AS TYPE, [KEYNAME] AS KIND, [KEY] FROM SYSTEM WHERE KEYNAME = '#VBOX' )Third uses the two group to present a result with single row per record.
SELECT * FROM group1 JOIN group2 on group1.EXTENSION = group2.EXTENSION ORDER BY group1.EXTENSION ASCThese work well but my issue is the columns present "numeric" values for the "KEY" columns. So I need to re-query the "SYSTEM" table to find matching data that match the [KEY].numeric result.
EXTENSION TYPE KIND KEY EXTENSION TYPE KIND KEY 11011121600 VMX #APPLICATION AF71B74D301842C 11011121600 VMX #VBOX BC56379D-B99C-4058-A563-E0CE3D0C1480The above is a sample of the result. Want to query the "SYSTEM" table looking for more data regarding each row's final KEY column. Example looking for "BC56379D-B99C-4058-A563-E0CE3D0C1480". The result will be two column with EXTENSION and the result of the forth query.
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.