NS Collection SQL Query

xxzab's picture

I am trying to make a SQL query based on server name, to see if it is a test server, Production server, etc.

We have this as part of the name

example:
LLL-XXXXXE123

Where LLL is the location code
XXXXX is some discription
E is the enviroment
123 is if there are more then one of them (could be no number or up to 3)

My question is there a way to make a SQL query to filter by E?

I am trying to deploy a small package based on enviroment.

Thanks in advance for any help.

negal_2001's picture

NS Collection SQL Query

This might point you the right direction

http://altirigos.com/vbulletin/sql/5101-sql-query-...

xxzab's picture

Thanks to negal_2001, I got

Thanks to negal_2001, I got it to work with:

SELECT [vResourceEx].[Guid]
FROM [vResourceEx] INNER JOIN [Inv_AeX_AC_Identification]
ON [vResourceEx].[Guid] = [Inv_AeX_AC_Identification].[_ResourceGuid]
WHERE [vResourceEx].[IsManaged] = 1
AND [vResourceEx].[Name] LIKE '%-%E[0-9]%'

____________________________________
Eric

Blog: http://theregime.wordpress.com

Altiris Sites:
http://forums.altiris.com/
http://www.altirigos.com/index.php?page=home