Working to generate an alert using. SELECT APM_ApplicationAlertsData.Name, APM_ApplicationAlertsData.ApplicationID FROM APM_ApplicationAlertsData from the 
I am adding a SQL which calculated the heap percentage.
SELECT
((SELECT [StatisticData]
FROM [SolarWindsOrion].[dbo].[APM_AlertsAndReportsData]
where NodeName LIKE '%jsmhpxweb02a%' and ApplicationName Like '%CMD Glassfish%' and ComponentName Like ('Memory Heap Used%')) /
(SELECT [StatisticData]
FROM [SolarWindsOrion].[dbo].[APM_AlertsAndReportsData]
where NodeName LIKE '%jsmhpxweb02a%' and ApplicationName Like '%CMD Glassfish%' and ComponentName Like ('Memory Heap Max Size%')) * 100) as JAVAHeapPerc;
to
I assume I am adding a rightjoin What is needed to combine the part from Solarwinds which doesn't change and the part I created.
Does Solarwinds have just where I could just put in the full script versus trying to mold to what is provided???
Thanks